Suppose you have sufficient amount of rupee currency in three denomina...
1) 50 + 50 + 1 + 1 + 1 + 1 + 1 + 1 + 1
2) 50 + 10 +10+10+10+10+ 1 + 1 + 1 + 1 + 1 + 1 + 1
3) 50 + 10 + 10+10+10+ (17 *1)
∵17*1 means we use 1 rupees 17 times
4) 50 + 10 + 10 + 10 + 27*1
5) 50 + 10 +10 + 37*1
6) 50 +10 + 47*1
7) 50 + 57*1
8) 107*1
9) 10*10 + 7*1
here 10*10 mean we use 10 rupees 10 times
10) 10*9 + 17*1
11) 10*8 + 27*1
12) 10*7 + 37*1
13) 10*6 + 47*1
14) 10*5 + 57*1
15) 10*4 + 67*1
16) 10*3 + 77*1
17) 10*2 + 87*1
18) 10*1 + 97*1
So there are total 18 ways to pay for bill
Suppose you have sufficient amount of rupee currency in three denomina...
Solution:
To pay a bill of Rs. 107, we can use different combinations of Rs. 1, Rs. 10 and Rs. 50 notes.
Let's consider the number of Rs. 50 notes we can use:
- We can use 0, 1 or 2 Rs. 50 notes.
- If we use 2 Rs. 50 notes, we need to pay the remaining Rs. 7 using Rs. 1 and Rs. 10 notes.
- If we use 1 Rs. 50 note, we need to pay the remaining Rs. 57 using Rs. 1 and Rs. 10 notes.
- If we use 0 Rs. 50 note, we need to pay the entire Rs. 107 using Rs. 1 and Rs. 10 notes.
Now, let's consider the number of Rs. 10 notes we can use:
- If we use 2 Rs. 50 notes, we cannot use any Rs. 10 notes as it will exceed the bill amount.
- If we use 1 Rs. 50 note, we can use 0, 1 or 2 Rs. 10 notes to pay the remaining amount.
- If we use 0 Rs. 50 note, we can use 0 to 10 Rs. 10 notes to pay the amount.
Finally, let's consider the number of Rs. 1 notes we can use:
- If we use 2 Rs. 50 notes, we need to use 7 Rs. 1 notes to pay the remaining amount.
- If we use 1 Rs. 50 note and 2 Rs. 10 notes, we need to use 37 Rs. 1 notes to pay the remaining amount.
- If we use 1 Rs. 50 note and 1 Rs. 10 note, we need to use 47 Rs. 1 notes to pay the remaining amount.
- If we use 1 Rs. 50 note and 0 Rs. 10 notes, we need to use 57 Rs. 1 notes to pay the remaining amount.
- If we use 0 Rs. 50 note and 10 Rs. 10 notes, we need to use 47 Rs. 1 notes to pay the remaining amount.
- If we use 0 Rs. 50 note and 9 Rs. 10 notes, we need to use 57 Rs. 1 notes to pay the remaining amount.
- If we use 0 Rs. 50 note and 8 Rs. 10 notes, we need to use 67 Rs. 1 notes to pay the remaining amount.
- If we use 0 Rs. 50 note and 7 Rs. 10 notes, we need to use 77 Rs. 1 notes to pay the remaining amount.
- If we use 0 Rs. 50 note and 6 Rs. 10 notes, we need to use 87 Rs. 1 notes to pay the remaining amount.
- If we use 0 Rs. 50 note and 5 Rs. 10 notes, we need to use 97 Rs. 1 notes to pay the remaining amount.
- If we use 0 Rs. 50 note and 4 Rs. 10 notes, we need to use 107 Rs. 1 notes to pay the remaining amount.
- If we use