Q1. Player 1 should start with 1 stone from either pile 1, pile 3, or pile 5.www.ddhw.com
Case 1. with 0,1,1,1,1 left. There are 2 sub-cases for player 2.
1) Player 2 takes 1 stone. Then player will take 1 stone and have the remaining stone in the form of either (0,1,0,1,0) or (0,0,1,0,1). Player 1 wins.www.ddhw.com
2) Player 2 moves 1 stone. Three variations:www.ddhw.com
(0,0,2,1,1) -> (0,0,2,0,2)
(0,1,1,0,2) -> (0,0,2,0,2)www.ddhw.com
(0,1,0,2,1) -> (0,1,0,1,2) -> (0,1,0,0,3) -> (0,0,1,0,3)
Case 2. with 1,1,0,1,1 left. 2 sub-cases.www.ddhw.com
1) Player 2 takes 1 stone. Then player will take 1 stone and have the remaining stone in the form of either (0,1,0,1,0) or (1,0,0,0,1). Player 1 wins.www.ddhw.com
2) Player 2 moves 1 stone. Three variations:
(0,2,0,1,1) -> (0,2,0,0,2)www.ddhw.com
(1,1,0,0,2) -> (0,2,0,0,2)www.ddhw.com
(1,0,1,1,1) -> (0,1,1,1,1) (Case 1)
Case 3. with 1,1,1,1,0 left. 2 sub-cases.www.ddhw.com
1) Player 2 takes 1 stone. Then player will take 1 stone and have the remaining stone in the form of either (1,0,1,0,0) or (0,1,0,1,0). Player 1 wins.www.ddhw.com
2) Player 2 moves 1 stone. Four variations:
(1,1,1,0,1) -> (1,1,0,1,1) (Case 2)www.ddhw.com
(1,1,0,2,0) -> (0,2,0,2,0)www.ddhw.com
(0,2,1,1,0) -> (0,2,0,2,0)
(1,0,2,1,0) -> (1,0,1,2,0) -> (1,0,0,3,0) -> (0,1,0,3,0).
www.ddhw.com
Q2. Player can only take 1 stone from the first pile. With (0,1,1,1,1) left, 2 sub-cases:www.ddhw.com
1) Player 2 moves 1 stone. Then player 1 will move 1 stone, resulting either (0,0,2,0,2) or (0,0,0,2,2).www.ddhw.com
2) Player 2 takes 1 stone. Then player 1 also takes 1 stone, resulting either (0,1,0,1,0) or (0,0,1,0,1).