30 thoughts on “PnC Examples 6

  1. In the first question, it’s specified not less than 200000 , and we are counting numbers less than this only? Why is it so , or either i didn’t understood the question .

  2. If we are allowed only 2 digits, 0 and 1, then the numbers we write will be only “base 2” numbers, correct? So If I ask you how many numbers of up to 3 digits can be written using only 0 and 1, we could list them out as follows 1, 10, 11, 100, 101, 110, 111 i.e. 7 numbers in all. But we could also say, we just need to write all numbers till 111 (the largest 3-digit number) in base 2. Now 111 in base 2 is nothing but 7 in base ten so we would say 7 such numbers.

    Similarly, if we had options of digits 0, 1, 2 and wanted to write numbers of up to 5 digits, then we could very well say we are writing numbers in base 3 (which uses digits 0, 1, 2) and the largest number is 22222. Now 22222 in base 3 translates to 242 in base 10, so we can say there will be 242 such numbers directly.


  3. In last question, the number formed is by using 0,7,8. Then also base 3 is considered. According to approach , base 3 can only be used when number formed is by 0,1,2( numbers less than base).

  4. @incessant: Whether it is 0 1 2 or 0 8 7 or 0 3 4 what we need to notice is, we are making use of just 3 digits. And in the question we need to find the number of numbers that can be formed.
    so the choice of numbers is not of importance, what is important is number of digits.
    So even if you are using 0 8 7 it basically drops down to the fact that we are forming numbers with 3 digits and we know in base 3 we can have a maximum of 3 digits.

  5. That’s a good method. Just out of curiosity, what do we do in case of a question like – How many numbers less than 50,000 can be formed using digits 1,2,3,4 and 5 ? How will we adjust 50,000 according to the base 5? Thanks.

    • Garima, in this case it would be simpler to just say 4 ways for 1st digit and 5 ways for each other = 4 * 5^4 = 2500 numbers. To go the base system route you would have to equate 0, 1, 2, 3, 4 with 1, 2, 3, 4, 5, and then say we wan’t number up to 40000 in base 5…could get confusing. We would use this kind of approach when the other methods get too messy, which isn’t the case here πŸ™‚


      • Oh okay. Yes, that would get quite confusing!! Thanks for such a quick response.

        Off the topic, but also wanted to say that your blog is really, really amazing. Do continue posting here, would love to find out more ways around the dreadful formulae πŸ˜€


  6. Hi J! Regarding the approach of including 0 in each digit places and getting all the possible combinations(like the last sum), is it imperative that 0 has to be there in given set of usable digits? e.g. in the last question with 0,7,8 digits, what if there was 7,8 and a non-zero number? I tried introducing 0 as a dummy and finding the possible cases but there are too many extraneous solutions to be taken out in the end. Is this a valid way? If so, what would be the ideal approach for this method? And I did find a similar question in one of the older comments, but it wasn’t clear if he mentioned this method particularly, so I’m re-posting this doubt. Kindly help me out.

    • Then we would just do 3^6 + 3^5 + 3^4 + 3^3 + 3^2 + 3^1 (no minus required as there is no case to be eliminated). No need of elaborate contortions πŸ™‚

      A suggestion: try it out for a smaller case, say 2 digits. That will give you a feel for how it works. Once you grasp the pattern you can always extend it further!

      You will find that with 0, 7, 8 you will get 7, 8, 70, 77, 78, 80, 87, 88 i.e. 8 cases (3^2 – 1). But for 3, 7, 8 it would be 3, 7, 8, 33, 37, 38, 73, 77, 78, 83, 87, 88 i.e. 12 numbers (3^2 + 3^1). Now try and figure out why (as in the underlying P&C behind the pattern)!


      • Thank you J, for such a quick reply! Yes. Got it. Introduction of a new 0 is not required, the problem is simple enough to be approached conventionally. And there is always a pattern I noticed. The number of solutions in each cases is in a G.P series. So need of listing out all the cases individually. Just the 1st term and number of terms is sufficient to find out the sum of the series!! Thanks a lot for the suggestion regarding the pattern recognition, this type of problems has become much simpler now!! πŸ™‚

  7. In the first question, why are we not considering 0 as a single digit number? The question asks about number not greater than 200000.

    • Because traditionally, the default for such questions is “natural numbers”. Else, we could include negative numbers or fractions or even irrationals and there would not be a finite answer!


  8. Sir…I saw a question where a person is named no-five because while counting he omits the multiples of 5.
    For example
    if there are 10 marbles…his total count will be 12
    if there are 13 marbles…his total count will be 16
    So the question was if there is a pile of 185 marbles…what will be his count?
    I tried to apply the base system logic as you have done in this post and in a few more posts as well…based on the number of digits available and which base system has same number of digits…like here in the question, we can use 1 2 3 4 6 7 8 9 digits I think…but I couldn’t get the answer.

    • This would not be a base system logic, I’m afraid. He is removing multiples of 5, not numbers containing the digit 5. So, in the 50s, for example, 51 would stay, only 50 and 55 would go.

      Here we could say numbers up to 185 include 37 multiples of 5. So that would increase his count to 222. But between 186 and 222 there would be another 7 multiples of 5 (from 190 to 220), bringing him to 229. But the new numbers contain one more multiple of 5 (225) bringing him to 230, which again gives one more multiple of 5. So finally he will end on 231, I guess!


      • Thanks for the quick response sir.
        231 is the answer.
        And I understood the reason for the base logic.
        Thanks again.

  9. Sir, in the last case, why are we working on base 3 for 0,7,8. Base 3 would use 0,1,2 clearly so won’t this drop down to base 9 as in (222222)in base 9, just like we did in earlier example of using digits 0,1,2,3,4 thus base 5 representation

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s