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
A066037
Number of (undirected) Hamiltonian cycles in the binary n-cube, or the number of cyclic n-bit Gray codes.
Original entry on oeis.org
1, 1, 6, 1344, 906545760, 35838213722570883870720
Offset: 1
The 2-cube has a single cycle consisting of all 4 edges.
- 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]
- R. J. Douglas, Bounds on the number of Hamiltonian circuits in the n-cube, Discrete Mathematics, 17 (1977), 143-146.
- Harri Haanpaa and Patric R. J. Östergård, Counting Hamiltonian cycles in bipartite graphs, Math. Comp. 83 (2014), 979-995.
- Harary, Hayes, and Wu, A survey of the theory of hypercube graphs, Computers and Mathematics with Applications, 15(4), 1988, 277-289.
- Eric Weisstein's World of Mathematics, Hamiltonian Cycle
- Eric Weisstein's World of Mathematics, Hypercube Graph
-
Prepend[Table[Length[FindHamiltonianCycle[HypercubeGraph[n], All]], {n, 2, 4}], 1] (* Eric W. Weisstein, Apr 01 2017 *)
a(6) from Michel Deza, Mar 28 2010
a(6) corrected by Haanpaa and Östergård, 2012. -
N. J. A. Sloane, Sep 06 2012
A006069
Number of directed Hamiltonian cycles (or Gray codes) on n-cube with a marked starting node.
Original entry on oeis.org
2, 8, 96, 43008, 58018928640, 4587291356489073135452160
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,4,3,2; 2,3,4,1; 2,1,4,3; etc.
- M. Gardner, Knotted Doughnuts and Other Mathematical Entertainments. Freeman, NY, 1986, p. 24.
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- H. Haanpaa and Patric R. J. Östergård, Counting Hamiltonian cycles in bipartite graphs, Math. Comp. 83 (2014), 979-995.
- 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]
- D. Sensarma, S. S. Sarma, GMDES: A graph based modified Data Encryption Standard algorithm with enhanced security, IJRET: International Journal of Research in Engineering and Technology 03:03 (2014), 653-660. See Section 2.2.
- Eric Weisstein's World of Mathematics, Hamiltonian Cycle
- Eric Weisstein's World of Mathematics, Hypercube Graph
a(5) corrected by Jonathan Cross (jcross(AT)wcox.com), Oct 10 2001
a(6) from Michel Deza, Mar 28 2010
a(6) corrected by Haanpaa and Östergård, 2012. -
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).
A006070
Number of Hamiltonian paths on n-cube which are strictly not cycles.
Original entry on oeis.org
0, 0, 48, 48384, 129480729600
Offset: 1
There are no such paths for n=1 or n=2 (the square). For n = 3 every path has to end at the node of the cube that is diametrically opposite to the start. There are 16 choices for the start and for each start there are 3 Hamiltonian paths that end at the opposite node, so a(3) = 3*16 = 48.
- M. Gardner, Knotted Doughnuts and Other Mathematical Entertainments. Freeman, NY, 1986, p. 24.
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
a(5) from Greg Barton (greg_barton(AT)yahoo.com), May 24 2004
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
A284673
Number of (undirected) Hamiltonian paths in the n-hypercube graph Q_n.
Original entry on oeis.org
0, 1, 4, 72, 45696, 93749829120
Offset: 0
-
Table[Total[Flatten[Table[Length[FindPath[HypercubeGraph[n], i, j, {2^n - 1}, All]], {j, 2^n}, {i, j - 1}]]], {n, 0, 4}] (* Eric W. Weisstein, Apr 01 2017 *)
A342631
Number of Hamiltonian paths (or Gray codes) on n-cube with the origin as the starting node, up to a permutation of the coordinates.
Original entry on oeis.org
1, 1, 3, 238, 48828036
Offset: 1
For n=2, the two Hamiltonian paths of the square that start at (0,0), i.e.,
(0,0) -->-- (1,0) (0,0) (1,0)
| | |
V and V ^
| | |
(0,1) --<-- (1,1) (0,1) -->-- (1,1),
only account for one, as one is obtained from the other by the x <-> y permutation; so a(2) = 1.
A385185
Number of permutations of 0..n-1 which are binary Gray codes.
Original entry on oeis.org
1, 2, 2, 8, 4, 16, 24, 144, 36, 164, 192, 1168, 976, 5688, 10656, 91392, 11424, 67032, 61840, 403568, 258956, 1589080, 2520324, 22646880, 10898976, 67039504, 93326800, 819193248, 924489888, 7399407552, 16309883520, 187499658240, 11718728640
Offset: 1
For n=5, the a(5) = 4 possible permutations which are Gray codes are
1 3 2 0 4
2 3 1 0 4
4 0 1 3 2
4 0 2 3 1
For n=8, a(8) = 144 includes 0 1 3 2 6 4 5 7 which is lexicographically smallest, and also includes the binary reflected Graycode 0 1 3 2 6 7 5 4.
-
function N = Gcode(L); H = hmap; N = 0; unused = uint8([0: L-1]); for i = 1:length(unused); g = unused(i); u = unused; u(i) = []; gray(g, u); end
function gray(g, u); curidx = g(end) + 1; d = H(curidx,:); if isscalar(u); if d(u+1); N = N + 1; end; else for j = 1: length(u); r = u(j); if d(r+1); nextg = [g r]; nextu = u; nextu(j) = []; gray(nextg, nextu); end; end; end; end
function map = hmap; map = false(L, L); S = uint8([0:L-1]); [X,Y] = meshgrid(S); X = X(:); Y = Y(:);
xb = de2bi(X); yb = de2bi(Y); for k = 1:L^2; v = sum(bitxor(xb(k,:), yb(k,:))); if v == 1; map(k) = true; end; end; end; end
Showing 1-9 of 9 results.
Comments