Re: A puzzle (summary)
Re: A puzzle (summary)
- Subject: Re: A puzzle (summary)
- From: Richard Hartman <email@hidden>
- Date: Sat, 22 Nov 2008 08:02:48 -0800
From: "Nigel Garvey" <email@hidden>
"Mark J. Reed" wrote on Fri, 21 Nov 2008 12:32:45 -0500:
The answer isn't 100,000, unless the question is "how many times is
the last digit a 1?".
If the question is "how many 1's show up over the course of a million
miles?", the answer is 600,000: 100,000 per digit.
On my car, and in my understanding of English, the 1 on the left
shows up
just once -- at 100000 miles (as it did recently!) -- then hangs
around for
another 100000 miles, after which it isn't seen again. The second 1
along
shows up ten times as often, hanging around for a tenth of the time
each
time. The third shows up ten times as often as that, and so on.
(10 ^ 0) + (10 ^ 1) + (10 ^ 2) + (10 ^ 3) + (10 ^ 4) + (10 ^5)
= 111111
Or: a number made up of the same number of ones as there are digits on
the instrument.
If the question is "how many miles does the car drive with a 1
showing
on the odometer?", the answer is 468,559. Much harder to calculate
without brute force counting.
It's rather a vague question, isn't it? ;)
Okay, lurker here. (Hi Nigel; long time no play!).
This is a cute problem and shows how carefully such questions must be
posed. Here is an attempt at a summary for the terminally geeked :)
Very little new here; Mark and Nigel have pretty much covered the
ground. I haven't seen anyone mention #2 though.
There are 1,000,000 (10^6) distinguishable 6-digit decimal numbers (0
to 999,999).
1. How many of those numbers contain AT LEAST ONE "1"?
Answer: 10^6 minus the number that do not contain ANY ones (9^6) =
468,559
2. How many of those 10^6 numbers contain EXACTLY ONE "1" somewhere in
the 6-number string?
Answer: 6x9^5 = 354,294
3. How many times does a "1" roll into view on one of the 6 wheels of
a standard odometer?
Answer: 111,111 (See Nigel's discussion)
4. How many ones appear in the entire collection of 10^6 six-digit
numbers (which collection has 6x10^6 digits)
Answer: 600,000 (i.e., 1/10 of 6x10^6; See Mark's discussion)
Have a great weekend timing all these possibilities.
Richard Hartman
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden