How Many Four-Digit Numbers Contain At Most Two Different Digits?

  • Thread starter Thread starter zorro
  • Start date Start date
  • Tags Tags
    Numbers
Click For Summary
The discussion centers on calculating the number of four-digit numbers that contain at most two different digits. It begins by identifying that there are 9 numbers with only one digit, such as 1111 and 2222. For two different digits, participants suggest using combinations to determine the distinct pairs from the set {1, 2, ..., 9} and applying the counting principle for arrangements. The challenge of including zero as a digit is acknowledged, with the need to ensure it does not appear as the leading digit. Overall, the conversation emphasizes breaking the problem into manageable cases to arrive at the total count.
zorro
Messages
1,378
Reaction score
0
How many four digit numbers...

Homework Statement



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


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?
 
Physics news on Phys.org


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.
 
Last edited:


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!
 
Last edited:


spamiam said:
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?

spamiam said:
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.

spamiam said:
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


spamiam said:
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)
 


Abdul Quadeer said:
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).
 

Similar threads

  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 23 ·
Replies
23
Views
2K
  • · Replies 18 ·
Replies
18
Views
3K
  • · Replies 20 ·
Replies
20
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 3 ·
Replies
3
Views
768
  • · Replies 13 ·
Replies
13
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K