OFFSET
1,2
COMMENTS
Each side of the hexagonal grid is tiled with n hexagons. A path starts at one vertex and ends at the diametrically opposite vertex. Each step comprises moving one cell down, one cell down-right or one cell up-right (no moving up or left).
LINKS
Matthew Blair, Rigoberto Flórez, and Antara Mukherjee, Honeycombs in the Hosoya Triangle, arXiv:2203.13205 [math.HO], 2022.
EXAMPLE
For n=2 there are 11 paths that cross diametrically opposite tiles in a honeycomb with 2 hexagons on each side. For n=3 there are 291 such paths.
PROG
(Python)
def paths(x, y, n):
if (x, y) in [(0, 0), (0, 1), (1, 0)]:
return 1
elif x == 0:
return paths(x, y - 1, n)
elif y == 0:
return paths(x - 1, y, n)
elif y == x + n - 1:
return paths(x, y - 1, n) + paths(x - 1, y - 1, n)
elif x == y + n - 1:
return paths(x - 1, y, n) + paths(x - 1, y - 1, n)
else:
return paths(x, y - 1, n) + paths(x - 1, y, n) + paths(x - 1, y - 1, n)
def honeycomb_paths(n):
return paths(2 * n - 2, 2 * n - 2, n)
CROSSREFS
KEYWORD
nonn,walk
AUTHOR
Alexandra S. Kim, Apr 21 2023
STATUS
approved