Download presentation
Presentation is loading. Please wait.
Published byMeryem Emre Modified over 5 years ago
2
421 420 411 321 410 401 320 311 221 4 2 1 400 310 301 220 211 121 Each player can remove 1 or 2 pegs. Player who removes the last peg wins. 300 210 201 120 111 021 200 110 101 020 011 100 010 001 000
3
420 411 321 410 401 320 311 221 400 310 301 220 211 121 4 2 1 Each player can remove 1 or 2 pegs. Player who removes the last peg wins. 300 210 201 120 111 021 200 110 101 020 011 100 010 001 000
4
Determining P and N positions
5
421 Winning move! 420 411 321 410 401 320 311 221 4 2 1 400 310 301 220 211 121 Each player can remove 1 or 2 pegs. Player who removes the last peg wins. 300 210 201 120 111 021 200 110 101 020 011 100 010 001 000
6
421 420 411 321 410 401 320 311 221 4 2 1 400 310 301 220 211 121 Each player can remove 1 or 2 pegs. Player who removes the last peg wins. 300 210 201 120 111 021 200 110 101 020 011 100 010 001 000
7
421 420 411 321 410 401 320 311 221 4 2 1 400 310 301 220 211 121 Each player can remove 1 or 2 pegs. Player who removes the last peg wins. 300 210 201 120 111 021 200 110 101 020 011 100 010 001 000
8
421 420 411 321 410 401 320 311 221 4 2 1 400 310 301 220 211 121 Each player can remove 1 or 2 pegs. Player who removes the last peg wins. 300 210 201 120 111 021 200 110 101 020 011 100 010 001 000
9
421 420 411 321 410 401 320 311 221 4 2 1 400 310 301 220 211 121 Each player can remove 1 or 2 pegs. Player who removes the last peg wins. 300 210 201 120 111 021 200 110 101 020 011 100 010 001 000
10
421 420 411 321 410 401 320 311 221 4 2 1 400 310 301 220 211 121 Each player can remove 1 or 2 pegs. Player who removes the last peg wins. 300 210 201 120 111 021 200 110 101 020 011 100 010 001 000
11
421 420 411 321 410 401 320 311 221 4 2 1 400 310 301 220 211 121 Each player can remove 1 or 2 pegs. Player who removes the last peg wins. 300 210 201 120 111 021 200 110 101 020 011 100 010 001 000
12
421 Winning move! 420 411 321 410 401 320 311 221 4 2 1 400 310 301 220 211 121 Each player can remove 1 or 2 pegs. Player who removes the last peg wins. 300 210 201 120 111 021 200 110 101 020 011 100 010 001 000
13
17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 P- and N- positions in substraction game with set {2, 5, 8}. From state K there is a transition to the states K2, K5 and K8 (if those are non-negative).
14
Generate P and N positions in the substraction game with substraction set {2, 5, 8}.
1 9 8 7 6 5 4 3 2 1 9 8 7 6 5 4 3 2 1 9 8 7 6 5 4 3 2 1 8 5 2 8 2 5 8 2 5 8 2 5 8 2 5
15
Generate P and N positions in the substraction game with substraction set {2, 5, 8}.
1 9 8 7 6 5 4 3 2 1 9 8 7 6 5 4 3 2 1 9 8 7 6 5 4 3 2 1 8 2 5 8 2 5 8 2 5 8 2 5 8 2 5 8 2 5 etc...
16
Binary representation of positive integers in Fibonacci base
... 34 21 13 8 5 3 2 1 ... 55 34 21 13 8 5 3 2 1 N = N = 1 1 1 25 1 1 1 1 2 1 1 26 1 1 1 3 1 1 27 1 1 1 1 4 1 1 28 1 1 1 5 1 29 1 1 6 1 1 30 1 1 1 7 1 1 31 1 1 1 8 1 32 1 1 1 9 1 1 33 1 1 1 1 10 1 1 34 1 11 1 1 35 1 1 12 1 1 1 36 1 1 13 1 37 1 1 14 1 1 38 1 1 1 15 1 1 39 1 1 16 1 1 40 1 1 1 17 1 1 1 41 1 1 18 1 1 42 1 1 19 1 1 1 43 1 1 1 20 1 1 1 44 1 1 1 21 1 45 1 1 1 22 1 1 46 1 1 1 1 23 1 1 47 1 1 24 1 1 48 1 1 1
17
Fibonacci Nim: One pile of tokens. First player can remove 1 or more tokens but not all of them. Next, each player than can remove at most twice the number of tokens removed in his oponent's last move. Player who removes last token wins. base: ... 55 34 21 13 8 5 3 2 1 N = 25 1 1 1 1 26 1 1 1 27 1 1 1 1 28 1 1 1 29 1 1 30 1 1 1 31 1 1 1 32 1 1 1 Let: N be the current number of tokens. RemLim be maximum tokens which can be currently removed. Fmin be the rightmost base element present in N (rightmost 1). 33 1 1 1 1 34 1 35 1 1 36 1 1 37 1 1 38 1 1 1 39 1 1 40 1 1 1 Then: RemLim < Fmin P-position RemLim >= Fmin N-position 41 1 1 42 1 1 43 1 1 1 44 1 1 1 45 1 1 1 Rule: In N-position remove Fmin tokens. 46 1 1 1 1 47 1 1 48 1 1 1
18
RemLim < Fmin ....... P-position
RemLim >= Fmin N-position base: ... 55 34 21 13 8 5 3 2 1 N = 25 1 1 1 1 Example: Pile with 45 tokens. 26 1 1 1 27 1 1 1 1 28 1 1 1 First move: N = 45, RemLim = 44, Fmin = 3. RemLim >= Fmin .... N-position Remove Fmin: N = 45 3 = 42 29 1 1 30 1 1 1 31 1 1 1 32 1 1 1 33 1 1 1 1 34 1 35 1 1 Next move: The opponent can remove 1 to 6 tokens, that is, he can set the pile to 41, 40, 39, 38, 35, 35 tokens. All these are N-positions, because RemLim = 6, Fmin <= 5. 36 1 1 37 1 1 38 1 1 1 39 1 1 40 1 1 1 41 1 1 42 1 1 43 1 1 1 44 1 1 1 45 1 1 1 46 1 1 1 1 47 1 1 48 1 1 1
19
RemLim < Fmin ....... P-position
RemLim >= Fmin N-position base: ... 55 34 21 13 8 5 3 2 1 N = 25 1 1 1 1 Example continues: Opponent took 4. Pile with 38 tokens. 26 1 1 1 27 1 1 1 1 28 1 1 1 29 1 1 30 1 1 1 Next move: N = 38, RemLim = 8, Fmin = 1. RemLim >= Fmin .... N-position Remove Fmin: N = 38 1 = 37 31 1 1 1 32 1 1 1 33 1 1 1 1 34 1 35 1 1 36 1 1 Next move: The opponent can remove 1 or 2 tokens, that is, he can set the pile to 36 or 35 tokens. All these are N-positions, because RemLim = 2, Fmin <= 3. 37 1 1 38 1 1 1 39 1 1 40 1 1 1 41 1 1 42 1 1 43 1 1 1 44 1 1 1 45 1 1 1 46 1 1 1 1 47 1 1 48 1 1 1
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.