title: How to solve the 2 glass balls puzzle programmatically?
body: <p>There is a popular <a href="http://www.tanyakhovanova.com/Puzzles/solballs.html" rel="nofollow">puzzle</a> about a 100-story building and two glass balls. I see the solution and now I wonder if I can solve the puzzle <em>programmatically</em>.</p>
  
  <p>The trivial <em>programmatic</em> solution is a full search (I believe I can code it using backtracking). Is there any better <em>programmatic</em> solution ? Can I use <em>dynamic programming</em> to solve the puzzle?</p>