ravihanda wrote:How many 4-digit numbers are there whose decimal notation contains not more than 2 distinct digits?
Single Digit Numbers = 9
Two Digit Numbers (Excluding 0) = 9C2 x (2^4 - 2) = 36 x 14 = 504
9C2 because I need to select the two digits (Say a and b)
2^4 because at each position, it could be a or b.
-2 because I do not want aaaa or bbbb
Two Digit Numbers (Including 0) = 9 x (2^3 - 1) = 63
9 to select the digit other than 0(say a); 2^3 because it could be a or 0 at each position and -1 to eliminate 0000.
Total numbers = 9 + 504 + 63 = 576.
So, the answer is 576. Option B.
Sir I am not sure if I can reply here if its against rules please delete it sir..
Sir can u explain the second case here.. the (2^3-1) part.. There are four position since first position cant be zero the first position can be filled in 1 way(one amoung the selected 9 digits). Second,third and fourth postion can be filled in 2^3 ways. I dont understand why to subtract 1 as we will not get 0000 as per my post..
I manually wrote the combination and got the correct answer xxx0,xx00,x000,x0xx,xx0x,xx0x,x00x where we can select x in 9 ways so 9x7..But know what was wrong in my earlier, Plz tell me where I am going wrong sir.
Thx in advance
