Homework Help: How many numbers betweeen 0 and 9999 have 2,5 and 8 as digitis?

1. Jun 1, 2010

talolard

1. The problem statement, all variables and given/known data
How many numbers betweeen 0 and 9999 have 2,5 and 8 as digitis?

3. The attempt at a solution
I have two attempts, each witha different result
The first one:
We need to arrange 4 numbers in a row such that three of the numbers are 2, 5 and 8. There are 10 options for selecting the last number and 4!=24 different arangements for a total of 10*24 = 240.

The seconed one:
In each block of 1000 numbers there are 6 combiantions. x258, x285...
We can take the seven blocks that don't start with 2 5 or 8, for 42 numbers.

Next we look at one block x--- where x is 2 5 or 8. for our purposes the blocks are symetrical so we don't need to look at them individualy.
Lets say we take the block that starts with 2
then the block 258x gives us 10
then the block 285x gives us 10
then the block 2x58 gives us 9
then the block 2x85 gives us 9
then the block 25x8 gives us 8
then the block 28x5 gives us 8
for a total of 2*(10+9+8)=52

We have three such blocks for a total of 2*52=156.
And adding the other 42 we get 198
Whats wrong here?
Thanks
Tal

2. Jun 1, 2010

benorin

I think you've counted some numbers twice.

3. Jun 1, 2010

talolard

In both cases?

4. Jun 1, 2010

talolard

English isn't my native language. What is a degenerate case?

5. Jun 1, 2010

Hurkyl

Staff Emeritus
Sorry, I deleted my post after I realized you have (I think) worse problems than the one I mentioned.

A degenerate case is... well, it's hard to describe in words. It often amounts to something unusually special happening. e.g.

Often, when working with sets of N objects, the N=0 case is degenerate.

You are doing something in geometry with pairs of lines. The case when they are parallel is often degenerate. The case when they are equal even moreso.

You are counting the number of ways to arrange a collection of objects. When two of them are indistinguishable, that is often degenerate.

6. Jun 2, 2010

talolard

Ok How aboyt this way:
We have 7 unimportant numbers {0,1,3,4,6,7,9,}. to make a four digit number with 2,5,8 and one of them we have 4!*7 options, and since each number is distinc there is no repetition.
Looking at the other three we have 4!*3, but we need to divide by half because 2258 gets counted twice as does 2582. So we have \$1*7+4!*7/2 = 204.
I don't like that every attempt gives me a different awnser.
ANyone know which one is correct, if at all? and what is the problem with the rest of them?

7. Jun 2, 2010

Dick

204 is correct, and so is your reasoning.

8. Jun 2, 2010

talolard

Hey Dick,
Thans,
Can you tell me where I went wrong with this one, I cant figure it out:
The seconed one:
In each block of 1000 numbers there are 6 combiantions. x258, x285...
We can take the seven blocks that don't start with 2 5 or 8, for 42 numbers.

Next we look at one block x--- where x is 2 5 or 8. for our purposes the blocks are symetrical so we don't need to look at them individualy.
Lets say we take the block that starts with 2
then the block 258x gives us 10
then the block 285x gives us 10
then the block 2x58 gives us 9
then the block 2x85 gives us 9
then the block 25x8 gives us 8
then the block 28x5 gives us 8
for a total of 2*(10+9+8)=52

We have three such blocks for a total of 2*52=156.
And adding the other 42 we get 198

9. Jun 2, 2010

Dick

Doh. 2*(10+9+8)=54. Not 52. So you get 3*54+42=204. :)

Last edited: Jun 2, 2010