-1
$\begingroup$

What is an example of a simple graph $G = (\{1,\ldots,n\}, E)$, where $n\in\mathbb{N}$ is a positive integer, with the following properties?

  1. There is a path in $G$ of length $n$,
  2. every vertex has at least $2$ neighbors, and
  3. $G$ does not have a Hamiltonian cycle.
$\endgroup$
2
  • 1
    $\begingroup$ Umm. I believe a path in graph theory usually means its vertices are distinct, and the length of a path is the number of edges (e.g. mathworld.wolfram.com/GraphPath.html ), so a "path of length $n$" would need to contain $n+1$ distinct vertices? Perhaps you count the length differently? $\endgroup$ Commented Mar 9, 2022 at 10:12
  • $\begingroup$ There's enough disagreement over the right way to parameterise paths that you have to expect to see number of edges or vertices. The problem with this question is that you can't not come up with an example if you draw a picture and think about it for ten seconds. $\endgroup$
    – Ben Barber
    Commented Mar 26, 2022 at 10:41

2 Answers 2

3
$\begingroup$

Assuming you mean a graph with a Hamiltonian path but no Hamiltonian cycle,

  • The Petersen graph is a standard example.
  • Any pendant-free graph with a Hamiltonian path and a bridge is an easy example; e.g. take two pendant-free graphs $G_1$ and $G_2$ with Hamiltonian paths (and optionally with Hamiltonian cycles). Let $s_1, t_1$ be endpoints of a Hamiltonian path in $G_1$ and similarly $s_2, t_2$ in $G_2$. Join them either by merging $s_1$ and $s_2$ or by adding a single edge $s_1 - s_2$.
  • The class of maximally non-Hamiltonian graphs may be of particular interest to you.
$\endgroup$
1
$\begingroup$

For $n\geq 5$: connect $i$ to $i+1$ for $1\leq i\leq n-1$, connect 1 to 3 and connect 3 to $n$. Every cycle that wants to visit each vertex, has to visit vertex 3 at least twice.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged .