A puzzle problem of Digital VLSI design?

101 Views Asked by At

enter image description here

My thoughts:

Here price of chocolate is increasing in Geometric progression with common ratio 2 and first term 1, so on nth day price of chocolate will be $T_{n}=2^{n-1}$ irrespective of wheather child comes to buy it or not. But reward he gets is on basis of what net total sum of amount he have had spent on purchasing chocolate, if it is divisible by 3 then he will get reward else not. He can skip some days too, if sick, to fulfill reward condition.

Suppose on day one child went to buy chocolate he spent 1 dollar, on second day he went again and spent 2 dollar, now total cumulative dollar spent is 3 dollar for first two days which is divisible by 3 , so child will get reward on second day itself.

Also if he go to shop on first day and 4th day respectively skipping second, and third day (due to being sick) then total amount spent on the chocolate upto 4th day will be 9 dollar(1 dollar of first day+ 8 dollar of 4th day) which again is divisible by 3.

Also he will get reward if he goes to buy chocolate on 2nd and 3rd day, skipping 1st and day,then his total spend upto 3rd day will be 6 dollars ,again he will get reward

But i don't know how to generalise it, because there is no upper limit on number of days he went(like week/month/year anything) to shop. There are so many sample points. And instructor wants us to design Digital Sequential circuit for it. So, If possible give hints , or some of your thoughts as it would be very useful to me.

Thanks in advance.