Steiner Tree: definitions #
STEINER TREE (Karp 1972) in its node-weighted form
with unit weights: given a graph, a set of terminals and a threshold k, is
there a connected set of vertices containing every terminal and using at most
k non-terminals? The vocabulary FirstOrder.Language.steinerGraph is that of
graphs with two unary marks – the terminals, and the marked set carrying k
in the unary representation of DescriptiveComplexity.Numbers.Unary.
Karp's original problem weights edges and bounds the total weight; on a tree
the two readings differ by one (#edges = #vertices - 1), so the reduction
below would carry over, but the bridge between them needs the fact that a
connected graph has at least n - 1 edges. Mathlib has it only for trees on a
whole vertex type (SimpleGraph.IsTree.card_edgeFinset), so the edge-weighted
version waits for that glue; the node-weighted version is the standard variant
and is what this file formalizes.
Connectivity, and its first-order certificate #
Connectivity (DescriptiveComplexity.ConnectedOn) is stated with
Relation.ReflTransGen over the symmetric restriction of adjacency to the
chosen set, so it is the usual undirected notion and is not first-order. As
for acyclicity in DescriptiveComplexity.Problems.Feedback, what saves the
membership proof is a certificate: a root of the chosen set together with a
strict partial order in which every other chosen vertex has a chosen neighbour
strictly below it (DescriptiveComplexity.connectedOn_iff_exists_root_order). Walking
down that order reaches the root, and the root joins any two vertices.
Producing the certificate from connectivity is the direction with content: it
needs a distance, which Relation.ReflTransGen does not carry. The
DescriptiveComplexity.reachIn staging below supplies it – reachability in at most
n steps, with Nat.find picking the least such n – and that is the whole
of the extra machinery. It is stated for an arbitrary relation, so the
Hamilton problems and the edge-weighted Steiner tree can reuse it.
Relation symbols of the language of graphs with terminals.
- adj : steinerRel 2
adj a b: there is an edge betweenaandb. - terminal : steinerRel 1
terminal a: the vertexamust be spanned. - marked : steinerRel 1
marked a: the vertexabelongs to the marked set carrying the threshold.
Instances For
Dependency graph
Dependency graph
Equations
- One or more equations did not get rendered due to their size.
- FirstOrder.Language.instDecidableEqSteinerRel.decEq FirstOrder.Language.steinerRel.adj FirstOrder.Language.steinerRel.adj = isTrue FirstOrder.Language.instDecidableEqSteinerRel.decEq._proof_1
Instances For
Dependency graph
The relational language of graphs with terminals: adjacency, a set of terminals to be spanned, and a marked set whose cardinality is the budget of non-terminals.
Equations
- FirstOrder.Language.steinerGraph = { Functions := fun (x : ℕ) => Empty, Relations := FirstOrder.Language.steinerRel }
Instances For
Dependency graph
Dependency graph
The adjacency symbol of terminal-marked graphs.
Instances For
Dependency graph
The terminal symbol of terminal-marked graphs.
Instances For
Dependency graph
The mark symbol of terminal-marked graphs.
Instances For
Dependency graph
Connectivity and its certificate #
The edges available inside a chosen set: adjacency in either direction, restricted to the set.
Equations
- DescriptiveComplexity.Link Adjp S a b = (S a ∧ S b ∧ (Adjp a b ∨ Adjp b a))
Instances For
Dependency graph
Dependency graph
A set of vertices is connected if any two of its members are joined by a path inside it.
Equations
- DescriptiveComplexity.ConnectedOn Adjp S = ∀ (x y : A), S x → S y → Relation.ReflTransGen (DescriptiveComplexity.Link Adjp S) x y
Instances For
Dependency graph
Reachability in a bounded number of steps #
Relation.ReflTransGen carries no length, and the certificate needs one: the
order it guesses is “distance to the root”.
Reachability in at most n steps.
Equations
- DescriptiveComplexity.reachIn R 0 x✝¹ x✝ = (x✝¹ = x✝)
- DescriptiveComplexity.reachIn R n.succ x✝¹ x✝ = (DescriptiveComplexity.reachIn R n x✝¹ x✝ ∨ ∃ (z : A), DescriptiveComplexity.reachIn R n x✝¹ z ∧ R z x✝)
Instances For
Dependency graph
Reachability is reachability in some bounded number of steps.
Dependency graph
The reflexive-transitive closure of a symmetric relation is symmetric.
Dependency graph
The certificate #
Connectivity is first-order certifiable: a set is connected exactly when, from any of its members chosen as root, some strict partial order makes every other member have a neighbour strictly below it. Walking down the order reaches the root, and the root joins any two members.
Dependency graph
The existential form of the certificate, the one a Σ₁ definition
guesses: a root relation (constrained to hold of at most one element of the
set) together with the order. The empty set is connected and has no root,
which is why the root is guessed as a relation rather than an element.
Dependency graph
ConnectedOn transports along an equivalence commuting with the
adjacency relations and the chosen sets.
Dependency graph
Connectivity costs edges #
The certificate gives each non-root member of a connected set a parent edge,
and that assignment is injective: two members sharing an edge would have to be
each other's parent, hence strictly below each other. This is the
n - 1 edge bound for connected graphs, in the form the edge-weighted Steiner
tree needs, and it is proved from the certificate rather than from a spanning
tree.
A connected set costs edges: a set connected through T has at most
one more element than T has pairs.
Dependency graph
The problem #
Some connected set contains every terminal and uses at most as many non-terminals as the number encoded by the marked set.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The certified form, with connectivity witnessed by a root and an order and the threshold by an injection: the shape the second-order definition guesses.
Dependency graph
Some set of edges of the graph, connecting a set that contains every terminal, is at most as large as the number encoded by the marked set: the edge-weighted Steiner tree with unit weights, Karp's original reading.
The chosen edges are given as a set of ordered pairs, one per edge, and
connectivity reads them symmetrically
(DescriptiveComplexity.ConnectedOn); a witness listing both orientations of an edge
merely pays for it twice, so the yes-instances are unaffected. The threshold
compares a count of pairs with a count of elements, which is meaningful
because a threshold is just a number – and necessary here, since an edge set
can be quadratically larger than the universe.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The certified form of the edge-weighted problem.
Dependency graph
SteinerOn transports along an equivalence commuting with the three
predicates.
Dependency graph
SteinerOn transports along an equivalence, iff version.
Dependency graph
SteinerEdgeOn transports along an equivalence commuting with the three
predicates.
Dependency graph
SteinerEdgeOn transports along an equivalence, iff version.
Dependency graph
Adjacency in a graph with terminals.
Equations
Instances For
Dependency graph
Being a terminal.
Equations
Instances For
Dependency graph
Belonging to the marked set carrying the threshold.
Equations
Instances For
Dependency graph
A graph with terminals admits a connected set spanning the terminals and using at most as many non-terminals as its marked set has elements. (Finiteness of the universe is part of the property: cardinality thresholds are only meaningful on finite structures.)
Equations
Instances For
Dependency graph
The Steiner-tree property is isomorphism-invariant.
Dependency graph
A graph with terminals admits a set of edges connecting its terminals, of size at most the number encoded by the marked set.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The edge-weighted Steiner-tree property is isomorphism-invariant.
Dependency graph
STEINER TREE (edge-weighted, unit weights) – Karp's original reading – as a
problem on graphs with terminals: is there a set of at most k edges
connecting all the terminals?
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
STEINER TREE (node-weighted, unit weights), as a problem on graphs with terminals: is there a connected set of vertices containing every terminal and using at most as many non-terminals as the marked set has elements?
Equations
- One or more equations did not get rendered due to their size.