Menu Close

Find-the-number-of-all-5-digit-numbers-x-1-x-2-x-3-x-4-x-5-with-x-1-x-2-x-3-x-4-x-5-




Question Number 117708 by mr W last updated on 13/Oct/20
Find the number of all 5 digit  numbers x_1 x_2 x_3 x_4 x_5  with  x_1 ≥x_2 ≥x_3 ≥x_4 ≥x_5 .
Findthenumberofall5digitnumbersx1x2x3x4x5withx1x2x3x4x5.
Commented by prakash jain last updated on 13/Oct/20
(Σ_(j=0) ^4 ^4 C_j ×^(10) C_(j+1) )−1  ^4 C_j  indicates partion of 5 into j+1 parts.  ^(10) C_(j+1)  way to choose j+1 digits.    −1 to exclude all zero cases  for n digits  (Σ_(j=0) ^(n−1)  ^(n−1) C_j ×^(10) C_(j+1) )−1
(4j=04Cj×10Cj+1)14Cjindicatespartionof5intoj+1parts.10Cj+1waytochoosej+1digits.1toexcludeallzerocasesforndigits(n1j=0n1Cj×10Cj+1)1
Commented by prakash jain last updated on 13/Oct/20
Distribution calculation  5 digits  •  •  •  •  •  We can 5 digits in j+1 number of  part by placing j bar in space between  dots.  for a 5 digit number formed with  2 unique digits we have following  ways  1d_1 +4d_2 =•∣••••  1d_1 +4d_2 ,2d_1 +3d_2 ,3d_1 +2d_2 ,4d_1 +d_2   = ^4 C_1   there are^(10) C_2  ways to select 2 digits.    similar for j digits  ^4 C_j  ways to decide which digit is repeated    how many time.   ^(10) C_j  ways to select j digits.  once we have selected  digits  and decided how many times  each digit is repeated then  there is only one unique way of  writing sorted number.  so numbers of way a 5 digit number  can be written using j different digits  in the required sorted order is.  ^4 C_(j−1) ×^(10) C_j   we need to subtract 1 for case where  a single digit is repeated 5 times.  so 5 digit numbers in required  sorted order are 2001.
Distributioncalculation5digitsWecan5digitsinj+1numberofpartbyplacingjbarinspacebetweendots.fora5digitnumberformedwith2uniquedigitswehavefollowingways1d1+4d2=1d1+4d2,2d1+3d2,3d1+2d2,4d1+d2=4C1thereare10C2waystoselect2digits.similarforjdigits4Cjwaystodecidewhichdigitisrepeatedhowmanytime.10Cjwaystoselectjdigits.oncewehaveselecteddigitsanddecidedhowmanytimeseachdigitisrepeatedthenthereisonlyoneuniquewayofwritingsortednumber.sonumbersofwaya5digitnumbercanbewrittenusingjdifferentdigitsintherequiredsortedorderis.4Cj1×10Cjweneedtosubtract1forcasewhereasingledigitisrepeated5times.so5digitnumbersinrequiredsortedorderare2001.
Commented by mr W last updated on 13/Oct/20
nice solution sir!
nicesolutionsir!
Answered by 1549442205PVT last updated on 14/Oct/20
For convenient we write abcde^(−)  instead  of x_1 x_2 x_3 x_4 x_5 ^(−) and ∣abcde∣−number of  numbers of form abcde^(−)   We solve the problem in turn for cases  1)How many are there the two−digit  numbers   ab^(−)  can be formed from the digits  1,..,9 such that a≥b  This case,it  is easy to see in the total  we can establish p=C_9 ^2 +9=45 ones  2)The case abc^(−) .  When 9 at first place we have  C_8 ^2 +8+9=45 numbers of form 9bc^(−)   Similarly,∣8bc^(−) ∣= C_7 ^2 +7+8=36 ones  ,.....,∣5bc^(−) ∣=C_4 ^2 +4+5=15 ones  ∣4bc^(−) ∣=C_3 ^2 +3+4=10;∣3bc^(−) ∣=C_2 ^2 +2+3=6  ∣2bc∣=3,∣1bc∣=1  .Hence,in total we obtain  ∣abc∣=∣9bc∣+∣8bc∣+∣7bc∣+6bc∣+∣5bc∣  +∣4bc∣+∣3bc∣+∣2bc∣+∣1bc∣=  45+36+28+21+15+10+6+4=165 numbers   3)The case abcd^(−)   ∣abcd∣=∣9bcd∣+∣8bcd∣+...+∣3bcd∣+∣2bcd∣+∣1bcd∣  From above result we get:  ∣9bcd∣=∣9cd∣+∣8cd∣...+∣1cd∣=45+36  28+21+15+10+6+4=165  ∣8bcd∣=∣8cd∣+...+∣1cd∣=165−45=120  ∣7bcd∣=∣8bcd∣−∣8cd∣=120−36=84  ∣6bcd∣=∣7bcd∣−∣7cd∣=84−28=56  ∣5bcd∣=∣6bcd∣−∣6cd∣=56−21=35  ∣4bcd∣=∣5bcd∣−∣5cd∣=35−15=20   ∣3bcd^(−) ∣= ∣4bcd∣−∣4cd∣=20−10=10  ∣2bcd∣=∣3bcd∣−∣3cd∣=10−6=4  ∣1bcd∣=∣2bcd∣−∣2cd∣=4−3=1  Hence,in total we obtain   165+120+84+56+35+20+10+5=495  4)The case abcde^(−)    a)When 9 at first we have 9bcde^(−)   From thepart 2)above we get  ∣99cde^(−) ∣=∣9de∣+∣8de∣+∣7de∣+∣6de∣+∣5de∣+∣4de∣+∣3de∣  +∣5de∣+∣4de∣+∣3de∣+∣2de∣+∣1de∣  =45+36+28+21+15+10+6+4=165  ∣98cde∣=∣99cde∣−∣9de∣=165−45=120  ∣97cde∣=∣98cde∣−∣8de∣=120−36=84  ∣96cde∣=∣97cde∣−∣7de∣=84−28=56  ∣95cde∣=56−21=35,∣94cde∣=35−15=20  ∣93cde∣=10;∣92cde∣=4;∣91cde∣=1  .Hence,in the total we get  165+120+84+56+35+20+10+4+1  =495 numbers of forms 9bcde^(−)   b)When 8 at the first place we have  ∣8bcde^(−) ∣=∣88cde∣+∣87cde∣+...+∣81cde∣  =∣98cde∣+∣97cde∣+...+∣91cde∣  =∣9bcde∣−∣9cde∣=495−165=330  Brcause:See the formulas of part2)  ∣88cde^(−) ∣=∣8de∣+∣7de∣+∣6de∣+∣5de∣  +∣4de∣+∣3de∣+∣2de∣+∣1de∣=165−45=120  ∣87cde∣=120−36=84  ∣86cde∣=84−28=56  ∣85cde∣=56−21=35  ∣84cde∣=35−15=20,∣83cde∣=10  ∣82cde∣=4,∣81cde∣=1,so in the total have   120+84+56+35+20+10+5=330  c)The case 7bcde^(−)  we get (see the part3)  ∣7bcde∣=∣8bcde∣−∣8cde∣  ∣=330−120=210 numbers  d)The case 6bcde^(−) ;∣6bcde∣=  ∣7bcde∣−∣7cde∣=210−84=126  e)The case5bcde^(−) ;∣ 5bcde^(−) ∣=  ∣6bcde∣−∣6cde∣=126−56=70  f)The case 4bcde^(−)  we get  ∣4bcde∣=70−35=35 numbers  g)The case 3bcde we get  ∣3bcde∣=35−20=15 numbers  ∣∣2bcde∣=15−10=5,∣1bcde∣=1  Finaly,in total we get  495+330+210+126+70+35+15+6=  1287 numbers of form abcde satisfy   the condition a≥b≥c≥d≥e
Forconvenientwewriteabcdeinsteadofx1x2x3x4x5andabcdenumberofnumbersofformabcdeWesolvetheprobleminturnforcases1)Howmanyaretherethetwodigitnumbersabcanbeformedfromthedigits1,..,9suchthatabThiscase,itiseasytoseeinthetotalwecanestablishp=C92+9=45ones2)Thecaseabc.When9atfirstplacewehaveC82+8+9=45numbersofform9bcSimilarly,8bc∣=C72+7+8=36ones,..,5bc∣=C42+4+5=15ones4bc∣=C32+3+4=10;3bc∣=C22+2+3=62bc∣=3,1bc∣=1.Hence,intotalweobtainabc∣=∣9bc+8bc+7bc+6bc+5bc+4bc+3bc+2bc+1bc∣=45+36+28+21+15+10+6+4=165numbers3)Thecaseabcdabcd∣=∣9bcd+8bcd++3bcd+2bcd+1bcdFromaboveresultweget:9bcd∣=∣9cd+8cd+1cd∣=45+3628+21+15+10+6+4=1658bcd∣=∣8cd++1cd∣=16545=1207bcd∣=∣8bcd8cd∣=12036=846bcd∣=∣7bcd7cd∣=8428=565bcd∣=∣6bcd6cd∣=5621=354bcd∣=∣5bcd5cd∣=3515=203bcd∣=4bcd4cd∣=2010=102bcd∣=∣3bcd3cd∣=106=41bcd∣=∣2bcd2cd∣=43=1Hence,intotalweobtain165+120+84+56+35+20+10+5=4954)Thecaseabcdea)When9atfirstwehave9bcdeFromthepart2)aboveweget99cde∣=∣9de+8de+7de+6de+5de+4de+3de+5de+4de+3de+2de+1de=45+36+28+21+15+10+6+4=16598cde∣=∣99cde9de∣=16545=12097cde∣=∣98cde8de∣=12036=8496cde∣=∣97cde7de∣=8428=5695cde∣=5621=35,94cde∣=3515=2093cde∣=10;92cde∣=4;91cde∣=1.Hence,inthetotalweget165+120+84+56+35+20+10+4+1=495numbersofforms9bcdeb)When8atthefirstplacewehave8bcde∣=∣88cde+87cde++81cde=∣98cde+97cde++91cde=∣9bcde9cde∣=495165=330Brcause:Seetheformulasofpart2)88cde∣=∣8de+7de+6de+5de+4de+3de+2de+1de∣=16545=12087cde∣=12036=8486cde∣=8428=5685cde∣=5621=3584cde∣=3515=20,83cde∣=1082cde∣=4,81cde∣=1,sointhetotalhave120+84+56+35+20+10+5=330c)Thecase7bcdeweget(seethepart3)7bcde∣=∣8bcde8cde∣=330120=210numbersd)Thecase6bcde;6bcde∣=7bcde7cde∣=21084=126e)Thecase5bcde;5bcde∣=6bcde6cde∣=12656=70f)Thecase4bcdeweget4bcde∣=7035=35numbersg)Thecase3bcdeweget3bcde∣=3520=15numbers∣∣2bcde∣=1510=5,1bcde∣=1Finaly,intotalweget495+330+210+126+70+35+15+6=1287numbersofformabcdesatisfytheconditionabcde
Commented by prakash jain last updated on 13/Oct/20
2 digits have 54 valid numbers.  10 20 30 40 50 60 70 80 90.
2digitshave54validnumbers.102030405060708090.
Commented by 1549442205PVT last updated on 13/Oct/20
Here i just consider 9 digits 1,2...,9  case 10 digits is similar  For 10 digits then  ∣ab∣=C_(10) ^2 +10−1 since 00^(−)  is rejected  formula have given is always true
Hereijustconsider9digits1,2,9case10digitsissimilarFor10digitsthenab∣=C102+101since00isrejectedformulahavegivenisalwaystrue
Commented by prakash jain last updated on 13/Oct/20
                determinant (((x_1 →),9,8,7,6,5,4,3,2,1),((1d),1,1,1,1,1,1,1,1,1),((2d),9,8,7,6,5,4,3,2,1),((3d),(45),(36),(28),(21),(15),(10),6,3,1),((4d),(165),(120),(84),(56),(35),(20),(10),4,1),((5d),(495),(330),(210),(126),(70),(35),(15),5,1),((6d),(1287),(792),(462),(252),(126),(56),(21),6,1))  The very first colums first digit for nd gives  the same result as D(n−1)  N(n,k)= n digits number with                      first digit as k  N(n,k)=Σ_(j=0) ^k N(n−1,k)
|x19876543211d1111111112d9876543213d4536282115106314d1651208456352010415d495330210126703515516d1287792462252126562161|TheveryfirstcolumsfirstdigitforndgivesthesameresultasD(n1)N(n,k)=ndigitsnumberwithfirstdigitaskN(n,k)=kj=0N(n1,k)
Commented by prakash jain last updated on 13/Oct/20
with 9 digits there are 1287  numbers  such that x_1 ≥x_2 ≥x_3 ≥x_4 ≥x_5   Σ_(i=0) ^4 ^4 C_i ×^9 C_(i+1)   1×9+4×36+6×84+4×126+1×126=  1287
with9digitsthereare1287numberssuchthatx1x2x3x4x54i=04Ci×9Ci+11×9+4×36+6×84+4×126+1×126=1287
Commented by prakash jain last updated on 13/Oct/20
3 digits  ∣abc∣=∣9bc∣+∣8bc∣+∣7bc∣+6bc∣+∣5bc∣  +∣4bc∣+∣3bc∣=  i think this missed  222,221,211,111  the total should be 165.  Because condition is greater than  equal to all above are valid results.
3digitsabc∣=∣9bc+8bc+7bc+6bc+5bc+4bc+3bc∣=ithinkthismissed222,221,211,111thetotalshouldbe165.Becauseconditionisgreaterthanequaltoallabovearevalidresults.
Commented by prakash jain last updated on 13/Oct/20
These are known as binomial  cofficients.  N(n,k)=OEIS C(n,k−1)
Theseareknownasbinomialcofficients.N(n,k)=OEISC(n,k1)
Commented by prakash jain last updated on 13/Oct/20
http://oeis.org/A000581
Commented by mr W last updated on 13/Oct/20
thank you all!
thankyouall!
Commented by 1549442205PVT last updated on 14/Oct/20
Thank Sir . I missed ∣2de∣=3,∣1de∣=1
ThankSir.Imissed2de∣=3,1de∣=1
Answered by mr W last updated on 13/Oct/20
let′s see n digit numbers d_1 d_2 d_3 ...d_n   with d_1 ≥d_2 ≥d_3 ≥...≥d_n .  we select n_0  times 0, n_1  times 1,  n_2  times 2, ..., n_9  times 9 to form such  a number.  n_0 +n_1 +n_2 +...+n_9 =n  ...(i)  with 0≤n_i  for i=0,1,2,...,9.  the number of valid n digit numbers  is the number of integer solutions of  (i).  using generating function  (1+x+x^2 +...)^(10) =(1/((1−x)^(10) ))=Σ_(k=0) ^∞ C_9 ^(k+9) x^k   the coefficient of x^n  term is the  answer, which is C_9 ^(n+9) . since the  number with n zeros is not valid,  we get the final answer   C_9 ^(n+9) −1.  for 5 digit numbers the answer is  C_9 ^(5+9) −1=2001.
letsseendigitnumbersd1d2d3dnwithd1d2d3dn.weselectn0times0,n1times1,n2times2,,n9times9toformsuchanumber.n0+n1+n2++n9=n(i)with0nifori=0,1,2,,9.thenumberofvalidndigitnumbersisthenumberofintegersolutionsof(i).usinggeneratingfunction(1+x+x2+)10=1(1x)10=k=0C9k+9xkthecoefficientofxntermistheanswer,whichisC9n+9.sincethenumberwithnzerosisnotvalid,wegetthefinalanswerC9n+91.for5digitnumberstheanswerisC95+91=2001.
Commented by mr W last updated on 13/Oct/20
exactly sir!
exactlysir!
Commented by mr W last updated on 13/Oct/20
Commented by prakash jain last updated on 13/Oct/20
After looking at your formula, i  thought simplifying the result that  i got  Σ_(j=0) ^(n−1) ^(n−1) C_j ^(10) C_(j+1)   =Σ_(j=0) ^(n−1) ^(n−1) C_j ^(10) C_(9−j)  =A  (1+x)^(9+n) =(1+x)^(n−1) (1+x)^(10)   (1+x)^(9+n) =(^(n−1) C_0 +^(n−1) C_1 x+..+^(n−1) C_(n−1) x^(n−1) )         (^(10) C_0 +^(10) C_1 x+^(10) C_2 x^2 +..+^(10) C_(10) x^(10) )  A is same as coeffcient of x^9  in RHS  from LHS coefficient of x^9 =^(9+n) C_9
Afterlookingatyourformula,ithoughtsimplifyingtheresultthatigotn1j=0n1Cj10Cj+1=n1j=0n1Cj10C9j=A(1+x)9+n=(1+x)n1(1+x)10(1+x)9+n=(n1C0+n1C1x+..+n1Cn1xn1)(10C0+10C1x+10C2x2+..+10C10x10)Aissameascoeffcientofx9inRHSfromLHScoefficientofx9=9+nC9

Leave a Reply

Your email address will not be published. Required fields are marked *