Hamiltonian Cycles on Symmetrical Graphs

74
Hamiltonian Cycles Hamiltonian Cycles on Symmetrical Graphs on Symmetrical Graphs Carlo H. Séquin EECS Computer Science Division University of California, Berkeley Bridges 2004, Winfield KS

description

Bridges 2004, Winfield KS. Hamiltonian Cycles on Symmetrical Graphs. Carlo H. Séquin EECS Computer Science Division University of California, Berkeley. Map of Königsberg. Can you find a path that crosses all seven bridges exactly once – and then returns to the start ?. - PowerPoint PPT Presentation

Transcript of Hamiltonian Cycles on Symmetrical Graphs

Page 1: Hamiltonian Cycles on Symmetrical Graphs

Hamiltonian CyclesHamiltonian Cycles on Symmetrical Graphson Symmetrical Graphs

Carlo H. Séquin

EECS Computer Science Division

University of California, Berkeley

Bridges 2004, Winfield KS

Page 2: Hamiltonian Cycles on Symmetrical Graphs

Map of KönigsbergMap of Königsberg

Can you find a path that crosses all seven bridges exactly once – and then returns to the start ?

Leonhard Euler (1707-83) says: NO ! (1735)– because there are vertices with odd valence.

Page 3: Hamiltonian Cycles on Symmetrical Graphs

DefinitionsDefinitions

Eulerian Path: Uses all edges of a graph.

Eulerian Cycle: A closed Eulerian Paththat returns to the start. END

START

Hamiltonian Path: Visits all vertices once.

Hamiltonian Cycle: A closed Ham. Path.

Page 4: Hamiltonian Cycles on Symmetrical Graphs

This is a Test … (closed book!)This is a Test … (closed book!)

What Eulerian / Hamiltonian Path / Cycle(s)does the following graph contain ?

Page 5: Hamiltonian Cycles on Symmetrical Graphs

Answer:Answer:

It admits an Eulerian Cycle !– but no Hamiltonian Path.

Page 6: Hamiltonian Cycles on Symmetrical Graphs

Another Example … (extra credit!)Another Example … (extra credit!) What paths/cycles exist on this graph?

No Eulerian Cycles: Not all valences are even.

Hamiltonian Cycles? – YES!

No Eulerian Paths: >2 odd-valence vertices.

= Projection of a cube (edge frame); Do other Platonic solids have Hamiltonian cycles ?

Page 7: Hamiltonian Cycles on Symmetrical Graphs

The Platonic Solids in 3DThe Platonic Solids in 3D

Hamiltonian Cycles ? Eulerian Cycles ?

Page 8: Hamiltonian Cycles on Symmetrical Graphs

The OctahedronThe Octahedron All vertices have valence 4.

They admit 2 paths passing through.

Pink edges form Hamiltonian cycle.

Yellow edges form Hamiltonian cycle.

The two paths are congruent !

All edges are covered.

Together they form a Eulerian cycle.

Are there other (semi-)regular polyhedra for which we can do that ?

Page 9: Hamiltonian Cycles on Symmetrical Graphs

The CuboctahedronThe Cuboctahedron

Hamiltonian cycleon polyhedron edges.

Flattened net ofcuboctahedronto show symmetry.

The cyan and the red cycles are congruent (mirrored)!

Page 10: Hamiltonian Cycles on Symmetrical Graphs

Larger ChallengesLarger Challenges

All these graphs have been planar … boring !

Our examples had only two Hamiltonian cycles.

Can we find graphs that are covered by three or more Hamiltonian cycles ?

Graphs need to have vertices of valence ≥ 6.

Can we still make those cycles congruent ?

Graphs need to have all vertices equivalent.

Let’s look at complete graphs,

i.e., N fully connected vertices.

Page 11: Hamiltonian Cycles on Symmetrical Graphs

Complete Graphs KComplete Graphs K55, K, K77, , andand K K99

5, 7, 9 vertices – all connected to each other.

Let’s only consider graphs with all even vertices,i.e., only K2i+1.

K5 K7 K9

Can we make the i Hamiltonian cycles in each graph congruent ?

Page 12: Hamiltonian Cycles on Symmetrical Graphs

Complete Graphs KComplete Graphs K22ii+1+1

K2i+1 will need i Hamiltonian cycles for coverage.

Arrange nodes with i-fold symmetry: 2i-gon C2i

Last node is placed in center.

The common Hamiltonian cycle for all K2i+1

Page 13: Hamiltonian Cycles on Symmetrical Graphs

Make Constructions in 3D …Make Constructions in 3D …

We would like to have highly symmetrical graphs.

All vertices should be of the same even valence.

All vertices should be connected equivalently.

Graph should allow for some symmetrical layout in 3D space.

Where can we obtain such graphs? From 4D!

(But don’t be afraid of the 4D source … This is really just a way of getting interesting 3D wire frames on which we can play Euler’s coloring game.

Page 14: Hamiltonian Cycles on Symmetrical Graphs

The 6 Regular Polytopes in 4DThe 6 Regular Polytopes in 4D

From BRIDGES’2002 Talk

Page 15: Hamiltonian Cycles on Symmetrical Graphs

Which 4D-to-3D Projection ??Which 4D-to-3D Projection ??

There are many possible ways to project the edge frame of the 4D polytopes to 3D.

Example: Tesseract (Hypercube, 8-Cell)

Cell-first Face-first Edge-first Vertex-first

Use Cell-first: High symmetry; no coinciding vertices/edges

Page 16: Hamiltonian Cycles on Symmetrical Graphs

4D Simplex: 2 Hamiltonian Paths4D Simplex: 2 Hamiltonian Paths

Two identical paths, complementing each other

C2

Page 17: Hamiltonian Cycles on Symmetrical Graphs

4D Cross Polytope: 3 Paths4D Cross Polytope: 3 Paths

All vertices have valence 6 !

C3

Page 18: Hamiltonian Cycles on Symmetrical Graphs

Hypercube: 2 Hamitonian CyclesHypercube: 2 Hamitonian Cycles

There are many different options:

Page 19: Hamiltonian Cycles on Symmetrical Graphs

The Most Satisfying Solution ?The Most Satisfying Solution ?

Each Path has its own C2-symmetry.

90°-rotationaround z-axischanges coloron all edges.

C4 (C2)

Page 20: Hamiltonian Cycles on Symmetrical Graphs

The 24-Cell Is More ChallengingThe 24-Cell Is More Challenging Valence 8:

-> 4 Hamiltonian pathsare needed !

Natural to consider one C4-axis for replicating the Hamiltonian cycles.

C4

Page 21: Hamiltonian Cycles on Symmetrical Graphs

24-Cell: Shell-based Approach24-Cell: Shell-based Approach

This is a mess …hard to deal with !

Exploiting the concentric shells:

5 families of edges.

Page 22: Hamiltonian Cycles on Symmetrical Graphs

Shell-Schedule for the 24-CellShell-Schedule for the 24-Cell

The 24 vertices lie on 3 shells.

Pre-color the shells individuallyobeying the desired symmetry.

Rotate shells against each other.

OUTER SHELL

MIDDLE SHELL

INNER SHELL

This is the visitation schedule for one Ham. cycle.

Page 23: Hamiltonian Cycles on Symmetrical Graphs

One Cycle – One Cycle – Showing Broken SymmetryShowing Broken Symmetry

Almost C2

Page 24: Hamiltonian Cycles on Symmetrical Graphs

CC22-Symmetry -Symmetry More than One Cycle! More than One Cycle!

C2

That is what I had to inspect for …

Page 25: Hamiltonian Cycles on Symmetrical Graphs

Path CompositionPath Composition

Page 26: Hamiltonian Cycles on Symmetrical Graphs

24-Cell: 4 Hamiltonian Cycles24-Cell: 4 Hamiltonian Cycles

Aligned:

4-fold symmetry

Page 27: Hamiltonian Cycles on Symmetrical Graphs

Why Shells Make Task EasierWhy Shells Make Task Easier

Decompose problem into smaller ones:

Find a suitable shell schedule;

Prepare components on shells compatible with schedule;

Find a coloring that fits the schedule and glues components together,by “rotating” the shells and connector edges within the chosen symmetry group.

Fewer combinations to deal with.

Easier to maintain desired symmetry.

Page 28: Hamiltonian Cycles on Symmetrical Graphs

Tetrahedral Symmetry on “0cta”-ShellTetrahedral Symmetry on “0cta”-Shell

C3*-rotations that keep one color in place, cyclically exchange the three other ones:

CC33**

CC33**CC33**

CC33**

Page 29: Hamiltonian Cycles on Symmetrical Graphs

““Tetrahedral” Symmetry for the 24-CellTetrahedral” Symmetry for the 24-Cell

Note that the same-colored edges are disconnected !

All shells must have the same symmetry orientation- this reduces the size of the search tree greatly.

Of course such a solution may not exist …

Page 30: Hamiltonian Cycles on Symmetrical Graphs

Another Shell-Schedule for the 24-CellAnother Shell-Schedule for the 24-Cell

Stay on each shell for only one edge at a time:

OUTER SHELL

MIDDLE SHELL

INNER SHELL

This is the schedule needed for overall tetrahedral symmetry !

Page 31: Hamiltonian Cycles on Symmetrical Graphs

Only 1/3 of the cycle needs to be found.(C3-axis does not go through any edges, vertices)

Exploiting Exploiting CC33-Symmetry-Symmetry for the 24-Cell for the 24-Cell

OUTER SHELL

MIDDLE SHELL

INNER SHELL

REPEATED UNIT

I/O-MIRROR

We can also use inside / outside symmetry,so only 1/6 of the cycle needs to be found !

Page 32: Hamiltonian Cycles on Symmetrical Graphs

One of the One of the CC33-symmetric-symmetric Cycles CyclesINSIDE-OUTSIDE SYMMETRY

Page 33: Hamiltonian Cycles on Symmetrical Graphs

INNER OCTA

That is actually how I first found the tetrahedral solution !

Pipe-Cleaner Models for the 24-CellPipe-Cleaner Models for the 24-Cell

CENTRAL

CUBOCTA

OUTEROCTA

Page 34: Hamiltonian Cycles on Symmetrical Graphs

Rapid Prototyping Model of the 24-CellRapid Prototyping Model of the 24-Cell

Noticethe 3-foldpermutationof colors

Made on the Z-corp machine.

Page 35: Hamiltonian Cycles on Symmetrical Graphs

3D Color Printer3D Color Printer (Z Corporation)(Z Corporation)

Page 36: Hamiltonian Cycles on Symmetrical Graphs

The Uncolored 120-CellThe Uncolored 120-Cell

120-Cell: 600 valence 4-vertices, 1200 edges

--> May yield 2 Hamiltonian cycles length 600.

Page 37: Hamiltonian Cycles on Symmetrical Graphs

Brute-force approach for the 120-CellBrute-force approach for the 120-Cell

Assign opposite edges different colors (i.e., build both cycles simultaneously).

Do path-search with backtracking.

Came to a length of 550/600, but then painted ourselves in a corner !(i.e., could not connect back to the start).

Perhaps we can exploit symmetryto make search tree less deep.

Thanks to Mike Pao for his programming efforts !

Page 38: Hamiltonian Cycles on Symmetrical Graphs

A More Promising ApproachA More Promising Approach

Clearly we need to employ the shell-based approach for these monsters!

But what symmetries can we expect ?

These objects belong to the icosahedral symmetry group which has 6 C5-axes and 10 C3-axes.

Can we expect the individual paths to have 3-fold or 5-fold symmetry ? This would dramatically reduce the depth of the search tree !

Page 39: Hamiltonian Cycles on Symmetrical Graphs

Simpler Model with Dodecahedral ShellsSimpler Model with Dodecahedral Shells

Just two shells (magenta) and (yellow)Each Ham.-path needs 15 edges on each shell,and 10 connectors (cyan) between the shells.

Page 40: Hamiltonian Cycles on Symmetrical Graphs

Dodecahedral Double ShellDodecahedral Double Shell

Colored by two congruent Hamiltonian cycles

Page 41: Hamiltonian Cycles on Symmetrical Graphs

Physical Model of Penta-Double-ShellPhysical Model of Penta-Double-Shell

Page 42: Hamiltonian Cycles on Symmetrical Graphs

The 600-CellThe 600-Cell

120 vertices,valence 12;

720 edges;

Make 6 cycles, length 120.

Page 43: Hamiltonian Cycles on Symmetrical Graphs

Search on the 600-CellSearch on the 600-Cell

Search by “loop expansion”:

Replace an edge in the current pathwith the two other edges of a triangleattached to the chosen edge.

Always keeps path a closed cycle !

This quickly worked for finding a full cycle.

Also worked for finding 3 congruent cycles of length 120.

When we tried to do 4 cycles simultaneously, we got to 54/60 using inside/outside symmetry.

Page 44: Hamiltonian Cycles on Symmetrical Graphs

Shells in the 600-CellShells in the 600-Cell

Number of segments of each type in each Hamiltonian cycle

INNERMOST TETRAHEDRON

OU

TE

RM

OS

T T

ET

RA

HE

DR

ON

CONNECTORS SPANNING THE CENTRAL SHELL

INSIDE / OUTSIDE SYMMETRY

Page 45: Hamiltonian Cycles on Symmetrical Graphs

Shells in the 600-CellShells in the 600-Cell

Summary of features:

15 shells of vertices

49 different types of edges:

4 intra shells with 6 (tetrahedral) edges,

4 intra shells with 12 edges,

28 connector shells with 12 edges,

13 connector shells with 24 edges.

Inside/outside symmetry

What other symmetries are there … ?

Page 46: Hamiltonian Cycles on Symmetrical Graphs

Start With a Simpler Model …Start With a Simpler Model …

Specifications:

All vertices of valence 12

Overall symmetry compatible with “tetra-6”

Inner-, outer-most shells = tetrahedra

No edge intersections

As few shells as possible …

…. This is tricky …

Page 47: Hamiltonian Cycles on Symmetrical Graphs

Icosi-Tetrahedral Double-Shell (ITDS)Icosi-Tetrahedral Double-Shell (ITDS)

Just 4 nested shells (192 edges):

Tetrahedron: 4V, 6E

Icosahedron: 12V, 30E

Icosahedron: 12V, 30E

Tetrahedron: 4V, 6E

total: 32VCONNECTORS

Page 48: Hamiltonian Cycles on Symmetrical Graphs

ITDS: The 2 Icosahedral ShellsITDS: The 2 Icosahedral Shells

Page 49: Hamiltonian Cycles on Symmetrical Graphs

The Complete ITDS: 4 shells, 192 edgesThe Complete ITDS: 4 shells, 192 edges

SHELLS CONNECTORS

TETRA

ICOSA

ICOSA

TETRA

Page 50: Hamiltonian Cycles on Symmetrical Graphs

One Cycle on the ITDSOne Cycle on the ITDS

SHELLS CONNECTORS

TETRA

ICOSA

ICOSA

TETRA

Page 51: Hamiltonian Cycles on Symmetrical Graphs

The Composite ITDSThe Composite ITDS

Page 52: Hamiltonian Cycles on Symmetrical Graphs

ITDS: Composite of 6 Ham. CyclesITDS: Composite of 6 Ham. Cycles

Page 53: Hamiltonian Cycles on Symmetrical Graphs

One Vertex of ITDS (valence 12)One Vertex of ITDS (valence 12)

Page 54: Hamiltonian Cycles on Symmetrical Graphs

Broken Part on Zcorp machineBroken Part on Zcorp machine

Icosi-tetrahedral Double Shell

Page 55: Hamiltonian Cycles on Symmetrical Graphs

What Did I Learn from the ITDS ?What Did I Learn from the ITDS ?

A larger, more complex modelto exercise the shell-based approach.

Shells, or subsets of edges cannot just be rotated as in the first version of the 24-Cell.

The 6-fold symmetry, corresponding to six differently colored edges on a tetrahedron,is actually quite tricky !

Not one of the standard symmetry groups.

What are the symmetries we can hope for ?

Page 56: Hamiltonian Cycles on Symmetrical Graphs

The Symmetries of the Composite ?The Symmetries of the Composite ? 4 C3 rotational axes (thru tetra vertices)

that permute two sets of 3 colors each.

Inside/outside mirror symmetry.

C3 (RGB, CMY)

C3 (RMY, CGB) C3 (GCY, MBR)

C3 (BCM, YRG)

Directionality !!

???

Page 57: Hamiltonian Cycles on Symmetrical Graphs

When Is I/O Symmetry Possible ?When Is I/O Symmetry Possible ?Hypothesis:

When the number of edges in one Ham. cycle that cross the central shell is 4i+2

The 600-Cell cannot accommodate I/O symmetry !

Page 58: Hamiltonian Cycles on Symmetrical Graphs

Basic Tetra -- truncated -- or beveled

Dual (mid-face) -- Dual truncated -- Mid-edge .

All Possible Shell Vertex PositionsAll Possible Shell Vertex Positions

Page 59: Hamiltonian Cycles on Symmetrical Graphs

All Possible Edge PatternsAll Possible Edge Patterns( shown on one tetrahedral face )

12

6

12+12

12

INTRA-SHELLEDGES

INTER-SHELLEDGES

Two completely independent sets

Constraints between2 edges of one cycle

Page 60: Hamiltonian Cycles on Symmetrical Graphs

0 1 2 3 4 5

Possible Colorings for Intra-Shell EdgesPossible Colorings for Intra-Shell Edges

Tetras with Offset Edges (12):

6 7 8 9 10 11

Basic Tetrahedron (4):

Page 61: Hamiltonian Cycles on Symmetrical Graphs

0+3(9) 1+7(10) 2+8(11) 3+0(6) 4+7(10) 5+8(11)

6+3(9) 7+1(4) 8+2(5) 9+0(6) 10+1(4) 11+2(5)

Inter-shell Edge ColoringsInter-shell Edge Colorings

Adding the second half-edge:

0 1 2 3 4 5

6 7 8 9 10 11

Always two options – but only 12 unique solutions!

Page 62: Hamiltonian Cycles on Symmetrical Graphs

Combinatorics for the ITDSCombinatorics for the ITDS

Total colorings: 6192 10149

Pick 192 / 6 edges: ( 192 ) 1037

Pick one edge at every vertex: 1232 1034

Assuming inside-out symmetry: 1216 1017

All shell combinations: 42 *5762 *126 *124 1017

Combinations in my GUI: 42 *576 *126 *124 1014

Constellations examined: 103 until success.

32

Page 63: Hamiltonian Cycles on Symmetrical Graphs

Comparison: Comparison: ITDSITDS 600-Cell600-Cell

Total Colorings: [10149] 6720 10560

Pick 120 edges: [1037] ( 720 ) 10168

Pick one edge at every vertex: [1034] 12120 10130

Hope for inside-out symmetry: [1017] 1260 1065

All shell combinations: [1017] 42 *124 *1254 1063

Shells with I/O symmetry: [1014] 4 *122 *1228 1032

Constellations to examine: [103] 10??

120

Page 64: Hamiltonian Cycles on Symmetrical Graphs

Where is the “Art” … ?Where is the “Art” … ?

Can these Math Models lead to something artistic as well ?

Any constructivist sculptures resulting from these efforts ?

Suppose you had to show the flow of the various Hamiltonian cycles without the use of color …

Page 65: Hamiltonian Cycles on Symmetrical Graphs

Complementary Bands in the 5-CellComplementary Bands in the 5-Cell

Page 66: Hamiltonian Cycles on Symmetrical Graphs

As a SculptureAs a Sculpture

Page 67: Hamiltonian Cycles on Symmetrical Graphs

Double Double VolutionVolution Shell Shell

Resulting from the two complementary Hamiltonian paths on cuboctahedron

Page 68: Hamiltonian Cycles on Symmetrical Graphs

As a SculptureAs a Sculpture

Page 69: Hamiltonian Cycles on Symmetrical Graphs

4D Cross Polytope4D Cross Polytope

Page 70: Hamiltonian Cycles on Symmetrical Graphs

As a Sculpture

Page 71: Hamiltonian Cycles on Symmetrical Graphs

ConclusionsConclusions

Finding a Hamiltonian path/cycle is an NP-hard computational problem.

Trying to get Eulerian coverage with a set of congruent Hamiltonian paths is obviously even harder.

Taking symmetry into account judiciously can help enormously.

Page 72: Hamiltonian Cycles on Symmetrical Graphs

Conclusions (2)Conclusions (2)

The simpler 4D polytopes yielded their solutions relatively quickly.

Those solutions actually do have nice symmetrical paths!

The two monster polytopes presented a much harder problem than first expected-- mostly because I did not understand what symmetries can truly be asked for.

Page 73: Hamiltonian Cycles on Symmetrical Graphs

Conclusions (3)Conclusions (3)

The 24-Cell, Double-Penta-Shell, andIcosi-Tetra Double Shell, have given me a much deeper understanding of the symmetry issues involved.

Now it’s just a matter of programming these insights into a procedural search to find the 2 remaining solutions.

The 24-Cell is really unusually symmetrical and the most beautiful of them all.

Page 74: Hamiltonian Cycles on Symmetrical Graphs

QUESTIONS ?QUESTIONS ?