Our Teacher gave us the question as follows:
$10$ people ( five of them, let's call them group $A$, have $5$-valued coin each and the other five, group B, have $10$-valued coin each ) enter a ticket counter in a queue for purchasing tickets costing $5$-value. The Ticket Manager has no money initially. In how many ways can the people entering, be arranged such that all of them will be able to get one ticket?
I notice each step of assigning people their position in the queue gets more complex than previous step, so it could be solved through recursion. But I am noobie at recursive questions, so couldn't proceed. I could only say that number of $A's \geq$ number of $B's$ at every step. But how to interpret this in terms of a recursion relation?
NOTE:- $5$-value means something like $₹5$ or $\$5$. I didn't want to use a particular denomination.
Your problem is a queue arrangement problem. See Case -1 first place all the people, having rs 5 value coin, which can be done in 5!=120 ways, after them place all people having rs 10 value coin, which can be done again in 5!=120 ,ways. So entire queue can be arranged in 120120=14400,ways. Now look into, that first 5 will contribute a total of rs 25 to the ticket manager,having 5 coins having rs 5 value, so that he may return each one rs 5 ,by taking rs 10 value, for each ticket ,from next having rs 10 value coin each. Case -2 you may place persons having rs 5 and rs 10 value coins, alternatively,,so that first ticket manager get rs 5 for, selling a ticket, and then this rs 5, can be used for returning rs 5 , to the next person who gave rs 10 , for a ticket. Thus this arrangement can be made in 5!5!=120120=14400 , ways. Case -3 place two people having 5 value coins, then place two people having 10 value coin ,then place remaining 3 having 5 value coin ,and in the last place all 3 remaining 10 value coins, and see objective of the situation is satisfied. This can be done in 5C22!5C22!**3!3=144 00 ways. Case -4 first place 3with 5 value coins, then place 3 having 10 value coin, then place 2 remaing, with 5 value coins, and in last place remaining 2 with 10 ,value coin. Again objective of the problem is fulfilled. This can be done in 5C33!5C33!**2!2!=144 00 ways. Thus total number of arrangements = 414400=57600.ways.