Direction: Akshat and Akanksha were given some toffees and a bar of c...
In these types of games, one has to rely on backward induction.
Let (a,b) denote that there are 'a' and 'b' toffees in the two columns.
Since there is no constraint on how many toffees a person can pick up from a single column, the number of toffees left in a single column does not matter if the second column is empty. Hence to win, a player should never pick up all the toffees from a column. Since the players are playing logically and to win, they will never do this.
Hence on the second last turn, at least 1 toffee is left in each column.
But if a person wants to win, and leaves 1 toffee in one column and 2 or more toffees in the other, then the other player will just pick up one toffee from the column which has 2 toffees. Because of this, the first player will be forced to pick a toffee and a toffee will be left in the other column.
Hence if (1,1) toffees are left, the person whose turn it is next will lose.
But if he leaves 2 toffees two toffees in each column after his/her turn, then no matter how many toffees are picked up next, he/she will always win.
If the second person picks 1, the first has to pick 1 from the other column, leaving (1,1) toffees, which is a winning situation for the first.
The second player cannot pick up 2, as explained earlier that a logical player will not empty a column, as it means immediate defeat.
Hence if (2,2) toffees are left, the person whose turn it is next will lose.
Hence we can see the pattern that a person has to leave an equal number of toffees in each column after their turn to ensure winning. Hence a person must pick up the number of toffees which makes the toffees equal in both the columns.
Initially, the number of toffees were (7,5). So Akshat will pick up 2 toffees to make it (5,5).
After this, If Akanksha picks up 1 toffee, Akshat will also pick up 1 toffee, making it (4,4). The same will go on till (1,1) toffees are left. So after the first turn, Akshat will ensure that both of them pick up the same number of toffees. Hence Akshat will have picked up (2+5)=7 toffees and Akanksha will have picked up 5 toffees by the time the game ends.