Okay so I've been going crazy about this problem I was given. It is as follows:
Given a pile of N matches, 2 people take turns removing matches from the pile. When it is your turn you are allowed remove 1, 5 or 6 matches. If it is your turn and you are unable to make a move then the game is over and you have lost.
The idea is to develop a strategy where you can always win. Note that you can always decides who goes first.
Not sure if I'm even on the right track but currently I can guarantee that if it is my go and then I remove 1, 5 or 6 matches, leaving my opponent with 22 matches I will win. But unsure how to guarantee that this situation will arise.
Any help would be appreciated even if it's just a reassurance that it is possible because I've spent hours within the last 2 days and still can't come up with a winning strategy that works all the time.