## One Million Miles on Your Odometer

A forum for good logic/math puzzles.

Moderators: jestingrabbit, Moderators General, Prelates

rhitglassmaker
Posts: 5
Joined: Thu Nov 13, 2008 4:31 pm UTC

### One Million Miles on Your Odometer

My boss is trying to test me, it seems, and I'm terrible enough at probability/stats/number theory that this prompted me to come ask for help instead of failing miserably by myself.

Here's the problem: "My odometer is sitting on 999,999 miles currently. When it rolls over to 1,000,000 miles, how many 1's will have passed across the face of the odometer?" e.g. +1 when the odometer reads 1, +1 for 10, +2 for 11, +1 for 12 so on and so forth on to 1000000.

Help plz?

EDIT: he wants each occurrance of 1 to be counted. So for 10-19, there are 11 occurances of the number 1.
Last edited by rhitglassmaker on Thu Nov 13, 2008 5:01 pm UTC, edited 1 time in total.
Time flies like an arrow. Fruit flies like a banana.

jestingrabbit
Factoids are just Datas that haven't grown up yet
Posts: 5967
Joined: Tue Nov 28, 2006 9:50 pm UTC
Location: Sydney

### Re: One Million Miles on Your Odometer

The way to work this out is to ask how often each digit is a 1. So how many times is the first digit a 1, how many times is the second digit a 1 etc.
ameretrifle wrote:Magic space feudalism is therefore a viable idea.

rhitglassmaker
Posts: 5
Joined: Thu Nov 13, 2008 4:31 pm UTC

### Re: One Million Miles on Your Odometer

Yeah, that'll work. But I was hoping to find some kind of summation or other such nonsense to really show him up, as he thinks he's smarter than me. And while that may be true, he doesn't know the power of XKCD forums, so I win.
Time flies like an arrow. Fruit flies like a banana.

Goldstein
Posts: 985
Joined: Wed Nov 05, 2008 9:38 pm UTC
Location: Newcastle, UK

### Re: One Million Miles on Your Odometer

When you say 'passed across the face', does your boss definitely want to count 11 miles as two occurrences? I would say that whilst the value displayed went from 10 to 20, the same '1' in the tens column is still passing across the face once, not ten times. So you'd count that when it appeared (When the value rolls over to 10) but not again until it has disappeared from view (When the value rolls over to 20).

I ask because that's how I first read it, and I think interpreted this way it might be a simpler problem.
Chuff wrote:I write most of my letters from the bottom

rhitglassmaker
Posts: 5
Joined: Thu Nov 13, 2008 4:31 pm UTC

### Re: One Million Miles on Your Odometer

Yeah, he wants each occurrance of 1 to be counted. So for 10-19, there are 11 occurances of the number 1.
Time flies like an arrow. Fruit flies like a banana.

Allenr
Posts: 324
Joined: Fri Nov 07, 2008 4:50 pm UTC
Location: Wherever there is hockey.

### Re: One Million Miles on Your Odometer

Wow. The way you described this seems to give to possible solutions. Im solving for every time a one passes. So you would count 1,10,11,21. Not 12 though because the one is still there. I'm not sure if this is what you mean, just what I'm thinking.
My math might be off some but here it goes:

Spoiler:
1,000,000/10 = 100,000 for ever time the once digit read one (everyone 10 miles)
1,000,000/100 = 10,000 tens digit
1,000,000/1,000 = 1,000 hundred
1,000,000/10,000 = 100 thousands
1,000,000/100,000 = 10 tenthousands
1,000,000/1,000,000 = 1 the only time the hundred thousand read 1

Add them all up and you get 111,111 times.

Edit: I guess I took too long to post this lol, well, heres what I get if your doing it the wrong way.
Spell check wanted.
Interview me!
Roĝer wrote:While bunnies taste better, nothing beats the desperate death cry of a puppy, especially when accompanied with the grinding of a chainsaw on canine bones.

jestingrabbit
Factoids are just Datas that haven't grown up yet
Posts: 5967
Joined: Tue Nov 28, 2006 9:50 pm UTC
Location: Sydney

### Re: One Million Miles on Your Odometer

Spoiler:
600,001 with 100,000 coming from each of the non-millions digits, and 1 from the millions digit

but its kinda cheating to be coming to the forums to solve your bosses puzzle. Though your boss sounds like a bit of dick too...
ameretrifle wrote:Magic space feudalism is therefore a viable idea.

rhitglassmaker
Posts: 5
Joined: Thu Nov 13, 2008 4:31 pm UTC

### Re: One Million Miles on Your Odometer

Yeah, he's basically pitting me against another new guy to see who wins. Gladiator for manufacturing engineers, or something like that.
Time flies like an arrow. Fruit flies like a banana.

GreedyAlgorithm
Posts: 286
Joined: Tue Aug 22, 2006 10:35 pm UTC
Contact:

### Re: One Million Miles on Your Odometer

GENERATION 1-i: The first time you see this, copy it into your sig on any forum. Square it, and then add i to the generation.

thc
Posts: 643
Joined: Fri Feb 08, 2008 6:01 am UTC

### Re: One Million Miles on Your Odometer

So for the other interpretation, would the answer be
Spoiler:
111,111 times?

Blatm
Posts: 638
Joined: Mon Jun 04, 2007 1:43 am UTC

### Re: One Million Miles on Your Odometer

Spoiler:
111,112
if you count "1,000,000".

Allenr
Posts: 324
Joined: Fri Nov 07, 2008 4:50 pm UTC
Location: Wherever there is hockey.

### Re: One Million Miles on Your Odometer

Blatm wrote:
Spoiler:
111,112
if you count "1,000,000".

I didn't count 1,000,000 becuase the one has not "passed", it is still there.
Spell check wanted.
Interview me!
Roĝer wrote:While bunnies taste better, nothing beats the desperate death cry of a puppy, especially when accompanied with the grinding of a chainsaw on canine bones.

qinwamascot
Posts: 688
Joined: Sat Oct 04, 2008 8:50 am UTC
Location: Oklahoma, U.S.A.

### Re: One Million Miles on Your Odometer

Aren't you sort of taking advantage of the other new guy by using a website to solve a problem for you? Oh well.

Spoiler:
Up to, but not including, 1 million are 1 million numbers from 0-999999. Each can be written as a unique 6-digit number by possibly adding 0s to the beginning. Each possibility is accounted for, so we can just look at a general case. Each number has a 1/10 chance to have a 1 for each digit. So 1/10*1000000=100000 configurations with a 1 for each digit. Multiply by 6 for 6 digits to get 600000.
Quiznos>Subway