Barrier coverage, as one of the most important applications of wireless sensor network (WSNs), is to provide coverage for the boundary of a target region. We study the barrier coverage problem by using a set of n sensors with adjustable coverage radii deployed along a line interval or circle. Our goal is to determine a range assignment R = (r1, r2,..., rn) of sensors such that the line interval or circle is fully covered and its total cost C(R) = ∑ni=1 riα is minimized. For the line interval case, we formulate the barrier coverage problem of line-based offsets deployment, and present two approximation algorithms to solve it. One is an approximation algorithm of ratio 4/3 runs in O(n2) time, while the other is a fully polynomial time approximation scheme (FPTAS) of computational complexity O(n2/ε). For the circle case, we optimally solve it when α = 1 and present a 2(π/2)α-approximation algorithm when α > 1. Besides, we propose an integer linear programming (ILP) to minimize the total cost of the barrier coverage problem such that each point of the line interval is covered by at least k sensors.