We consider a single-product revenue management problem with an inventory constraint and unknown, noisy, demand function. The objective of the firm is to dynamically adjust the prices to maximize total expected revenue. We restrict our scope to the nonparametric approach where we only assume some common regularity conditions on the demand function instead of a specific functional form. We propose a family of pricing heuristics that successfully balance the tradeoff between exploration and exploitation. The idea is to generalize the classic bisection search method to a problem that is affected both by stochastic noise and an inventory constraint. Our algorithm extends the bisection method to produce a sequence of pricing intervals that converge to the optimal static price with high probability. Using regret (the revenue loss compared to the deterministic pricing problem for a clairvoyant) as the performance metric, we show that one of our heuristics exactly matches the theoretical asymptotic lower bound that has been previously shown to hold for any feasible pricing heuristic. Although the results are presented in the context of revenue management problems, our analysis of the bisection technique for stochastic optimization with learning can be potentially applied to other application areas.3 revenue loss? It turns out that it is possible: If we use Stochastic Approximation algorithms (i.e., Kiefer-Wolfowitz and Robbins-Monro, see Broadie et al. [10]) during the exploitation phase instead of another bisection search, then the resulting revenue loss is exactly Θ( √ θ). Thus, we have provided an "optimal" nonparametric pricing heuristic for the setting of a single-product problem with inventory constraint. (In the case where the firms know the functional form of the demand function, i.e., parametric model, the Ω( √ θ) lower bound has been repeatedly shown to be tight. For example, in the setting without inventory constraints, Keskin and Zeevi [27], den Boer and Zwart [19], and Broder and Rusmevichientong [11], each proposes a parametric pricing heuristic that guarantees a revenue loss of the order of O( √ θ) . As for the setting with inventory constraints, recently Chen et al. [13] propose a heuristic that exactly matches this lower bound. Their result holds for a general parametric model with an arbitrary set of inventory constraints. Thus, they have resolved the parametric dynamic pricing problem with inventory constraints.)