A pen costs Rs 11 and a notebook costs Rs 13. Find the number of ways in which a person can spend exactly Rs 1000 - Solution 2
You can check out a simpler solution here.
This one is a bit more complicated and uses modulo arithmetic.
The problem states:
- A pen costs ₹11.
- A notebook costs ₹13.
- We need to find the number of ways to spend exactly ₹1000 on these items.
Step 1: Formulating the equation
Let:
- be the number of pens.
- be the number of notebooks.
Then the equation to satisfy is:
where are non-negative integers.
Step 2: Finding integer solutions
We solve for in terms of :
For to be an integer, must be divisible by 11.
Let's determine valid values for by checking divisibility:
Since and , we get:
Multiplying both sides by the modular inverse of 2 modulo 11 (which is 6):
Thus, as long as .
Step 3: Finding valid values of
The maximum should satisfy:
So, the possible values of are:
Counting these, we get 7 valid values.
Conclusion:
Thus, the number of ways to spend exactly ₹1000 on pens and notebooks is 7.
Comments
Post a Comment