A003042
Number of directed Hamiltonian cycles (or Gray codes) on n-cube.
Original entry on oeis.org
1, 2, 12, 2688, 1813091520, 71676427445141767741440
Offset: 1
- Martin Gardner, Knotted Doughnuts and Other Mathematical Entertainments. Freeman, NY, 1986, p. 24.
- Donald E. Knuth, The Art of Computer Programming, vol. 4A, Combinatorial Algorithms, (to appear), section 7.2.1.1.
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- Michel Deza and Roman Shklyar, Enumeration of Hamiltonian Cycles in 6-cube, arXiv:1003.4391 [cs.DM], 2010. [There may be errors - see Haanpaa and Ostergard, 2012]
- Harri Haanpaa and Patric R. J. Östergård, Counting Hamiltonian cycles in bipartite graphs, Math. Comp. 83 (2014), 979-995.
- John Jungck, Genetic Codes as Codes: Towards a Theoretical Basis for Bioinformatics, International Symposium on Mathematical and Computational Biology (BIOMAT 2008), see p. 19.
- Jerry Silverman, Virgil E. Vickers, and John L. Sampson, Statistical estimates of the n-bit Gray codes by restricted random generation of permutations of 1 to 2^n, IEEE Trans. Inform. Theory 29 (1983), no. 6, 894-901.
- Vladimir Shevelev, Combinatorial minors of matrix functions and their applications, arXiv:1105.3154 [math.CO], 2011-2014.
- Vladimir Shevelev, Combinatorial minors of matrix functions and their applications
- Eric Weisstein's World of Mathematics, Hamiltonian Cycle
- Eric Weisstein's World of Mathematics, Hypercube Graph
a(6) from Michel Deza, Mar 28 2010
a(6) corrected by Haanpaa and Östergård, 2012. -
N. J. A. Sloane, Sep 06 2012
A091299
Number of (directed) Hamiltonian paths (or Gray codes) on the n-cube.
Original entry on oeis.org
2, 8, 144, 91392, 187499658240
Offset: 1
a(1) = 2: we have 1,2 or 2,1. a(2) = 8: label the nodes 1, 2, ..., 4. Then the 8 possibilities are 1,2,3,4; 1,3,4,2; 2,3,4,1; 2,1,4,3; etc.
- M. Gardner, Knotted Doughnuts and Other Mathematical Entertainments. Freeman, NY, 1986, p. 24.
-
# A function that calculates A091299[n] from Janez Brank.
def CountGray(n):
def Recurse(unused, lastVal, nextSet):
count = 0
for changedBit in range(0, min(nextSet + 1, n)):
newVal = lastVal ^ (1 << changedBit)
mask = 1 << newVal
if unused & mask:
if unused == mask:
count += 1
else:
count += Recurse(
unused & ~mask, newVal, max(nextSet, changedBit + 1)
)
return count
count = Recurse((1 << (1 << n)) - 2, 0, 0)
for i in range(1, n + 1):
count *= 2 * i
return max(1, count)
[CountGray(n) for n in range(1, 4)]
a(5) from Janez Brank (janez.brank(AT)ijs.si), Mar 02 2005
A085452
Triangle T(n,k) read by rows: T(n,k) = number of cycles of length 2k in the binary n-cube, for n >= 2, k = 2, 3, ..., 2^(n-1).
Original entry on oeis.org
1, 6, 16, 6, 24, 128, 696, 2112, 5024, 5376, 1344, 80, 640, 6720, 68736, 591200, 4652160, 32146800, 185285120, 865894848, 3136412160, 8315531200, 14800412160, 15448366080, 7413471744, 906545760, 240, 2560, 39840, 698112, 12226560, 203258880, 3257746560
Offset: 2
Yuval Dekel (dekelyuval(AT)hotmail.com), Aug 12 2003
Triangle begins:
1,
6, 16, 6,
24, 128, 696, 2112, 5024, 5376, 1344,
80, 640, 6720, 68736, 591200, 4652160, 32146800, 185285120, 865894848, 3136412160, 8315531200, 14800412160, 15448366080, 7413471744, 906545760,
....
In terms of cycle polynomials:
x^4
6*x^4 + 16*x^6 + 6*x^8
24*x^4 + 128*x^6 + 696*x^8 + 2112*x^10 + 5024*x^12 + 5376*x^14 + 1344*x^16
...
- Initial terms computed by Daniele Degiorgi (danieled(AT)inf.ethz.ch).
-
Table[Table[Length[FindCycle[HypercubeGraph[n], {k}, All]], {k, 4, 2^n, 2}], {n, 4}] // Flatten (* Eric W. Weisstein, Mar 23 2020 *)
A091302
Number of equivalence classes of directed Hamiltonian cycles (or Gray codes) in the binary n-cube with one node marked.
Original entry on oeis.org
1, 1, 2, 112, 15109096, 99550593673808010752
Offset: 1
- D. E. Knuth, The Art of Computer Programming, vol. 4A, Combinatorial Algorithms, (to appear), section 7.2.1.1.
a(6) from Michel Deza, Mar 28 2010
a(6) corrected by Haanpaa and Östergård, 2012, who also provided a more precise definition. -
N. J. A. Sloane, Sep 06 2012
A003043
Number of Hamiltonian paths (or Gray codes) on n-cube with a marked starting node.
Original entry on oeis.org
1, 2, 18, 5712, 5859364320
Offset: 1
- M. Gardner, Mathematical Games, Sci. Amer. Vol. 228 (No. 4, Apr. 1973), p. 111.
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
A236602
Number of canonical Gray cycles of length 2n.
Original entry on oeis.org
1, 1, 1, 6, 4, 22, 96, 1344, 672, 3448, 12114, 158424, 406312, 4579440, 37826256, 906545760, 362618304, 1784113248, 5576251408, 68998853808, 154939065862
Offset: 1
a(5) = 4 since there are only these 4 CGC's of length 10:
{0 2 3 7 6 4 5 1 9 8}
{0 2 6 4 5 7 3 1 9 8}
{0 4 5 7 6 2 3 1 9 8}
{0 4 6 2 3 7 5 1 9 8}
-
A236602[n_] := Count[Map[lpf, Map[j0f, Permutations[Range[2 n - 1]]]], 0]/2;
j0f[x_] := Join[{0}, x, {0}];
btf[x_] := Module[{i},
Table[DigitCount[BitXor[x[[i]], x[[i + 1]]], 2, 1], {i,
Length[x] - 1}]];
lpf[x_] := Length[Select[btf[x], # != 1 &]];
Join[{1}, Table[A236602[n], {n, 2, 5}]]
(* OR, a less simple, but more efficient implementation. *)
A236602[n_, perm_, remain_] := Module[{opt, lr, i, new},
If[remain == {},
If[DigitCount[BitXor[First[perm], Last[perm]], 2, 1] == 1, ct++];
Return[ct],
opt = remain; lr = Length[remain];
For[i = 1, i <= lr, i++,
new = First[opt]; opt = Rest[opt];
If[DigitCount[BitXor[Last[perm], new], 2, 1] != 1, Continue[]];
A236602[n, Join[perm, {new}],
Complement[Range[2 n - 1], perm, {new}]];
];
Return[ct];
];
];
Join[{1}, Table[ct = 0; A236602[n, {0}, Range[2 n - 1]]/2, {n, 2, 8}] ](* Robert Price, Oct 25 2018 *)
A159344
Number of Hamiltonian cycles in the n-hypercube up to automorphism.
Original entry on oeis.org
1, 1, 1, 9, 237675, 777739016577752714
Offset: 1
There are six Hamiltonian cycles in the cube, but they are isomorphic so a(3) = 1.
- H. L. Abbott, Hamiltonian circuits and paths on the n-cube, Canad. Math. Bull., 9 (1966), pp. 557-562.
- Yury Chebiryak and Daniel Kroening, Towards a classification of Hamiltonian cycles in the 6-cube, Journal on Satisfiability, Boolean Modeling and Computation 4 (2008) pp. 57-74.
- I. J. Dejter and A. A. Delgado, Classes of Hamiltonian cycles in the 5-cube, J. Combinat. Math, Combinat. Comput, 61 (2007), pp. 81-95.
- R. J. Douglas, Bounds on the number of Hamiltonian circuits in the n-cube, Discrete Mathematics, 17 (1977), 143-146.
- E. N. Gilbert, Gray codes and paths on the n-cube, Bell Syst. Tech. J. 37 (1958), pp. 815-826.
- Harri Haanpaa and Patric R. J. Östergård, Counting Hamiltonian cycles in bipartite graphs, Math. Comp., 83 (2014), 979-995.
- Frank Ruskey, Combinatorial Generation (2003), see ch. 6.7.
- D. H. Smith, Hamiltonian circuits on the n-cube, Canadian Mathematical Bulletin 17 (1975), pp. 759-761.
A059783
Number of paths (without loops) in graph of n-dimensional hypercube starting at point (0,0,0,...,0) and ending at (1,1,1,...,1).
Original entry on oeis.org
1, 2, 18, 6432, 18651552840
Offset: 1
Avi Peretz (njk(AT)netvision.net.il), Feb 22 2001
a(2) = 2 because there are 2 paths: 00,01,11 and 00,10,11
Added a(5), based on http://teamikaria.com/4dforum/viewtopic.php?f=5&t=1211
Dmitry Kamenetsky, Aug 28 2009
A085408
Total number of cycles in the binary n-cube.
Original entry on oeis.org
0, 1, 28, 14704, 51109385408
Offset: 1
Yuval Dekel (dekelyuval(AT)hotmail.com), Aug 12 2003
- Computed by Daniele Degiorgi (danieled(AT)INF.ETHZ.CH).
-
Table[Total[Table[Length[FindCycle[HypercubeGraph[n], {k}, All]], {k, 4, 2^n, 2}]], {n, 4}] (* Eric W. Weisstein, Mar 24 2020 *)
A259839
Number of order-preserving Hamiltonian paths in the n-cube (Gray codes); see the comments for the precise definition of order-preserving.
Original entry on oeis.org
1, 1, 1, 1, 1, 10, 123, 1492723
Offset: 0
For n=4 the a(4)=1 solution is S_1={}, S_2={1}, S_3={1,2}, S_4={2}, S_5={2,3}, S_6={3}, S_7={3,4}, S_8={4}, S_9={2,4}, S_10={1,2,4}, S_11={1,4}, S_12={1,3,4}, S_13={1,3}, S_14={1,2,3}, S_15={1,2,3,4}, S_16={2,3,4}.
- C. Biro and D. Howard, The first three levels of an order preserving Hamiltonian path in the subset lattice, Order, 26(2):101-107, 2009.
- S. Felsner and W. Trotter, Colorings of diagrams of interval orders and alpha-sequences of sets, Discrete Math., 144(1-3):23-31, 1995.
- C. Savage and P. Winkler, Monotone Gray codes and the middle levels problem, J. Combin. Theory Ser. A, 70(2):230-248, 1995.
Showing 1-10 of 10 results.
Comments