  We study a two-tiered wireless sensor network (WSN) consisting of $N$ access
points (APs) and $M$ base stations (BSs). The sensing data, which is
distributed on the sensing field according to a density function $f$, is first
transmitted to the APs and then forwarded to the BSs. Our goal is to find an
optimal deployment of APs and BSs to minimize the average weighted total, or
Lagrangian, of sensor and AP powers. For $M=1$, we show that the optimal
deployment of APs is simply a linear transformation of the optimal $N$-level
quantizer for density $f$, and the sole BS should be located at the geometric
centroid of the sensing field. Also, for a one-dimensional network and uniform
$f$, we determine the optimal deployment of APs and BSs for any $N$ and $M$.
Moreover, to numerically optimize node deployment for general scenarios, we
propose one- and two-tiered Lloyd algorithms and analyze their convergence
properties. Simulation results show that, when compared to random deployment,
our algorithms can save up to 79\% of the power on average.
