q42

Saumyojit

Senior Member
Joined
Jan 21, 2020
Messages
1,032
How many 6-digit numbers contain exactly 4 different digits ?


Case 1: 4diff digits except 0 and repetition of any one out of 4

9c4* 6c4 *4! * 4c1= ...

Choose 4out of 9 digits then choose 4 location out of six , rearrange between them 4!, choose any one out of 4 to Repeat

Case 2:4diff digits including 0 and repetition of any one out of 4

9c3* 5c3 *4! * 4c1= 80640

Selecting any 3 out of 9 (zero already selected ) then CHOOSING 3 locations for (0 and other two in any 3 location except first Location) , but rearranging between (0 and other 3 ) ...

Arrangement that are being covered : 102400, 012400 etc

Nos starting with 0 : 0 _ _ _ _ _
9c3 * 5c3 * 3! *4c1= 20160

60480- 20160= 40320


Case3: 4 diff digits including 0 and two digits out of those 4

9c3 * 5c3 * 4! * 4c2 *2!= 241920
Eg:103501, 013501 etc

Numbers starting out with 0:
9c3 * 5c3 * 3! * 4c2 *2 = 60480

241920 - 60480= 181440


Case 4 : 4diff digits except 0 and two digits out of those 4:
9c4 * 6c4 * 4! * 4c2 * 2 =......

Adding them up gives 4lac something..



Answer is 2lac something
 
Last edited:
Before I spend any time on this:

Please show the entire problem, including choices you are choosing from and the answer you've been given, and the actual value you got.

Tell us what "4lac something" means. (Do you mean 4 lakh = 400,000 plus something?)

Look through your work as if you were us, and point out anything you think needs a closer look.
 
Can you @Dr.Peterson @pka help me to find out whats wrong
I haven't had time to look closely at this one. Have you? I suggested that you put yourself in our role and look for a part that needs checking; I'd start with the largest case. Keep in mind that our goal is to help you become independent and not need us, so we're inclined to help you less as you gain more experience.

My dictionary doesn't list lac as a spelling for lakh. I take it it's wrong?
 
I haven't had time to look closely at this one. Have you? I suggested that you put yourself in our role and look for a part that needs checking; I'd start with the largest case. Keep in mind that our goal is to help you become independent and not need us, so we're inclined to help you less as you gain more experience.

My dictionary doesn't list lac as a spelling for lakh. I take it it's wrong?
Yes i searched high and low for what's going wrong throughout today But could not find any wrong . I am missing some intuition or some abstract miscounting as answer 2 lakh 94 thousand 840
 
Repeating 3 times: |||*** how many ways to place the bars or stars? 6c3.
Repeating 4 times: 6c4
Repeating 5 times: 6c5
Repeating 6 times: 6c6

For bars repeating 3 times the stars can be a 3 numbers perm from 9. 4 times, perm 2 from 9. 5 times, perm 1 from 9.

so 10^6 - 10*6c3*9p3- 10*6c4*9p2- 10*6c5*9p1 - 10*6c6 = your preliminary answer, and further adjust to exclude the 0 in front and 00 in front numbers.
 
Last edited:
4 different digits out of all 6 digit numbers.
So there will be 'two repeated digits'. These two repeated digits can go with one number (123444) or go with two different numbers (123344)
 
Can you @Dr.Peterson @pka help me to find out whats wrong
Frankly, I have no idea where to even begin. It seems to me that the image that you posted is somehow at odds with what you first posted.
As I first understood it the key phrase was: Six digit number with exactly four distinct digits. Then [imath]102300[/imath] fits that discription.
Using those four digits, [imath]0,~1,~2,~\&~3[/imath] any one of three of which can be used as the leading digit.
Say you pick [imath]1[/imath] to lead number. Then any of [imath]123011,123001\text{ or }123000[/imath] will also work.
But we need to count the number of rearrangements of the last five digits.
The last five digits of [imath]123011[/imath] can be rearranged in [imath]\dfrac{5!}{2}=60[/imath] ways.
On the other hand, the number [imath]987111[/imath] can be arranged in [imath]\dfrac{6!}{3!}=120[/imath] ways all of which must be counted.
So any six digit string made up of four distinct digits none of which are zero:
[imath]987666[/imath] can be rearranged in [imath]\dfrac{6!}{3!}=120[/imath] ways;
[imath]987766[/imath] can be rearranged in [imath]\dfrac{6!}{(2!)^2}=180[/imath] ways.
Now about the ones with a zero?????
 
Frankly, I have no idea where to even begin. It seems to me that the image that you posted is somehow at odds with what you first posted.
As I first understood it the key phrase was: Six digit number with exactly four distinct digits. Then [imath]102300[/imath] fits that discription.
Using those four digits, [imath]0,~1,~2,~\&~3[/imath] any one of three of which can be used as the leading digit.
Say you pick [imath]1[/imath] to lead number. Then any of [imath]123011,123001\text{ or }123000[/imath] will also work.
But we need to count the number of rearrangements of the last five digits.
The last five digits of [imath]123011[/imath] can be rearranged in [imath]\dfrac{5!}{2}=60[/imath] ways.
On the other hand, the number [imath]987111[/imath] can be arranged in [imath]\dfrac{6!}{3!}=120[/imath] ways all of which must be counted.
So any six digit string made up of four distinct digits none of which are zero:
[imath]987666[/imath] can be rearranged in [imath]\dfrac{6!}{3!}=120[/imath] ways;
[imath]987766[/imath] can be rearranged in [imath]\dfrac{6!}{(2!)^2}=180[/imath] ways.
Now about the ones with a zero?????
Right, so the number repeating four times and more should be excluded
 
Repeating 3 times: |||*** how many ways to place the bars or stars? 6c3.
Repeating 4 times: 6c4
Repeating 5 times: 6c5
Repeating 6 times: 6c6

For bars repeating 3 times the stars can be a 3 numbers perm from 9. 4 times, perm 2 from 9. 5 times, perm 1 from 9.

so 10^6 - 10*6c3*9p3- 10*6c4*9p2- 10*6c5*9p1 - 10*6c6 = your preliminary answer, and further adjust to exclude the 0 in front and 00 in front numbers.
So revising this to 10^6 - 10*6c4*9p2- 10*6c5*9p1 - 10*6c6 then minus the 2 number each repeat trice cases and 3 number each repeat twice cases, minus the repeating twice numbers omitted by 9p2,
and that’s the preliminary answer. Then minus those with 0, 00 and 000 in front cases, plus the ones covered by previously excluded cases to eliminate double exclusion.
 
Last edited:
So further eliminating one number repeating 4 times and one number repeating twice makes the second term -10*6c4*(9p2+9).
 
I didn’t see exactly 4 digits, but 10p6 = 1lac5, that is all 6 digits different, if ||**** means at most 1 number repeat you have 10*6c2 ways to choose that number as the bars, and 9p4 to choose as the stars 10*6c2*9p4=4lac5, just sum these to for an exclusion amounts you already have more than 6lac, using 9lac99999 to minus these you have less than 4lac. Minus other exclusions I think it will be close to 2lac9.
 
Other there is another format to exclude which I forgot to mention, one number repeat trice, one number repeat twice and one number
 
Frankly, I have no idea where to even begin. It seems to me that the image that you posted is somehow at odds with what you first posted.
As I first understood it the key phrase was: Six digit number with exactly four distinct digits. Then 102300102300102300 fits that discription.
Using those four digits, 0, 1, 2, & 30,~1,~2,~\&~30, 1, 2, & 3 any one of three of which can be used as the leading digit.
Say you pick 111 to lead number. Then any of 123011,123001 or 123000123011,123001\text{ or }123000123011,123001 or 123000 will also work.
But we need to count the number of rearrangements of the last five digits.
The last five digits of 123011123011123011 can be rearranged in 5!2=60\dfrac{5!}{2}=6025!=60 ways.
On the other hand, the number 987111987111987111 can be arranged in 6!3!=120\dfrac{6!}{3!}=1203!6!=120 ways all of which must be counted.
So any six digit string made up of four distinct digits none of which are zero:
987666987666987666 can be rearranged in 6!3!=120\dfrac{6!}{3!}=1203!6!=120 ways;
987766987766987766 can be rearranged in 6!(2!)2=180\dfrac{6!}{(2!)^2}=180(2!)26!=180 ways.
Now about the ones with a zero?????
yes my logic is same . Where did I go Wrong?


So revising this to 10^6 - 10*6c4*9p2- 10*6c5*9p1 - 10*6c6 then minus the 2 number each repeat trice cases and 3 number each repeat twice cases, minus the repeating twice numbers omitted by 9p2,
and that’s the preliminary answer. Then minus those with 0, 00 and 000 in front cases, plus the ones covered by previously excluded cases to eliminate double exclusion
@sky2rain may be you are right but I dont understand what are you saying .
Can you write your apporach in a concise manner with explanation and eg .
 
But how are you choosing which ONE out of 4 distinct digits shall be chosen for filling up two places .
How do you choose 4 digits out of six ?
This is simply a question of chasing down the patterns.
There are [imath]\dbinom{10}{4}=210[/imath] ways to select four from ten digits.
Now we need to be concerned if [imath]0[/imath] is or is not among those selected.
In my approach, that is there first consideration.
There are [imath]\dbinom{9}{4}=126[/imath] choices without [imath]0[/imath].
Under this case there are two sub-cases: lets say the chosen four digits are [imath]\{1,2,3,4\}[/imath]
(i) repeat two of the chosen four digits ex. [imath]123344[/imath]. That can counted in [imath]\dfrac{6!}{(2!)^2}=180[/imath] ways to rearrange such.
(ii) repeat one of the chosen four digits three times ex. [imath]123444[/imath]. That can counted in [imath]\dfrac{6!}{(3!)}=120[/imath] ways to rearrange such.

Believe it or not that [imath]\uparrow[/imath] is the easy case.
Case (II) [imath]0[/imath] is one of the digits chosen. Say the chosen four digits are [imath]\{0,9,8,7\}[/imath]
The difficulty is that the [imath]0[/imath] cannot be the first (leading) digit we cannot have [imath]079888[/imath].
But we can have [imath]789000[/imath]. Now you tell us the other possible sub-cases here.
[imath][/imath][imath][/imath][imath][/imath]
 
There are (94)=126\dbinom{9}{4}=126(49)=126 choices without 000.
absolutely ok . 126 ways
(i) repeat two of the chosen four digits ex. 123344123344123344. That can counted in 6!(2!)2=180\dfrac{6!}{(2!)^2}=180(2!)26!=180 ways to rearrange such.
(ii) repeat one of the chosen four digits three times ex. 123444123444123444. That can counted in 6!(3!)=120\dfrac{6!}{(3!)}=120(3!)6!=120 ways to rearrange such
In this cases my logic is saying it will be
(i)repeat one of the chosen four digits two or (three times Altogether)= 1234 44
4c1 = choosing one digit out of 4 digit and then rearranging all six by 6!.
(6! / 2! ) * 4c1

(ii)repeat two of the chosen four digits ex. 123 3 4 4
4c2=choosing any 2 out of 4 and then rearranging All six by 6! .

(6!/ (2!)^2 ) * 4c2


Overall arrangements = 126 * { (6! / 2! ) * 4c1 + 6!/ (2!)^2 ) * 4c2 } =
126 * (360 *4 + 180 *6)= 3, 17, 520


Your way = 126 * ( 180 + 120)= 37,800

In your logic Are You not choosing which ONE or Two digit out of 4 shall be repeated or filled Respectively . Is it automatically filled after 9c4 is done .
 
yes my logic is same . Where did I go Wrong?



@sky2rain may be you are right but I dont understand what are you saying .
Can you write your apporach in a concise manner with explanation and eg .
you have a total permutation with 6 numbers as 10^6, minus all 0 in front ones you have 900,000 6-digits numbers. From that you subtract the numbers doesn’t repeat, the numbers repeat 1 time, the number shows 4 reps, shows 5 reps, shows 6 reps and AABBCC number, AAABBB number and AAABBC numbers. What’s left is exactly 4 number 6-digit numbers. I have worked out all the count on these numbers but had a hard time to exclude 0 in front…

Doing it this way avoid all possibilities of double counting.
 
Top