Sunday, November 6, 2011

Lucky Number Seven

Once upon a time, an inveterate gambler with a fascination for the number 7, decided to play roulette in the following manner. He would start by placing a 1 Re. bet seven times in succession, next he bet Rs.7 seven times in succession, then Rs.49 seven times in succession and so on, each time making the bet seven fold and playing it exactly seven times. It so happened that just before he could place his fiftieth bet, he noticed that his pile had grown by exactly Rs.777,777/-. After doing some number crunching he realized that if he had started with even Re.1 less, he could never have achieved this feat in exactly 49 plays. Furthermore, he had done so by winning the least possible number of bets.

note - a win earns you a profit equal to the bet amount, and a loss, forfeits the bet amount

How much money did the man start out with and how many bets did he win?



************************************************************************
************************************************************************

The first idea that immediately struck me was that the pattern of betting is building up a sum which can be most easily expressed in base 7. Well not exactly, because we get negative face values as well, but more on that in a moment. Let's rewrite 777,777 in base 7 and we get 6416400. Each of the seven numbers (can't refer to them as digits strictly speaking) represents the number of hands to be won  at each successive bet value, starting from the right and moving up to the left.

ie. win 0 hands at Re.1
    win 0 hands at Rs.7/-
    win 4 hands at Rs.49/-
   ...................
   ...................

The only problem is, we are not dealing exactly with base 7, because how can I emerge from 7 bets of Re.1 with no profit or loss? We need to balance the books by trading losses in one place value, for wins in another.

We will transform the above base 7 number into another number where the place value means the same, but the face value represents the actual (not net) number of hands won at the concerned bet amount.

Let's focus on the trailing 00. If we win zero hands at Re.1 and win exactly four hands (and lose three) at Rs.7/- then we emerge profitless after 14 bets. So we replace 00 with 40. We could just as well have made it 37 but we want to minimize the hands won, as per the problem statement so 40 it is.

Now we move on to the 64. We can't win 6 hands net (because we lose one and that nets to 5). But we can increase the wins from 6 to 7, but the lower place value needs to reduce seven times the difference to net out.
Thus we need 7 wins, and -3 losses. Thus 64 becomes 72.

Next the 1 is easily accomplished without any borrowing. It simply becomes 4.

And the final 64 again becomes 72.

Yielding 7247240 or a total of twenty six hands won out of forty nine.

Also, if we calculate the cumulative partial sum moving right to left, we find the most negative net winnings value even in the best case, will be just after 42 rounds of betting and stands at Rs.45,766. Also at this point, the gambler should have enough to make a bet of seven raised to the sixth or 117,649.

So the minimum starting purse stands at Rs.45,766 plus 117,649 or Rs. 163415/-.

No comments:

Post a Comment