Anda di halaman 1dari 28

See

discussions, stats, and author profiles for this publication at: https://www.researchgate.net/publication/259600242

Counting Hamiltonian cycles on triangular grid


graphs (presentation)

Data · January 2014

CITATIONS READS

0 37

2 authors, including:

Sergey Perepechko
Petrozavodsk State University
50 PUBLICATIONS 29 CITATIONS

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Near-perfect matchings View project

Perfect matchings and dimer problem View project

All content following this page was uploaded by Sergey Perepechko on 08 January 2014.

The user has requested enhancement of the downloaded file.


Counting Hamiltonian Cycles
on Triangular Grid Graphs

Artem M. Karavaev, Sergey N. Perepechko

IV International Conference
Simulation—2012

May 16–18, 2012, Kiev


Standard monographs on lattice models 2

J. des Cloizeaux, G. Jannink. Polymers in


Solution: Their Modelling and Structure. Clarendon
Press, Oxford, 1990.

Carlo Vanderzande. Lattice Models of Polymers.


Cambridge University Press, 1998.
Rectangular grids and their modifications 3
as product graphs

Pm × Pn Cm × Pn Cm × Cn
Why triangular lattice models are so important?4
M. Peto, T. Z. Sen, R. L. Jernigan, A.
Kloczkowski. Generation and enumeration of
compact conformations on the two-dimensional
triangular and three-dimensional fcc lattices. Journal
of Chemical Physics, 2007. Vol. 127.

R. Agarwala, S. Batzoglou, V. Dančı́k,


S. E. Decatur, S. Hannenhalli, M. Farach, S.
Muthukrishnan, S. Skiena Local Rules for
Protein Folding on a Triangular Lattice and
Generalized Hydrophobicity in the HP model. Journal
of Computational Biology, 1997. Vol. 4.
Triangular grid graph Tm,n 5
















 n




















































m
Why parallelogramms? 6

• Any Tm,n has Hamiltonian cycle (m, n > 1).


• There are known data sets
for small values of m and n.
• Exact solution can be found
using tranfer matrix method.
Hamiltonian cycle on T7,5 graph 7
Known results 8
M. Peto, T. Z. Sen, R. L. Jernigan, A.
Kloczkowski. Generation and enumeration of
compact conformations on the two-dimensional
triangular and three-dimensional fcc lattices. Journal
of Chemical Physics. 2007. Vol. 127 (044101).

T3,n for n = 2, . . . , 20 using T -matrix method.



T4,n for n = 2, . . . , 8
using “backtrack” method.
T5,n for n = 2, . . . , 5
Known results (cont.) 9
The number of Hamiltonian cycles on Tm,n

m
n
3 4 5
2 1 1 1
3 4 13 44
4 13 80 549
5 44 549 7 104
6 148 3 851 ?
7 498 26 499 ?
8 1 676 183 521
9 5 640 ?
10 18 980
··· ···
19 1 050 578 720
20 3 535 439 040
Transfer matrix method 10
Basics
Hm (n) — number of cycles in Tm,n . (m is fixed.)
Construct T -matrix of degree Km
m → Tm .
Calculate powers of T -matrix up to 2Km
Tm1 , Tm2 , . . . , Tmn , . . . , Tm2Km
Reconstruct every Hm (n) out of Tmn
Hm (1), Hm (2), . . . , Hm (n), . . . , Hm (2Km )
Cayley — Hamilton theorem guarantees existence of recurrence
Nm
X
Hm (n) = cm (k)Hm (n − k), Nm 6 Km .
k=1
Cycle construction 11
Сonnectivity states for Pm × Pn
Any state can be coded
using symbols
over alphabet {‘(’,‘)’,‘0’}
( ( 0 0 ) )
1 2 3 4 5 6

| {z }
m is fixed
Number of connectivity states for Pm × Pn 12
Direct implementation
D. J. Klein Asymptotic distributions for self-avoiding walks
constrained to strips, cylinders, and tubes. Journal of
Statistical Physics, 1980. Vol. 23. No. 5. P. 561–586.
T. G. Schmalz, G. E. Hite, D. J. Klein. Compact
self-avoiding circuits on two-dimensional lattices. Journal of
Physics A: Math. and Gen., 1984. Vol. 17. P. 445–453.
bm/2c   r
X m 3
Mm = Ck ∼ · 3m ,
k=0
2k 4πm3
where Ck is the k-th Catalan number:
 
1 2k
Ck = .
k +1 k
Compression of T -matrix 13
P. H. Lundow. Compression of transfer matrices. Discrete
Mathematics, 2001. Vol. 231. P. 321–329.
A. Kloczkowski, R. L. Jernigan. Transfer matrix method
for enumeration and generation of compact self-avoiding
walks. I. Square lattices. Journal of Chemical Physics, 1998.
Vol. 109. P. 5134–5146.
For even m (odd values of m give the similar asymptotics):
m/2    m/2  2 √
1X k m/2 1X m/2 9 3
+ Ck ∼ 2
· 3m .
2 k=0 dk/2e k 2 k=0 k 2πm
Cycle construction 14
Сonnectivity states for Tm,n
Any state can be coded
using symbols
over alphabet {‘(’,‘)’,‘0’, ‘*’}

( * 0 * * )
1 2 3 4 5 6
× × ×

| {z }
m is fixed
Estimation of the number 15
of connectivity states for Tm,n
bm/2c  
X m m−2k 4
Sm = Ck 2 = Cm+1 ∼ √ · 4m .
2k πm 3
k=0

m Sm Number of States
3 14 6
4 42 21
5 132 75
6 429 266
7 1 430 938
8 4 862 3 305
9 16 796 11 679
10 58 786 41 479
11 208 012 148 203
12 742 900 532 841
13 2 674 440 1 927 445
14 9 694 845 7 012 214
Parallel algorithm 16
Case of 32 cores

— Counting thread.
— Additional thread for reconstructing a part of T -matrix.
How to find recurrence? 17
We have a sequence
[a1 , a2 , . . . , an , . . .]
Let N be the order of a recurrence.
N
X
an = ck an−k , n > N.
k=1

Coeffitients ck can be found from the solution of linear system




 aN+1 = c1 aN + c2 aN−1 + · · · + cN a1 ,

N+2 = c1 aN+1 + c2 aN + · · · + cN a2 ,
a

 ···

a2N = c1 a2N−1 + c2 a2N−2 + · · · + cN aN .

First 2N elements of the sequence are required.


Here we have a problem. . . 18
Elements of Hm (n) sequences are huge.
For example, for m = 10, recurrence has order 5 175
and H10 (10 000) > 1027 500 .
We use p-adic expantions to get exact solution of linear system.
J. D. Dixon. Exact solution of linear equations using p-adic
expansions. Numerische Mathematik, 1982. Vol. 40.
P. 137–141.
To solve Ax = b follow three basic stages
1. Inverse Matrix: Find A−1 (mod p).
2. Lifting: Find x such as Ax ≡ b (mod p M ).
3. Restore: Restore x — exact solution of Ax = b.
Approximation order M depends on “length” of unknown
answer x. p = 231 − 1 is an obvious choice for 64-bit processor.
Results 19
Number of States Order of
m µm λm
Pm × Pn Tm,n recurrence
3 3 6 1.018 939 · 10−1 3.365 230 · 100 3
4 6 21 3.497 242 · 10−2 6.918 194 · 100 11
5 12 75 1.282 274 · 10−2 1.417 168 · 101 27
6 23 266 4.101 185 · 10−3 3.049 023 · 101 77
7 62 938 1.405 919 · 10−3 6.445 063 · 101 210
8 109 3 305 4.967 203 · 10−4 1.354 573 · 102 610
9 365 11 679 1.753 253 · 10−4 2.850 716 · 102 1 768
10 607 41 479 6.237 128 · 10−5 5.944 194 · 102 5 175
11 2 355 148 203 2.237 555 · 10−5 1.259 130 · 103 —
12 3 774 532 841 8.066 002 · 10−6 2.643 830 · 103 —
13 16 020 1 927 445 2.919 617 · 10−6 5.549 491 · 103 —
14 25 188 7 012 214 1.060 810 · 10−6 1.164 503 · 104 —

Hm (n) ∼ µm · λnm , n → ∞.
8%
µ10 ·λ10
10 ≈ 3.434 902·10
23
≈ H10 (10) = 373 334 515 946 952 014 204 102.
Linear recurrence for m = 3 20
Hm (n) — The number of Hamiltonian cycles on Tm,n grid graph.

H3 (n) = 2H3 (n − 3) + 4H3 (n − 2) + 2H3 (n − 1), n > 5.

This sequence begins with

H3 (1) = 0, H3 (2) = 1, H3 (3) = 4, H3 (4) = 13.

Generating function is
z(z + 1)2
G3 (z) = .
1 − 2z − 4z 2 − 2z 3

H3 (n) ∼ µ3 λn3 , n → ∞,
where
√ √
 q q 
1 3 3
λ3 = 2 + 71 + 3 105 + 16/ 71 + 3 105 ≈ 3.365 230.
3
Linear recurrence for m = 4 21

H4 (n) = H4 (n − 11) − 10H4 (n − 10) + 39H4 (n − 9) −


− 81H4 (n − 8) + 83H4 (n − 7) − 26H4 (n − 6) − 47H4 (n − 5) −
− 5H4 (n − 4) + 44H4 (n − 3) + 21H4 (n − 2) + 3H4 (n − 1), n > 13.

This sequence begins with

H4 (1) = 0, H4 (2) = 1, H4 (3) = 13, H4 (4) = 80, H4 (5) = 549,


H4 (6) = 3 851, H4 (7) = 26 499, H4 (8) = 183 521, H4 (9) = 1 269 684,
H4 (10) = 8 782 833, H4 (11) = 60 764 640, H4 (12) = 420 375 910.
Linear recurrence for m = 5 22

H5 (n) = −8H5 (n − 27) + 80H5 (n − 26) + 328H5 (n − 25) −


− 2 640H5 (n − 24) − 3 660H5 (n − 23) + 14 496H5 (n − 22) +
+ 14 756H5 (n − 21) − 138 559H5 (n − 20) − 156 248H5 (n − 19) +
+ 182 412H5 (n − 18) + 24 764H5 (n − 17) + 284 641H5 (n − 16) +
+ 147 404H5 (n − 15) − 361 330H5 (n − 14) + 174 728H5 (n − 13) −
− 429 661H5 (n − 12) + 263 340H5 (n − 11) − 98 380H5 (n − 10) +
+ 102 564H5 (n − 9) − 16 019H5 (n − 8) + 9 700H5 (n − 7) −
− 11 310H5 (n − 6) − 1 628H5 (n − 5) − 160H5 (n − 4) +
+ 384H5 (n − 3) + 62H5 (n − 2) + 8H5 (n − 1), n > 32.
Initial segment of H5(n) sequence 23
n H5 (n) n H5 (n)
1 0 17 480 998 063 196 253 650
2 1 18 6 816 550 836 218 124 869
3 44 19 96 601 974 078 400 509 612
4 549 20 1 369 012 239 935 377 295 854
5 7 104 21 19 401 203 058 253 673 198 258
6 104 100 22 274 947 636 268 050 621 400 764
7 1 475 286 23 3 896 469 848 341 602 644 039 976
8 20 842 802 24 55 219 522 831 075 639 350 876 744
9 295 671 198 25 782 553 393 257 523 404 353 337 072
10 4 190 083 085 26 11 090 096 073 215 866 151 573 834 374
11 59 374 628 434 27 157 165 289 898 796 544 200 350 430 624
12 841 470 846 944 28 2 227 296 155 585 971 455 156 172 389 428
13 11 925 007 688 342 29 31 564 527 815 820 044 279 227 403 214 372
14 168 996 943 899 738 30 447 322 379 530 320 420 841 684 880 901 414
15 2 394 974 040 514 288 31 6 339 309 505 792 160 540 792 742 125 116 082
16 33 940 795 571 394 262 32 89 838 664 125 016 756 891 020 466 929 250 678
24

Thank you
for your attention!

Contacts:
http://www.flowproblem.ru
persn@aport.ru
Roots of characteristic polynom for m = 6 25

All roots are simple.


Asymptotics for m = 6 26
More information 27
about coding of states on Pm × Pn

Караваев А. М. Кодирование состояний в


методе матрицы переноса для подсчета
гамильтоновых циклов на прямоугольных
решетках, цилиндрах и торах. Информационные
процессы, 2011. Т. 11. №4. С. 476–499. URL:
http://www.jip.ru/2011/11-4-2011.htm.

View publication stats

Anda mungkin juga menyukai