q42

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.
whats ur answer coming?
please check #19
 
For instance, the AABBCC ones are counted as 10c1*6c2*9c1*4c2*8c1*2c2, which literally means take 1 number out of 10 and filling in 2 spot out of 6, then take 1 number out of the rest of 9 to fill 2 spots out of rest 4, and take 1 number out of 8 to fill in the rest 2. But to get rid of 0 in front, you will have to consider that for the 2 spots out of 6, there is 5 ways to for number A to be in front of everyone and that is AA****, A*A***, A**A**, A***A* and A****A. Same as B and C so you will have (6c2*4c2*2c2-15)*10*9*8 if you wanna get rid of 0 in front numbers. Not sure if this is right.
 
Last edited:
For instance, the AABBCC ones are counted as 10c1*6c2*9c1*4c2*8c1*2c2, which literally means take 1 number out of 10 and filling in 2 spot out of 6, then take 1 number out of the rest of 9 to fill 2 spots out of rest 4, and take 1 number out of 8 to fill in the rest 2. But to get rid of 0 in front, you will have to consider that for the 2 spots out of 6, there is 5 ways to for number A to be in front of everyone and that is AA****, A*A***, A**A**, A***A* and A****A. Same as B and C so you will have (6c2*4c2*2c2-15)*10*9*8 if you wanna get rid of 0 in front numbers. Not sure if this is right.
I can see I made a mistake, it should be 10c1*6c2*9c1*4c2*8c1*2c2 - 5*9c1*8c1 - 5 *10c1*8c1 - 5*10c1*9c1
 
total perm: 10^6
0 in front 10^5
Exclude 0 in front = 10^6-10^10=900000

No repeat: 10p6 =151200 exclude 0 in front = 9*9p5 = 136080

One number twice: ||****, bar can be 1 of 10, so 10*6c2 = 150, stars are 9p4=3024, total: 453600 exclude 0 in front: when bars are in front, there are 5 ways to place the 2 bars so at least 1 is in front: -10*5*9p4 so: 438480

One number 4 times: 10*6c4*9^2= 12150
Excluding 0 in front: (10*6c4-1*5c3)*9^2=11745

One number 5 times: 10*6c5*9p1=540
Excluding 0 in front: (10*6c5 - 1*5c4)*9p1=495

One number 6 times: 10*6c6=10
Excluding 0 in front: 10-1=9

AABBCC: 6c2*10c1*4c2*9c1*2c2*8c1=64800
Excluding 0 in front (logic shown in thread #23 and # 24): - 5*9c1*8c1 - 5 *10c1*8c1 - 5*10c1*9c1
After excluding = 63590

AAABBB 6c3*10c1*3c3*9c1=1800
Excluding 0 in front: For the rest of 2A to fill in 5 spot you have 10 ways to form AAA*** when the first spot is always A. So to get rid of zero existing in A, - 10*9c1, and same for B, - 10*10c1
After excluding = 1610

AAABBC 6c3*10c1*3c2*9c1*1c1*8c1=32400
Excluding 0s in front: For 2A to fill in 5 spot you have 10 ways to form AAA*** when the first spot is always A. So to get rid of zero existing in A same as shown previously, -10 ways so - 10*9c1*8c1, and for B, as we showed before, 5ways, so - 5*10c1*8c1, for C only 1 way, so - 1*10c1*9c1
After excluding = 31190

Final answer: 900000-136080-438480-11745-495-9-63590-1610-31190 = 900000 - 683199 = 216801 not sure if correct but at least it turned out to be a 2lac number.
 
total perm: 10^6
0 in front 10^5
Exclude 0 in front = 10^6-10^10=900000

No repeat: 10p6 =151200 exclude 0 in front = 9*9p5 = 136080

One number twice: ||****, bar can be 1 of 10, so 10*6c2 = 150, stars are 9p4=3024, total: 453600 exclude 0 in front: when bars are in front, there are 5 ways to place the 2 bars so at least 1 is in front: -10*5*9p4 so: 438480

One number 4 times: 10*6c4*9^2= 12150
Excluding 0 in front: (10*6c4-1*5c3)*9^2=11745

One number 5 times: 10*6c5*9p1=540
Excluding 0 in front: (10*6c5 - 1*5c4)*9p1=495

One number 6 times: 10*6c6=10
Excluding 0 in front: 10-1=9

AABBCC: 6c2*10c1*4c2*9c1*2c2*8c1=64800
Excluding 0 in front (logic shown in thread #23 and # 24): - 5*9c1*8c1 - 5 *10c1*8c1 - 5*10c1*9c1
After excluding = 63590

AAABBB 6c3*10c1*3c3*9c1=1800
Excluding 0 in front: For the rest of 2A to fill in 5 spot you have 10 ways to form AAA*** when the first spot is always A. So to get rid of zero existing in A, - 10*9c1, and same for B, - 10*10c1
After excluding = 1610

AAABBC 6c3*10c1*3c2*9c1*1c1*8c1=32400
Excluding 0s in front: For 2A to fill in 5 spot you have 10 ways to form AAA*** when the first spot is always A. So to get rid of zero existing in A same as shown previously, -10 ways so - 10*9c1*8c1, and for B, as we showed before, 5ways, so - 5*10c1*8c1, for C only 1 way, so - 1*10c1*9c1
After excluding = 31190

Final answer: 900000-136080-438480-11745-495-9-63590-1610-31190 = 900000 - 683199 = 216801 not sure if correct but at least it turned out to be a 2lac number.
There’s a mistake: I forgot exclude 0 in front for when stars are in front, for the instance of one number twice repeat and 4 times repeat, but this is gonna increase the total by a bit I would imagine the answer is still a 2 lac number.
 
Last edited:
so to summarize, use all perms 10^6, exclude 0s in front, minus exact 6 numbers to make up 6-6digits, 5 numbers to make up 6digits, 3 number to make up 6 digits, 2 number to make up 6 digits and 1 number to make up 6 digits, you get exactly 4 numbers to make up 6 digits.
 
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 .
I think I see where the double counting exist. There exits massive double counting in the AABBCC in my approach and AABBCD in your approach. choosing A out of 10 to fill in two spots of 6 and B to fill in two spots out of 4, there are a lot of cases that A = 3 and B = 7 where as A = 7 and B = 3 make the number exact the same, although A and B can never be the same. And CD double counting in your approach makes it worse in cases such as C=0 D=5 and C=5, D=0 That’s why you get 4lac number. Although they are chosen distinctively for each event to distinguish from the rest of the numbers, as pairs they are not distinguished hence double counted.
 
Final revision: I will show you preliminary answer and you should figure out how to remove the 0s in front. In your approach, I can see that to choose the exactly 4 different numbers to make 6-digit number as two formats: AABBCD or AAABCD, and by rearranging ABCD in one of the 6 spots, and assign different number to each of ABCD, there is a large number of ways.

In AABBCD format we first decide 4 spots be filled by choosing AB as two number set, for example: choose (1,3) to fill spot (2,5) and (3,6) you get C13D13, and then choose 2 from 8 numbers as CD as a permutation without repetition to fill in the rest of the spots. (previously I said there could be double counting in CD, turns out there isn’t. CD has to exist as a permutation without reputation.) So the formula is 10c2*6c2*4c2*8p2*2c2 = 226800
Then exclude all 0 in front numbers.

In AAABCD format, it’s pretty straightforward as 10*6c3*9p3*3c3 (choose 3 spots and one of 10 numbers to fill, and the rest 3 spots is just a perm without repetition), and it is = 113400. The you need to exclude all 0 in front numbers.

Total is 340200, and after removing 0 in front cases, hopefully you reach 2lac9something.
 
Last edited:
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
@pka What about this ?


@sky2rain Your method can you write in one go there are lot of Complexities
 
AABBCD format is something like 112234 or 121324 - 2 number repeat twice + 2 numbers. You have 6 spots to put the number:

A A B B C D
1 2 3 4 5 6 <- spot number

1st we decide what number to use as A and B, say (3,9) and then we assign the spot location to these two numbers say ( 2,5) for A and (3,4) for B. Apparently spots can’t repeat. Then we assign CD, take (7,8) for instance as, one set in a permutation, and it cannot be either A or B, to the last two spot. That would look like (3,9):[2,5][3,4];(7,8):[1,6] <- this is a exactly 4 number 6 digit number, and it would translate into: 739938.

There are 10c2 ways to form set such as (3,9), 6c2 ways to form the first location such as (2,5), then 4c2 ways to form set such as second location because location 2 and 5 has been taken. And the last two locations (1,6), which is not chosen but naturally left over as 2c2, would be taken by a two number set (7,8) - an instance in a permutation. And clearly the (7,8) has been chosen out of the 8 numbers - what’s left of then 10 after choosing (2,5) as AB.

One go: 10c2*6c2*4c2*8p2*2c2
what’s so hard to understand? There are 226800 ways to write a piece of code like (3,9):[2,5][3,4];(7,8):[1,6], which can then be translated to 739938, and each code corresponds to exactly one 6 digit number.
 
Last edited:
So far I got the number 302820. It’s pretty close to what the answer is. I wasn’t too sure about my method of excluding 0s in front, but for both AABBCD and AAABCD formats I believe my formula is correct.
 
Guess what, I made a mistake calculating 10*6c3*9p3. Turns out the total is 327600. Use 327600*0.9, it turns out to be 294840. It means the ratio of exact 4 number 6-digit number / exact 4 number 6-spot permutation with repetition is equal to all 6 digit number / all 6-spot permutation with repetition (900,000/10^6). But I have worked out a direct approach anyway.
 
Final Final revision (with correct answer)

AAABCD format: 10*6c3*9p3=100800
AABBCD format: 10c2*6c2*4c2*8p2*2c2=226800
Subtotal = 327600

AAABCD excluding 0 in front as AAA:
spot 1 must be taken as 0, so the other two 0s will take another 2 spots out of 5 and the rest of 3 spots is taken by a non-0 9p3 permutation without repetition:
1*5c2*9p3= 5040

AAABCD excluding 0 in front as B:
Spot 1 must be taken as 0, So the other two number CD will take another 2 spots out of 5 as a 8p2 permutation without repetition. It’s 8p2 instead of 9p2 since we have to reserve a number from 1-9 for AAA. And AAA has only 9 variations (111-999) so they can form:
5c2*8p2*9=5040

AABBCD excluding 0 in front as AA :
There are 9 sets contain 0 for (A,B) combo set, and that is (0,1)….(0,9), and it has to take a spot 1 in the spot combo set as [1,2]…[1,5], so that’s 9*5 ways. BB needs two spots from the rest of 4, so 4c2 and CD is just a 8p2 permutation without repetition:
9*5*4c2*8p2 = 15120

AABBCD excluding 0 in front as C:
There are 9 sets contain 0 for (C,D) permutation set, and that is (0,1)….(0,9), and it has to take a spot 1 in the spot combo set as [1,2]…[1,5], so that’s 9*5 ways. AA needs two spots from the rest of 4, so 4c2. And now (A,B) combo set has only 8 number to choose from, so it’s 8c2:
9*5*4c2*8c2 = 7560

Exciting moment: 327600 - 5040 - 5040 - 15120 - 7560 = 294840 (also 327600*0.9)
 
AABBCD format: 10c2*6c2*4c2*8p2*2c2=226800
10c2 * 6c4 * 8p2 * 6

10c2 :Any two digits which will be repeated twice . ok
6c4 : 4 places for them.
8p2: other 2 digits CD and rearranging them
4!/(2!*2!): 6 (Rearranging AAbb)
 
10c2 * 6c4 * 8p2 * 6

10c2 :Any two digits which will be repeated twice . ok
6c4 : 4 places for them.
8p2: other 2 digits CD and rearranging them
4!/(2!*2!): 6 (Rearranging AAbb)
Your understanding is 100% correct but it seems to me choose 4 places and rearranging them increase the complexity in the thinking process.

Based on your logic there exists a way to choose two numbers A and C and place them in 3 spots and choose B and D for the rest, but it doesn’t make sense to do so.

If the question changes to how many 5 number 6 digit numbers are there, then it would look like AABCDE and obviously you wouldn’t go for placing BCDE in 4 places at the first sight.

For the number of times that a few items repeat, the one with most number of repeat times among the items should be where you will find places it for them accordingly, and shouldn’t assign more number of places than that number.

A repeated 2 times so find 2 places for A out of 6, then B out of 4, then actually 8p2 is a shortcut, and if you really want to stick to the method you would use 8c2*2c1*1c1.
 
Last edited:
Your understanding is 100% correct but it seems to me choose 4 places and rearranging them increase the complexity in the thinking process.

Based on your logic there exists a way to choose two numbers A and C and place them in 3 spots and choose B and D for the rest, but it doesn’t make sense to do so.

If the question changes to how many 5 number 6 digit numbers are there, then it would look like AABCDE and obviously you wouldn’t go for placing BCDE in 4 places at the first sight.

For the number of times that a few items repeat, the one with most number of repeat times among the items should be where you will find places it for them accordingly, and shouldn’t assign more number of places than that number.

A repeated 2 times so find 2 places for A out of 6, then B out of 4, then actually 8p2 is a shortcut, and if you really want to stick to the method you would use 8c2*2c1*1c1.
Thanks for the efforts sky2rain . Btw you have completed your education and everything?
 
Thanks for the efforts sky2rain . Btw you have completed your education and everything?
Yeah I am in my 40s… however I am not a professional mathematician or any kind of scientist, so I only have a bachelors degree.
 
Top