Rooted tree decompositions #
A SimpleGraph.RootedTreeDecomposition G n is a tree decomposition whose nodes are Fin (n + 1)
and whose tree is given by a parent array: parent 0 = 0 and parent i < i for i ≠ 0, so the
root is 0 and every parent precedes its children. This is the input format of dynamic
programming over tree decompositions: processing the nodes in decreasing order handles every
child before its parent.
Instead of the connectivity condition, the structure asks that each vertex v have a unique
topmost node: a node whose bag contains v and which is the root or whose parent's bag does not
contain v. This condition is decidable for concrete data and is equivalent to connectivity
(SimpleGraph.RootedTreeDecomposition.preconnected_bag and
SimpleGraph.RootedTreeDecomposition.ofPreconnected).
Every finite tree decomposition can be rooted and renumbered into this form with the same bags,
along a bijection of nodes that preserves tree adjacency
(SimpleGraph.TreeDecomposition.exists_rooted). As an application, every finite clique lies in a
single bag (SimpleGraph.TreeDecomposition.exists_subset_bag_of_isClique).
Main definitions #
SimpleGraph.RootedTreeDecomposition G n: a tree decomposition given by a parent array onFin (n + 1).SimpleGraph.RootedTreeDecomposition.top: the topmost node whose bag contains a vertex.SimpleGraph.RootedTreeDecomposition.toTreeDecomposition: the underlying tree decomposition.
Main results #
SimpleGraph.TreeDecomposition.exists_rooted: every finite tree decomposition is isomorphic, as a tree with bags, to a rooted one.SimpleGraph.treewidth_le_iff_exists_rooted:Ghas treewidth at mostkif and only if it has a rooted decomposition of width at mostk.SimpleGraph.TreeDecomposition.exists_subset_bag_of_isClique: every finite clique lies in some bag.SimpleGraph.TreeDecomposition.card_le_width_add_one_of_isClique: so a decomposition has width at least the size of any clique minus one.
References #
A rooted tree decomposition of G on the nodes Fin (n + 1), given by a parent array with
root 0 in which every parent precedes its children. Each vertex has a unique topmost node: a
node whose bag contains it and which is the root or whose parent's bag does not contain it.
The parent of each node; the root
0is its own parent.The root is its own parent.
Parents precede their children.
The bag of vertices at each node.
Every vertex lies in some bag.
Both endpoints of every edge lie in a common bag.
- top_unique (v : V) (i j : Fin (n + 1)) : v ∈ self.bag i → i = 0 ∨ v ∉ self.bag (self.parent i) → v ∈ self.bag j → j = 0 ∨ v ∉ self.bag (self.parent j) → i = j
Each vertex has at most one topmost node.
i is a topmost node for v: its bag contains v, and it is the root or its parent's bag
does not contain v.
Climbing from a node whose bag contains v reaches a topmost node for v through bags that
all contain v.
The topmost node whose bag contains v.
Climbing from a node whose bag contains v, every bag up to the topmost node for v
contains v.
If u and w are adjacent and the topmost node for w is numbered no later than the topmost
node for u, then the bag at the topmost node for u contains w.
Every finite clique lies in some bag of a rooted tree decomposition: the topmost node of the clique vertex whose topmost node is numbered last.
The index tree of a rooted tree decomposition.
The nodes whose bags contain a given vertex induce a connected subtree.
The tree decomposition underlying a rooted tree decomposition.
Build a rooted tree decomposition from the connectivity condition of tree decompositions in place of the uniqueness of topmost nodes.
The width of a rooted tree decomposition: the largest bag size minus one.
In every nonempty finite vertex set S some vertex u has at most width neighbours in S:
u and its neighbours in S all lie in one bag. Take u ∈ S whose topmost node is numbered
last.
Rooting a tree decomposition #
Every tree decomposition with finitely many nodes can be rooted and renumbered: there is a rooted tree decomposition with the same bags whose parent-array tree corresponds to the index tree along a bijection of nodes.
Every tree decomposition with finitely many nodes has a rooted one of the same width.
Every finite clique lies in a single bag of a tree decomposition with finitely many nodes.
In every nonempty finite vertex set S some vertex has at most width neighbours in S.
A tree decomposition has width at least the size of any finite clique minus one.
A graph on a finite vertex type has treewidth at most k if and only if it has a rooted tree
decomposition of width at most k.