  Motivated by posted price auctions where buyers are grouped in an unknown
number of latent types characterized by their private values for the good on
sale, we investigate revenue maximization in stochastic dynamic pricing when
the distribution of buyers' private values is supported on an unknown set of
points in [0,1] of unknown cardinality $K$. This setting can be viewed as an
instance of a stochastic $K$-armed bandit problem where the location of the
arms (the $K$ unknown valuations) must be learned as well. In the
distribution-free case, we prove that our setting is just as hard as $K$-armed
stochastic bandits: no algorithm can achieve a regret significantly better than
$\sqrt{KT}$, (where T is the time horizon); we present an efficient algorithm
matching this lower bound up to logarithmic factors. In the
distribution-dependent case, we show that for all $K>2$ our setting is strictly
harder than $K$-armed stochastic bandits by proving that it is impossible to
obtain regret bounds that grow logarithmically in time or slower. On the other
hand, when a lower bound $\gamma>0$ on the smallest drop in the demand curve is
known, we prove an upper bound on the regret of order $(1/\Delta+(\log \log
T)/\gamma^2)(K\log T)$. This is a significant improvement on previously known
regret bounds for discontinuous demand curves, that are at best of order
$(K^{12}/\gamma^8)\sqrt{T}$. When $K=2$ in the distribution-dependent case, the
hardness of our setting reduces to that of a stochastic $2$-armed bandit: we
prove that an upper bound of order $(\log T)/\Delta$ (up to $\log\log$ factors)
on the regret can be achieved with no information on the demand curve. Finally,
we show a $O(\sqrt{T})$ upper bound on the regret for the setting in which the
buyers' decisions are nonstochastic, and the regret is measured with respect to
the best between two fixed valuations one of which is known to the seller.
