PDA

View Full Version : How many four digit numbers.....


Abdul Quadeer
Apr4-11, 08:26 AM
1. The problem statement, all variables and given/known data

How many four digit numbers are there which contain not more than two different digits?


3. The attempt at a solution

1)Numbers with only one digit like 1111,2222......
total are 9.

2)Numbers with only two different digits.

How do I proceed?

spamiam
Apr4-11, 08:38 AM
I'm not sure I would break up the cases like that, though I suppose you could. You have 2 choices for each of the four digits, which should give you the answer by the basic counting principle.

If that doesn't help, let's look at the easier example of two digit numbers with only the digits 1 and 2. We have 11, 12, 21, 22, yielding 4 = 22 possibilites.

EDIT: Whoops! Sorry, I misread the question. I'll try to fix my post later.

spamiam
Apr4-11, 09:39 AM
You were definitely right to break up the cases as you did. I think I would try:

1) Numbers with only one digit like 1111,2222......
total are 9.

2) Numbers with only two different nonzero digits.

3) Numbers with 0 as a digit.

Okay, so after my last (slightly misguided) post, hopefully you can figure out how many different 4 digit numbers there are with only the distinct nonzero digits a and b. Next, subtract off the numbers already covered in 1) (i.e. aaaa and bbbb). After that, count how many ways we can choose distinct a and b from the set {1, 2, ..., 9}. Using these 2 pieces of information should give the answer to 2).

3) is slightly annoying since we can't have a zero as the first digit. It's probably easiest to just write down the possibilities with 0's and 1's and then generalize.

Hope that helps!

Abdul Quadeer
Apr4-11, 11:03 AM
Okay, so after my last (slightly misguided) post, hopefully you can figure out how many different 4 digit numbers there are with only the distinct nonzero digits a and b.

72?

Next, subtract off the numbers already covered in 1) (i.e. aaaa and bbbb).

Why would numbers containing only a and b contain numbers like aaaa,bbbb? I don't see any need to subtract.

After that, count how many ways we can choose distinct a and b from the set {1, 2, ..., 9}. Using these 2 pieces of information should give the answer to 2).

9C2 ways. So total number of ways = 9C2*72


3) is slightly annoying since we can't have a zero as the first digit. It's probably easiest to just write down the possibilities with 0's and 1's and then generalize.

1100
1010
1001
1110
1011
1101
1000

Total no. of cases=7
So required no.=7*9 (9 because 1 can be replaced by any other digit except 0)

spamiam
Apr4-11, 11:14 AM
72?


No... You're making 4 choices, and for each choice you have 2 options.


Why would numbers containing only a and b contain numbers like aaaa,bbbb? I don't see any need to subtract.


Well, for one thing, you already counted them in 1). For another, you're going to over-count, since when I count all the possibilities for {1,2} and {1,3}, I'll count 1111 twice. I think splitting the cases as you had it is easier.



1100
1010
1001
1110
1011
1101
1000

Total no. of cases=7
So required no.=7*9 (9 because 1 can be replaced by any other digit except 0)

Yes, exactly. There's another way to see this as well, but first you need to figure out how many possibilities there are using digits {a,b} (part 2).