Questions tagged [hamiltonian-path]

A path in a graph that visits each vertex exactly once.

A Hamilton path (or Hamiltonian path) in a graph is a path that visits each vertex exactly once. Similarly, a Hamilton cycle in a graph is a cycle that visits each vertex exactly once.

We can talk about directed and undirected Hamilton paths/cycles, within directed and undirected graphs.

The Hamilton path problem, i.e., determining whether or not an input graph has a Hamilton path, is NP-Complete.

652 questions
26
votes
3 answers

How many knight's tours are there?

The knight's tour is a sequence of 64 squares on a chess board, where each square is visted once, and each subsequent square can be reached from the previous by a knight's move. Tours can be cyclic, if the last square is a knight's move away from…
26
votes
0 answers

Proving the number circle internet meme, where sum of each adjacent numbers is a perfect square

I came across this internet meme and one of my friend mentioned that he thinks that such number circle would always exists for any big enough integer. We tried to prove the hypothesis, but could not find a proof. We defined the circle to be a…
IChung
  • 361
  • 2
  • 4
25
votes
4 answers

Minimal path to touch every square's area in an n by n grid

Consider an $n$ by $n$ square subdivided into unit squares. What is the shortest path you can take through the square that touches every unit square? Touching the edges/vertices of the squares is sufficient, the path can be of any shape, with any…
24
votes
5 answers

Prove that every tournament contains at least one Hamiltonian path.

A tournament is a directed graph with exactly one edge between every pair of vertices. (So for each pair (u,v) of vertices, either the edge from u to v or from v to u exists, but not both.) You can think of the nodes as players in a…
a1234
  • 243
18
votes
2 answers

Proof of Hamiltonian Cycle in a Complete Bipartite Graph

A complete Bipartite graph $K_{m,n}$ has a Hamiltonian cycle if and only if $m=n$. I want to know if the following proof technique is correct. My proof will consider using proof by contradiction. Assume that $m\not = n$. Let $H$ be the (Hamilton)…
Zee
  • 403
16
votes
1 answer

Covering pairs with permutations

Consider an $n \times n$ matrix $M_n$ with the following properties: Each row is a permutation of $A_n \equiv \{1, 2, ..., n\}$. Every ordered pair $(i,j)$, $i,j \in A_n$, $i \neq j$, appears as a horizontally adjacent pair in $M_n$ exactly once…
13
votes
1 answer

Who has a winning strategy in the hamilton-circle-game?

The game starts with a graph with $n$ vertices and no edges. The players alternately add edges until the graph contains a hamilton-circle. The player who made the last move loses. Who has a winning strategy in this game depending on the number of…
12
votes
2 answers

Can a bipartite graph have many Hamiltonian paths but no Hamiltonian cycle?

Can a bipartite graph with at least three vertices have the following properties simultaneously: Every vertex is the initial vertex of some Hamiltonian path. The graph contains no Hamiltonian cycle. I found out that this is only possible if the…
Peter
  • 86,576
11
votes
1 answer

Zelda - Oracle of Ages tiles rooms puzzles: how can you prove if there are/aren't solutions?

In the Oracle games of Legend of Zelda, there are some puzzle rooms of this kind: You are the green character on the bottom left. As you enter the room, all tiles (except for one, in yellow) are blue. The rules are: You are assigned a designated…
Pan Pops
  • 161
11
votes
3 answers

Hamilton paths/cycles in grid graphs

Let G be a grid graph with m rows and n columns, i.e. m = 4, n = 7 is shown here: For what values of m and n does G have a Hamilton path, and for what values of m and n does G have a Hamilton cycle? So far I've figured out that a grid graph…
Jim Jj
  • 187
10
votes
0 answers

How many hamilton paths can a non-hamiltonian graph have?

What is the maximum number of hamilton paths a graph with $n$ vertices can have without having a hamiton cycle ? If my turbo pascal program works well, the first few values for $3,4,...$ vertices are $2,4,12,48,240$ , which approves the conjecture…
Peter
  • 86,576
10
votes
1 answer

All 4-connected planar graphs are Hamiltonian-connected

I started reading Thomassen's paper A Theorem on Paths in Planar Graphs, where he proves one of Plummer's conjectures: Every $4$-connected planar graph is Hamiltonian-connected. Context. Recall that a graph $G$ is called Hamiltonian-connected if…
10
votes
0 answers

The number of Hamiltonian paths in a tournament is always odd?

A tournament is defined as an orientation of a complete graph. Prove or disprove the following statement: In a tournament, there are exactly an odd number of Hamiltonian paths. In all cases I’ve tried, the statement seems true, so I guess it’s…
10
votes
3 answers

Is this graph Hamiltonian?

I know that a Hamiltonian graph has a path that visits each vertex once. But I am not sure how to figure out if this one does. Obviously I can try and trace various different paths to see if one works but that is incredibly unreliable. So my…
9
votes
4 answers

Maximum number of edges in a non-Hamiltonian graph

I need to show that the maximum number of edges of non-Hamiltonian, simple graph, on $n$ vertices noted by $t(n,H_n)$ is $\binom{n-1}{2} + 1$. It's essential to show the upper and lower bounds for this question. Now, I can see why I need to show the…
Pavel
  • 1,602
1
2 3
43 44