A374810
Values k such that the two-player impartial {0,1}-Toggle game on a path P(k+2) = v(1)v(2)...v(k+2) with a (1^k,0,1)-weight assignment is a second-player winning game.
Original entry on oeis.org
1, 6, 7, 12, 13, 18, 23, 24, 38, 39, 44, 45, 50, 51, 56, 62, 77, 115, 121, 153, 312, 333, 350, 427, 553, 554, 579
Offset: 1
For n = 6, the {0,1}-Toggle game on P(8) with a (1,1,1,1,1,1,0,1)-weight assignment is a second-player winning game.
For n = 12, the {0,1}-Toggle game on P(14) with a (1,1,1,1,1,1,1,1,1,1,1,1,0,1)-weight assignment is a second-player winning game.
- E. R. Berlekamp, J. H. Conway, and R. K. Guy, Winning Ways for Your Mathematical Plays, Vol. 1, CRC Press, 2001.
- K. Barker, M. DeStefano, E. Fiorini, M. Gohn, J. Miller, J. Roeder, and T. W. H. Wong, Generalized Impartial Two-player Pebbling Games on K3 and C4, Journal of Integer Sequences, 27(5), 2024.
- Matthew Cohen, Python
- E. Fiorini, M. Lind, A. Woldar, and T. W. H. Wong, Characterizing Winning Positions in the Impartial Two-Player Pebbling Game on Complete Graphs, Journal of Integer Sequences, 24(6), 2021.
A374910
Values k such that the two-player impartial {0,1}-Toggle game on a path P(k+4) = v(1)v(2)...v(k+4) with a (1^k,0,1,0,1)-weight assignment is a second-player winning game.
Original entry on oeis.org
1, 25, 26, 31, 32, 37, 38, 63, 64, 69, 70, 76, 101, 102, 139, 145, 177, 189, 215, 235, 252, 253, 267, 284, 290, 305, 311, 328, 360, 668
Offset: 1
- E. R. Berlekamp, J. H. Conway, and R. K. Guy, Winning Ways for Your Mathematical Plays, Vol. 1, CRC Press, 2001.
- K. Barker, M. DeStefano, E. Fiorini, M. Gohn, J. Miller, J. Roeder, and T. W. H. Wong, Generalized Impartial Two-player Pebbling Games on K3 and C4, Journal of Integer Sequences, 27(5), 2024.
- Matthew Cohen, Python
- E. Fiorini, M. Lind, A. Woldar, and T. W. H. Wong, Characterizing Winning Positions in the Impartial Two-Player Pebbling Game on Complete Graphs, Journal of Integer Sequences, 24(6), 2021.
A374920
Values k such that the two-player impartial {0,1}-Toggle game on a path P(k+6) = v(1)v(2)...v(k+6) with a (1^k,0,1,0,1,0,1)-weight assignment is a second-player winning game.
Original entry on oeis.org
1, 6, 7, 12, 13, 18, 23, 24, 39, 44, 45, 50, 51, 57, 62, 77, 115, 281, 319, 350, 389
Offset: 1
- E. R. Berlekamp, J. H. Conway, and R. K. Guy, Winning Ways for Your Mathematical Plays, Vol. 1, CRC Press, 2001.
- K. Barker, M. DeStefano, E. Fiorini, M. Gohn, J. Miller, J. Roeder, and T. W. H. Wong, Generalized Impartial Two-player Pebbling Games on K3 and C4, Journal of Integer Sequences, 27(5), 2024.
- Matthew Cohen, Python
- E. Fiorini, M. Lind, A. Woldar, and T. W. H. Wong, Characterizing Winning Positions in the Impartial Two-Player Pebbling Game on Complete Graphs, Journal of Integer Sequences, 24(6), 2021.
A363934
Table read by ascending antidiagonals. T(n,k) is the Sprague-Grundy value for the Heat Toggle game played on an n X k grid where each vertex has initial weight 1.
Original entry on oeis.org
1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 0, 1, 0, 2, 0, 3, 1, 1, 3, 0, 3, 1, 3, 0, 3, 1, 3, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 2, 0, 2, 0, 2, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 3, 2, 2, 3, 1, 1
Offset: 1
The data is organized in a table beginning with row n = 1 and column k = 1. The data is read by ascending antidiagonals. T(2,3)=2.
The table T(n,k) begins:
[n/k] 1 2 3 4 5 6 ...
---------------------------------
[1] 1, 1, 1, 2, 2, 0, ...
[2] 1, 1, 2, 0, 3, 1, ...
[3] 1, 2, 1, 1, 3, 0, ...
[4] 2, 0, 1, 0, 1, 0, ...
[5] 2, 3, 3, 1, 2, 0, ...
[6] 0, 1, 0, 0, 0, ...
- E. R. Berlekamp, J. H. Conway, and R. K. Guy, Winning Ways for Your Mathematical Plays, Vol. 1, CRC Press, 2001.
-
SG_value_hash = {}
def MEX(S):
i = 0
while True:
if i not in S:
return i
i += 1
def SG_value(G):
global SG_value_hash
SG_value_hash = {}
ons = set(G.vertices())
offs = set()
return SG_value_helper(G, ons, offs)
def SG_value_helper(G, ons, offs):
ons_orig = ons.copy()
offs_orig = offs.copy()
child_SG_values = set()
for v in ons_orig:
vNeighborhood = set(G.neighbors(v))
neighNowOff = ons_orig.intersection(vNeighborhood)
neighNowOn = offs_orig.intersection(vNeighborhood)
if len(neighNowOff) >= len(neighNowOn):
ons.remove(v)
offs.add(v)
ons.update(neighNowOn)
offs -= neighNowOn
offs.update(neighNowOff)
ons -= neighNowOff
result = -1 # placeholder
encoded_position = str(offs)
if encoded_position in SG_value_hash:
result = SG_value_hash[encoded_position]
else:
result = SG_value_helper(G, ons, offs)
SG_value_hash[encoded_position] = result
ons.add(v)
offs.remove(v)
ons -= neighNowOn
offs.update(neighNowOn)
offs -= neighNowOff
ons.update(neighNowOff)
child_SG_values.add(result)
return MEX(child_SG_values)
for sum_of_both in range(2,11):
antidiagonal = []
for n in range(1, sum_of_both):
G = graphs.Grid2dGraph(n, sum_of_both-n)
antidiagonal.append(SG_value(G))
print(antidiagonal)
A364489
Values of n for which the Sprague-Grundy value of Heat-Charge Toggle on an (n+2)-vertex path with initial weights -1,1^n,-1 is evil for odd n or odious for even n.
Original entry on oeis.org
1, 4, 6, 9, 14, 22, 27, 30, 35, 41, 58, 59, 72, 84, 87, 89, 103, 105, 108, 124, 129, 141, 171, 258, 284, 407, 458, 11770548, 25146268, 27690032, 41693544, 55788270, 74838555, 86120064, 89811321, 95580294, 119784327, 139336981, 158776090, 160066751, 161102638, 181691114, 186919128
Offset: 1
For n = 4, the Sprague-Grundy value for a 6-vertex path is 2.
Note that n = 4 is even and 2 is odious (see A000069).
- E. R. Berlekamp, J. H. Conway, and R. K. Guy, Winning Ways for Your Mathematical Plays, Vol. 1, CRC Press, 2001.
Showing 1-5 of 5 results.
Comments