Question #90156

from 24 to 12943 how many numbers can be made such that 1,3,5 does not appear 3 or more than 3 times
1

Expert's answer

2019-06-20T12:38:33-0400

Answer to Question #90156 – Math – Combinatorics | Number Theory

Question

From 24 to 12943 how many numbers can be made such that 1, 3, 5 do not appear 3 or more than 3 times?

Solution

From 24 to 12943 there are


1294324+1=12920 numbers.12943 - 24 + 1 = 12920 \text{ numbers}.


From 24 to 12943 only the digit 1 can repeat five times, hence there is one number 11111.

From 24 to 12943 each of digits 1, 3, 5 can repeat four times and numbers 1111, 3333, 5555, 12111, 10111 satisfy this condition, then five numbers in total.

From 24 to 12943 among three-digit numbers integers 111, 333, 555 can appear three times, then three numbers in total.

From 24 to 12943 among four-digit numbers there are 27+27+27=8127+27+27=81 integers which appear three times, namely



From 24 to 12943 among five-digit numbers consider several cases.

Let the digit 1 in the number 10abc appears three times (1 occupies two places among a,b,ca, b, c, the third place may contain any digit out of 0, 2, 3, 4, 5, 6, 7, 8, 9), there are 28 numbers satisfying this condition, namely

10011 10211 10311 10411 10511 10611 10711 10811 10911

10101 10110 10111 10112 10113 10114 10115 10116 10117 10118 10119

10121 10131 10141 10151 10161 10171 10181 10191

Let the digit 1 in the number 11abc appears three times, there are 243 numbers satisfying this condition. To prove it, one has to consider two cases, namely,

1) the case where two positions excluding the digit 1 coincide (numbers 11aa1, 11a1a, 111aa), there are 39=273*9=27 numbers satisfying this condition;

2) the case where two positions excluding the digit 1 are different (numbers 11ab1, 111ab, 11a1b), there are 398=2163*9*8=216 numbers satisfying this condition.

In conclusion, 27+216=24327+216=243 numbers satisfy cases 1) or 2).

Let the digit 1 in the number 12abc appears three times (1 occupies two places among aa, bb, cc, the third place may contain any digit out of 0, 2, 3, 4, 5, 6, 7, 8, 9), there are 28 numbers satisfying this condition, namely

12011 12211 12311 12411 12511 12611 12711 12811 12911

12101 12110 12111 12112 12113 12114 12115 12116 12117 12118 12119

12121 12131 12141 12151 12161 12171 12181 12191

Therefore, there are


1+5+3+27+27+27+28+27+216+28=3891 + 5 + 3 + 27 + 27 + 27 + 28 + 27 + 216 + 28 = 389


numbers from 24 to 12943 such that 1, 3, 5 appear 3 or more than 3 times.

Therefore, there are


12920389=1253112920 - 389 = 12531


numbers from 24 to 12943 such that 1, 3, 5 do not appear 3 or more than 3 times.

Answer: 12531 numbers.

Answer provided by https://www.AssignmentExpert.com

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

Assignment Expert
20.06.19, 19:39

The answer is 12531.

Raghav
19.06.19, 21:44

Then what's the answer?

Assignment Expert
26.05.19, 17:11

We subtract the quantity of numbers which appear 3 or more than 3 times from the general quantity of numbers.

Sergey
25.05.19, 10:08

If this question from here https://www.geeksforgeeks.org/samsung-interview-experience-set-40-campus-white-box-testing/ then solution is not correct.

LATEST TUTORIALS
APPROVED BY CLIENTS