A graph on the power set of Fin n
, where two sets are adjacent if their intersection has size 1.
Equations
- SnakeInBox.Hypercube n = SimpleGraph.fromRel fun (a b : Finset (Fin n)) => (a ∩ b).card = 1
Instances For
def
SnakeInBox.IsSnakeInGraphOfLength
{V : Type u}
[DecidableEq V]
(G : SimpleGraph V)
(G' : G.Subgraph)
(k : ℕ)
:
A subgraph G'
is a 'snake' of length k
in graph G
if it is an induced path of length k
.
Equations
Instances For
The length of the longest induced path (or 'snake') in a graph G
.
Equations
- SnakeInBox.LongestSnakeInGraph G = sSup {k : ℕ | ∃ (S : G.Subgraph), SnakeInBox.IsSnakeInGraphOfLength G S k}
Instances For
The longest snake in the $0$-dimensional cube, i.e. the cube consisting of one point, is zero, since there only is one induced path and it is of length zero.