Ad
  • Default User Avatar

    Exactly - if it does not break at 3, you know it will break at 4 since you tested it.
    If you alter the decision tree, you'd have no idea whether floor 4 breaks eggs, you only know that floor 5 breaks eggs and floor 3 does not.

    If it helps, extend your tree with the result - if you have more tries then eggs, you'll reach a result once the last egg breaks, eg. down from 1 you get the result 0, down from 2 you get the result 1,... and to the very right, next to the 10-throw you omitted if no break occurs at 9, the results are 9 or 10.

  • Default User Avatar

    Sure. Now automate the creation of that solution, and it's just a cache.

  • Default User Avatar

    It's naïve to think there are only 26 different letters, even using english.