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
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 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 , 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 numbers satisfying this condition;
2) the case where two positions excluding the digit 1 are different (numbers 11ab1, 111ab, 11a1b), there are numbers satisfying this condition.
In conclusion, numbers satisfy cases 1) or 2).
Let the digit 1 in the number 12abc appears three times (1 occupies two places among , , , 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
numbers from 24 to 12943 such that 1, 3, 5 appear 3 or more than 3 times.
Therefore, there are
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
Comments
The answer is 12531.
Then what's the answer?
We subtract the quantity of numbers which appear 3 or more than 3 times from the general quantity of numbers.
If this question from here https://www.geeksforgeeks.org/samsung-interview-experience-set-40-campus-white-box-testing/ then solution is not correct.