1
$\begingroup$

A woman works at a lottery ball factory. She's instructed to create lottery balls, starting from number 1, using the following steps:

  1. Open lottery ball package and remove red rubber ball.
  2. Using two strips of digit stickers (0 through 9), create the current number by pasting the digits on the ball.
  3. Digits not used in this way are put in a bowl where she may fish for other digits if she's missing some later.
  4. Proceed to the next ball, incrementing the number by one.

The lottery ball problem is, at what number will she arrive at before she's out of digits (granted, it's a large number, so assume these are basketball-sized rubber balls)?

My question is not so much the solution as it is how to go about solving for this number? It seems evident that the first digit she'll run out of will be 1, since that's the number she starts with, however beyond that I wouldn't know how to go about determining that number. Any clues that could push me in the right direction would be greatly appreciated.

  • 0
    How is this related to fractals?2011-05-06
  • 0
    Or analyis :) ?2011-05-06
  • 0
    I don't know! :( Feel free to modify the keywords since I'm not sure how to categorize this.2011-05-06

1 Answers 1

2

Yup, the first digit you run out of will be 1. As to how to solve it - try writing a formula for the number of $1$s in the decimal representations of the first $n$ numbers, and try and work out when it overtakes $2n$.

  • 0
    Oh - you'll find the formula easier if you (a) only try and work it out for certain numbers, and (b) if you pretend she started at 0 instead of 1 (this won't change the answer).2011-05-06
  • 0
    The number of 1s in a number *n* can't be written in a formula, can it? I think if I had a formula like that, solving for *f(n)* exceeding *2n* would be simple.2011-05-06
  • 0
    The number of 1s in _n_ would be messy, yes. The number of 1s in the *first* _n_ numbers - less so, especially when _n_ takes certain values... :)2011-05-06
  • 0
    It's a good start I suppose. I'll have to dwell on that thought.2011-05-06
  • 0
    @IainM You are right, of course, but I do not have the time to fix my answer at the moment, so I deleted it.2011-05-06
  • 0
    Heh, no worries. The problem is that it's easy enough to work out one point at which $f(n)$ overtakes $2n$, but the question asks for the **first** point. Which is substantially messier :p2011-05-06