Paper
Constant-Factor Hardness for Twin-Width in Graphs of Bounded Path-Width
7 pages · 35 marked passages · pdflatex · download PDF · lax-833301
-
Constant-Factor Hardness for Twin-Width in Graphs of Bounded Path-Width
For each fixed real there are positive integers such that it is NP-hard to distinguish graphs of twin-width at most from graphs of twin-width greater than . A path decomposition of width at most is part of the input on both sides of the promise.
1 import Lax833301.Instances 2 … module docstring, 10 lines 13 14 namespace Lax833301.GapHardness 15 16 open Lax833301.Instances Lax228581.TwinWidth 17 18 axiom hardness (c : ℝ) (hc : 1 ≤ c) : 19 ∃ k p : ℕ, 0 < k ∧ 0 < p ∧ 20 NPHardToDistinguish 21 (onInputs := SuppliedPathDecompositionHasWidthAtMost p) 22 (yes := fun G => twinWidth G ≤ k) 23 (no := fun G => twinWidth G > c * k) 24 25 end Lax833301.GapHardness 26 -
Compose a hypothetical polynomial-time separator with the promise reduction for an arbitrary NP language.
-
Pathwidth
The pathwidth of a graph is the minimum width of a path decomposition. The width of a path decomposition is the maximum bag size minus one. The empty graph has pathwidth zero.
1 import Lax183560.PathDecomposition 2 import Mathlib.Order.Lattice.Nat 3 … module docstring, 9 lines 13 14 namespace Lax183560.Pathwidth 15 16 open Lax183560.PathDecomposition 17 18 /-- Existence of a path decomposition with bags of size at most `k + 1`. -/ 19 def HasPathwidthAtMost {V : Type} (G : SimpleGraph V) (k : ℕ) : Prop := 20 ∃ D : PathDecomposition G, ∀ i, (D.bag i).card ≤ k + 1 21 22 /-- The minimum path-decomposition width. -/ 23 noncomputable def pathwidth {V : Type} [Fintype V] [DecidableEq V] 24 (G : SimpleGraph V) : ℕ := 25 sInf {k | HasPathwidthAtMost G k} 26 27 end Lax183560.Pathwidth 28 -
Treedepth
The treedepth of a graph is the minimum height of a rooted forest on its vertex set whose closure contains the graph. The closure joins every vertex to each of its ancestors, and height counts the vertices on a longest root-to-leaf path. The empty graph has treedepth zero.
1 import Lax183560.AncestorForest 2 import Mathlib.Order.Lattice.Nat 3 … module docstring, 10 lines 14 15 namespace Lax183560.TreeDepth 16 17 open Lax183560.AncestorForest 18 19 /-- `G` lies in the closure of a forest of vertex height at most `k`. -/ 20 def HasTreedepthAtMost {V : Type} (G : SimpleGraph V) (k : ℕ) : Prop := 21 ∃ F : AncestorForest V, 22 (∀ ⦃u v : V⦄, G.Adj u v → (F.ancestor u v ∨ F.ancestor v u)) ∧ 23 ∃ rank : V → Fin k, 24 ∀ ⦃u v : V⦄, F.ancestor u v → rank u < rank v 25 26 /-- The minimum height of a rooted forest whose closure contains `G`. -/ 27 noncomputable def treedepth {V : Type} [Fintype V] [DecidableEq V] 28 (G : SimpleGraph V) : ℕ := 29 sInf {k | HasTreedepthAtMost G k} 30 31 end Lax183560.TreeDepth 32 -
Twin-width
A partition sequence of a finite simple graph G is a sequence of partitions of its vertex set that starts at the partition into singletons, merges two parts into one at every step, and ends at the partition with a single part. Two parts of a same partition are homogeneous if either every pair of vertices across them is adjacent or none is; two non-homogeneous parts are red-adjacent. The red degree of a part is the number of other parts of its partition that are red-adjacent to it.
The twin-width of G is the least d such that G has a partition sequence in which every part of every partition has red degree at most d.
1 import Mathlib.Combinatorics.SimpleGraph.Basic 2 import Mathlib.Data.Set.Card 3 import Mathlib.Data.Nat.Lattice 4 … module docstring, 25 lines 30 31 namespace Lax228581.TwinWidth 32 33 /-- Two vertex sets are homogeneous in `G`: either every pair of vertices 34 across them is adjacent, or none is. -/ 35 def Homogeneous {V : Type} (G : SimpleGraph V) (A B : Finset V) : Prop := 36 (∀ a ∈ A, ∀ b ∈ B, G.Adj a b) ∨ (∀ a ∈ A, ∀ b ∈ B, ¬ G.Adj a b) 37 38 /-- The red degree of a part `A` in a family of parts `P`: the number of 39 other parts of `P` that are not homogeneous with `A`. -/ 40 noncomputable def redDegree {V : Type} (G : SimpleGraph V) 41 (P : Finset (Finset V)) (A : Finset V) : ℕ := 42 {B | B ∈ P ∧ B ≠ A ∧ ¬ Homogeneous G A B}.ncard 43 44 /-- The partition of a finite vertex type into singletons. -/ 45 def singletonPartition (V : Type) [Fintype V] [DecidableEq V] : 46 Finset (Finset V) := 47 Finset.univ.image fun v : V => ({v} : Finset V) 48 49 /-- A partition sequence of `G` in which every part has red degree at most 50 `d`: starting from the singleton partition, each step merges two parts into 51 one, until a single part remains. -/ 52 structure PartitionSequence {V : Type} [Fintype V] [DecidableEq V] 53 (G : SimpleGraph V) (d : ℕ) where 54 /-- The number of merge steps. -/ 55 stepCount : ℕ 56 /-- The partition after each number of merge steps. -/ 57 partition : ℕ → Finset (Finset V) 58 /-- The sequence starts at the singleton partition. -/ 59 starts : partition 0 = singletonPartition V 60 /-- The sequence ends with a single part. -/ 61 ends : (partition stepCount).card ≤ 1 62 /-- Each step merges two distinct parts into one and keeps all other 63 parts. -/ 64 step_merges : 65 ∀ i, i < stepCount → ∃ A ∈ partition i, ∃ B ∈ partition i, A ≠ B ∧ 66 partition (i + 1) = insert (A ∪ B) (((partition i).erase A).erase B) 67 /-- Every part of every partition in the sequence has red degree at most 68 `d`. -/ 69 redDegree_le : 70 ∀ i, i ≤ stepCount → ∀ ⦃A⦄, A ∈ partition i → 71 redDegree G (partition i) A ≤ d 72 73 /-- `G` has a partition sequence in which every part has red degree at most 74 `d`. -/ 75 def HasTwinWidthAtMost {V : Type} [Fintype V] [DecidableEq V] 76 (G : SimpleGraph V) (d : ℕ) : Prop := 77 Nonempty (PartitionSequence G d) 78 79 /-- The twin-width of a finite simple graph: the least `d` such that the 80 graph has a partition sequence in which every part has red degree at most 81 `d`. -/ 82 noncomputable def twinWidth {V : Type} [Fintype V] [DecidableEq V] 83 (G : SimpleGraph V) : ℕ := 84 sInf {d | HasTwinWidthAtMost G d} 85 86 end Lax228581.TwinWidth 87 -
The graph of an expanded schedule
An event has fibers indexed by -bit words. Arcs read one bit of the successor. Each interval has marker groups and a private auxiliary event. A marker sees its opening through a fixed bit, its auxiliary event through a group code, and its designated coordinate vertices through its own word. All edges are given by these rules.
1 import Lax833301.Expansion 2 import Mathlib.Combinatorics.SimpleGraph.Basic 3 … module docstring, 11 lines 15 16 namespace Lax833301.Realization 17 18 open Schedules Expansion 19 20 abbrev Bits (t : ℕ) := Fin t → Bool 21 abbrev Group (t : ℕ) := Fin t × Fin t 22 abbrev Node (T : Template) (d : ℕ) := Event T d ⊕ Interval T d 23 abbrev Vertex (T : Template) (d t : ℕ) := 24 (Node T d × Fin t × Bits t) ⊕ (Coord d × Fin t) ⊕ (Interval T d × Group t × Bits t) 25 26 def nodeArc {T : Template} {d : ℕ} : Node T d → Node T d → Prop 27 | .inl u, .inl v => arc T d u v 28 | .inl u, .inr i => u = endpoint T d i true 29 | _, _ => False 30 31 def code {t : ℕ} (k : Group t) (j : Fin t) : Bool := 32 (k.1.val * t + k.2.val + 1).testBit j.val 33 34 def edge {T : Template} {d t : ℕ} : Vertex T d t → Vertex T d t → Prop 35 | .inl (u,j,_), .inl (v,_,x) => nodeArc u v ∧ x j = true 36 | .inr (.inr (i,k,_)), .inl (.inl v,_,y) => v = endpoint T d i false ∧ y k.1 = true 37 | .inr (.inr (i,k,_)), .inl (.inr i',j,_) => i = i' ∧ code k j = true 38 | .inr (.inr (i,_,x)), .inr (.inl (q,j)) => uses T d i q ∧ x j = true 39 | _, _ => False 40 41 def graph (T : Template) (d t : ℕ) : SimpleGraph (Vertex T d t) := 42 SimpleGraph.fromRel edge 43 44 end Lax833301.Realization 45 -
Lift the skeleton decomposition through the numbered graph. Its width bound follows from the injectivity of the endpoints and the size of each event fiber and marker group. The bag order is the one used by the writer.
-
no assumptions
Use the same linear order of bags. An arc edge is covered at a skeleton edge, and every marker edge is covered at an endpoint bag. For a vertex belonging to an interval gadget the two occurrence intervals intersect.
-
no assumptions
Charge each interval meeting a bag to one of its endpoints in that bag. Each charged interval adds one auxiliary event and marker groups. The coordinate vertices occur in every bag.
-
no assumptions
Enumerate the actual vertices in the same order in every row. A pair of indices specifies an adjacency query, and a bag index and vertex specify a bag query. Both queries recurse to fixed depth and use polynomial-time arithmetic on the unary input. Concatenating the two matrices and their dimension fields gives a single polynomial-time transducer.
-
Reading and constructing contraction sequences
A low-width contraction sequence orders the expanded events by the first time a fiber meets at most parts. If , each active interval on a coordinate contributes at least to the average red degree there. Conversely, a successful template order with bounded frontier gives a sequence of width at most .
1 import Lax833301.GraphOutput 2 import Lax833301.SerialOrder 3 … module docstring, 11 lines 15 16 namespace Lax833301.ContractionBounds 17 18 open Schedules Expansion Tracks ThreePartition Instances GraphOutput Lax228581.TwinWidth 19 20 axiom read (I : Instance) (d t w l : ℕ) (J : Input) (hJ : Represents I d t J) 21 (ht : 0 < t) (codes : t^2 < 2^t) (start : w+3 < 2^t) 22 (bits : w+2 < 2^(l+1)) (hl : l < t) (low : twinWidth J.graph ≤ w) : 23 ∃ f : Clock (template I) d, Legal (template I) d f ∧ 24 ∀ z q, load (template I) d f z q * (t-l)^2 ≤ w 25 26 axiom contract (d B : ℕ) (hd : 0 < d) : ∃ A : ℕ, 27 ∀ (I : Instance) (time : (template I).Event → ℕ), 28 Function.Injective time → (template I).Respects time → 29 (∀ z, (template I).frontier time z ≤ B) → 30 let order := SerialOrder.run (template I) time d 0 31 Legal (template I) d order → (∀ z q, load (template I) d order z q ≤ 11) → 32 (∀ z, SerialOrder.total (template I) d order z ≤ 11*d+1) → 33 ∀ (t : ℕ) (J : Input), 0 < t → t^2 < 2^t → Represents I d t J → 34 twinWidth J.graph ≤ 11*t^2 + A*t 35 36 end Lax833301.ContractionBounds 37 -
no assumptions
Take the first compression time of each event in a width-bounded partition sequence. Every arc increases this time. The two terminals are extremal in each replacement, and the parts containing the active markers witness the red-neighbor observations at each cut.
-
no assumptions
Extend each assignment of the pinned bits by zeros. Distinct assignments must reach distinct parts of the partition.
-
For each interval at least opening bits vary. Each of the groups at every such index varies in at least positions. Summing by designated vertex instead counts at most incidences.
-
no assumptions
Take the first compression time of each event in a width-bounded partition sequence. Every arc increases this time. The two terminals are extremal in each replacement, and the parts containing the active markers witness the red-neighbor observations at each cut.
-
Read the times from the first compressed fibers. Apply the marker incidence bound separately at each cut and for each coordinate.
-
Reading and constructing contraction sequences
A low-width contraction sequence orders the expanded events by the first time a fiber meets at most parts. If , each active interval on a coordinate contributes at least to the average red degree there. Conversely, a successful template order with bounded frontier gives a sequence of width at most .
1 import Lax833301.GraphOutput 2 import Lax833301.SerialOrder 3 … module docstring, 11 lines 15 16 namespace Lax833301.ContractionBounds 17 18 open Schedules Expansion Tracks ThreePartition Instances GraphOutput Lax228581.TwinWidth 19 20 axiom read (I : Instance) (d t w l : ℕ) (J : Input) (hJ : Represents I d t J) 21 (ht : 0 < t) (codes : t^2 < 2^t) (start : w+3 < 2^t) 22 (bits : w+2 < 2^(l+1)) (hl : l < t) (low : twinWidth J.graph ≤ w) : 23 ∃ f : Clock (template I) d, Legal (template I) d f ∧ 24 ∀ z q, load (template I) d f z q * (t-l)^2 ≤ w 25 26 axiom contract (d B : ℕ) (hd : 0 < d) : ∃ A : ℕ, 27 ∀ (I : Instance) (time : (template I).Event → ℕ), 28 Function.Injective time → (template I).Respects time → 29 (∀ z, (template I).frontier time z ≤ B) → 30 let order := SerialOrder.run (template I) time d 0 31 Legal (template I) d order → (∀ z q, load (template I) d order z q ≤ 11) → 32 (∀ z, SerialOrder.total (template I) d order z ≤ 11*d+1) → 33 ∀ (t : ℕ) (J : Input), 0 < t → t^2 < 2^t → Represents I d t J → 34 twinWidth J.graph ≤ 11*t^2 + A*t 35 36 end Lax833301.ContractionBounds 37 -
no assumptions
Process the marker groups before their opening and the auxiliary fibers after their closing. Group completed ordinary vertices by fiber index, future outneighbors, and the interval to which they remain attached. Across each cut the possible outneighbor sets have bounded cardinality by the serial cut cover. Untouched vertices are homogeneous on the current parts, and each anchor sees live groups on at most 11 intervals. Refining each change of partition into binary merges preserves these red-degree bounds.
-
no assumptions
The Archimedean property gives the required integer.
-
no assumptions
Take , and . Then , while .
-
Fix the depth before choosing the fiber size. Compose the reduction to unary 3-Partition with the graph writer. A positive instance gives a sequence of width at most . For a negative instance a putative sequence of width would yield a schedule whose peak conflicts with the red-degree bound.
-
Blockers, probes, and precedence
A template has 7 types of blockers and probes. Each blocker is active between its opening and its closing. A probe succeeds when every blocker of its type is inactive. For discrete time we count a blocker from its opening up to, but excluding, its closing. Orders are strict on arcs. Unrelated events at a common time can be serialized with endpoints before probes, which preserves every probe's test.
1 import Mathlib.Data.Fintype.BigOperators 2 import Mathlib.Data.Fintype.Sum 3 import Mathlib.Data.Finset.Card 4 … module docstring, 12 lines 17 18 namespace Lax833301.Schedules 19 20 abbrev Kind := Fin 7 21 22 structure Template where 23 Fixed : Type 24 Probe : Type 25 Blocker : Type 26 [fixedFinite : Fintype Fixed] 27 [probeFinite : Fintype Probe] 28 [blockerFinite : Fintype Blocker] 29 entry : Fixed 30 exit : Fixed 31 collector : Fixed 32 opening : Blocker → Fixed 33 closing : Blocker → Fixed 34 color : Blocker → Kind 35 test : Probe → Kind 36 arc : Fixed ⊕ Probe → Fixed ⊕ Probe → Prop 37 38 attribute [instance] Template.fixedFinite Template.probeFinite Template.blockerFinite 39 40 abbrev Template.Event (T : Template) := T.Fixed ⊕ T.Probe 41 42 def Template.Respects (T : Template) (time : T.Event → ℕ) : Prop := 43 ∀ u v, T.arc u v → time u < time v 44 45 def Template.Active (T : Template) (f : T.Fixed → ℕ) (i : T.Blocker) (z : ℕ) : Prop := 46 f (T.opening i) ≤ z ∧ z < f (T.closing i) 47 48 noncomputable def Template.count (T : Template) (f : T.Fixed → ℕ) (z : ℕ) 49 (keep : T.Blocker → Prop) : ℕ := by 50 classical 51 exact (Finset.univ.filter (fun i => T.Active f i z ∧ keep i)).card 52 53 def Template.Succeeds (T : Template) (time : T.Event → ℕ) : Prop := 54 ∀ p i, T.color i = T.test p → ¬ T.Active (time ∘ Sum.inl) i (time (.inr p)) 55 56 noncomputable def Template.frontier (T : Template) (time : T.Event → ℕ) (z : ℕ) : ℕ := by 57 classical 58 exact (Finset.univ.filter (fun u => time u ≤ z ∧ 59 ∃ v, z < time v ∧ v ≠ Sum.inl T.collector ∧ T.arc u v)).card 60 61 structure Template.Good (T : Template) (B : ℕ) (time : T.Event → ℕ) : Prop where 62 respects : T.Respects time 63 injective : Function.Injective time 64 spanned : ∀ e, time (.inl T.entry) ≤ time e ∧ time e ≤ time (.inl T.exit) 65 succeeds : T.Succeeds time 66 load : ∀ z, T.count (time ∘ Sum.inl) z (fun _ => True) ≤ 11 67 boundary : ∀ z, T.frontier time z ≤ B 68 69 end Lax833301.Schedules 70 -
Unary 3-Partition
There are positive item sizes, each strictly between and , of total size . A solution assigns 3 items of total size to each bin. This restriction of 3-Partition, with all numbers written in unary, is NP-hard (Garey and Johnson, problem SP15).
1 import Lax833301.Instances 2 import Mathlib.Algebra.BigOperators.Group.Finset.Basic 3 … module docstring, 10 lines 14 15 namespace Lax833301.ThreePartition 16 17 open Lax434930.PolynomialTime Lax434930.NondeterministicPolynomialTime 18 open Lax429075.Encoding Instances 19 20 structure Instance where 21 m : ℕ 22 b : ℕ 23 nonempty : 0 < m 24 size : Fin (3*m) → ℕ 25 small : ∀ i, 2 * size i < b 26 large : ∀ i, b < 4 * size i 27 total : ∑ i, size i = m * b 28 29 def Instance.bits (I : Instance) : Word := 30 encodeNat I.m ++ encodeNat I.b ++ (List.ofFn (fun i => encodeNat (I.size i))).flatten 31 32 def Instance.Positive (I : Instance) : Prop := 33 ∃ bin : Fin (3*I.m) → Fin I.m, ∀ j, 34 (Finset.univ.filter fun i => bin i = j).card = 3 ∧ 35 (∑ i ∈ Finset.univ.filter (fun i => bin i = j), I.size i) = I.b 36 37 axiom hardness (A : Language) (hA : A ∈ NP) : 38 ∃ f : Word → Word, Poly f ∧ ∀ x, ∃ I : Instance, 39 f x = I.bits ∧ (x ∈ A ↔ I.Positive) 40 41 end Lax833301.ThreePartition 42 -
Cook–Levin supplies an encoded CNF formula on every input. Compose the certified reductions from SAT to 3-dimensional matching, to unary 4-Partition, and to unary 3-Partition. The list programs for these reductions compile to polynomial-time bit-string transducers. Relabel the parts as bins and write the item sizes in unary.
-
The item, name, and size tracks
Each item has a lock interval, a binary name of common length, and the size word . Boundary probes delimit windows. The name track can offer one bit per stage. The size track offers alternating slots, with every third window boundary in the overlap between consecutive bins.
1 import Lax833301.Schedules 2 import Lax833301.ThreePartition 3 import Mathlib.Data.Nat.Log 4 … module docstring, 10 lines 15 16 namespace Lax833301.Tracks 17 18 open Schedules ThreePartition 19 20 abbrev items (I : Instance) := 3*I.m 21 def nameLength (I : Instance) := Nat.clog 2 (items I) 22 abbrev stages (I : Instance) := items I * nameLength I 23 abbrev slots (I : Instance) := 2*I.m*I.b 24 25 abbrev Blocker (I : Instance) := Fin (items I) ⊕ (Fin (stages I + 1) × Fin 4) ⊕ Fin (slots I) 26 abbrev Fixed (I : Instance) := Fin 4 ⊕ (Fin (stages I) × Bool) ⊕ (Blocker I × Bool) 27 abbrev Probe (I : Instance) := Fin (items I + 1) ⊕ (Fin (items I) × Fin (nameLength I)) ⊕ 28 (Σ i : Fin (items I), Fin (2*I.size i)) 29 30 /-- Natural-number labels used to specify consecutive pairs on the tracks. -/ 31 inductive Label where 32 | entry | exit | gate | collector 33 | stage (u : ℕ) (endOfStage : Bool) 34 | item (i : ℕ) (close : Bool) 35 | name (u r : ℕ) (close : Bool) 36 | slot (v : ℕ) (close : Bool) 37 | boundary (j : ℕ) 38 | bit (i u : ℕ) 39 | letter (i v : ℕ) 40 deriving DecidableEq 41 42 def endpoint {I : Instance} (b : Blocker I) (close : Bool) : Label := 43 match b with 44 | .inl i => .item i close 45 | .inr (.inl (u,r)) => .name u r close 46 | .inr (.inr v) => .slot v close 47 48 def fixedLabel {I : Instance} : Fixed I → Label 49 | .inl j => match j.val with 50 | 0 => .entry | 1 => .exit | 2 => .gate | _ => .collector 51 | .inr (.inl (u,e)) => .stage u e 52 | .inr (.inr (b,c)) => endpoint b c 53 54 def probeLabel {I : Instance} : Probe I → Label 55 | .inl j => .boundary j 56 | .inr (.inl (i,u)) => .bit i u 57 | .inr (.inr ⟨i,v⟩) => .letter i v 58 59 def nameKind (r : Fin 4) : Kind := ⟨3+r.val, by omega⟩ 60 61 def color {I : Instance} : Blocker I → Kind 62 | .inl _ => 2 63 | .inr (.inl (_,r)) => nameKind r 64 | .inr (.inr v) => if v.val % 2 = 0 then 1 else 0 65 66 def test {I : Instance} : Probe I → Kind 67 | .inl _ => 2 68 | .inr (.inl (i,u)) => 69 let bit := (i.val.testBit u.val).toNat 70 nameKind ⟨2*((u.val+1)%2)+bit, by cases h : i.val.testBit u.val <;> simp [bit,h] <;> omega⟩ 71 | .inr (.inr ⟨_,v⟩) => if v.val % 2 = 0 then 0 else 1 72 73 def itemSize (I : Instance) (i : ℕ) : ℕ := 74 if h : i < items I then I.size ⟨i,h⟩ else 0 75 76 /-- The first size blocker of the next bin opens before the common boundary; 77 the last size blocker of the preceding bin closes after it. -/ 78 def binBoundary (I : Instance) (j k : ℕ) : Prop := 79 0 < j ∧ j < items I ∧ j % 3 = 0 ∧ k = 2*(j/3)*I.b 80 81 def crossed (I : Instance) (u r : ℕ) : ℕ := 82 if r/2 = (u % nameLength I + 1) % 2 then r ^^^ 1 else r 83 84 /-- Consecutive track events and the additional precedence arcs, tested on 85 labels of actual events. Indices in labels start at zero. -/ 86 def precedes (I : Instance) : Label → Label → Prop 87 | .entry, .slot v false => v = 0 88 | .entry, .name u _ false => u = 0 89 | .gate, .item _ false => True 90 | .item _ true, .collector => True 91 | .collector, .boundary j => j = items I 92 | .boundary j, .gate => j = 0 93 | .item i false, .item k true => i = k 94 | .item i false, .bit k u => i = k ∧ u = 0 95 | .bit i u, .bit k v => i = k ∧ v = u+1 96 | .bit i u, .letter k v => i = k ∧ u+1 = nameLength I ∧ v = 0 97 | .letter i v, .letter k w => i = k ∧ w = v+1 98 | .letter i v, .item k true => i = k ∧ v+1 = 2*itemSize I i 99 | .name u _ false, .boundary j => u = 0 ∧ j = 0 100 | .boundary j, .name u _ true => j = items I ∧ u = stages I 101 | .name u _ true, .exit => u = stages I 102 | .name u r false, .name v s true => 103 (u = v ∧ r = s) ∨ (u = v+1 ∧ s = crossed I v r) 104 | .stage u false, .name v _ c => v = if c then u else u+1 105 | .name v _ c, .stage u true => v = if c then u else u+1 106 | .stage u true, .stage v false => v = u+1 ∧ v % nameLength I ≠ 0 107 | .boundary j, .stage u false => u = j * nameLength I 108 | .stage u true, .boundary j => u+1 = j * nameLength I 109 | .slot v false, .boundary j => (v = 0 ∧ j = 0) ∨ binBoundary I j v 110 | .boundary j, .slot v true => 111 (j = items I ∧ v+1 = slots I) ∨ binBoundary I j (v+1) 112 | .slot v true, .exit => v+1 = slots I 113 | .slot v false, .slot w false => v = 0 ∧ w = 1 114 | .slot v false, .slot w true => v = w ∨ v = w+1 115 | .slot v true, .slot w false => w = v+2 116 | .slot v true, .slot w true => w = v+1 ∧ w+1 = slots I 117 | _, _ => False 118 119 noncomputable def template (I : Instance) : Template where 120 Fixed := Fixed I 121 Probe := Probe I 122 Blocker := Blocker I 123 entry := .inl 0 124 exit := .inl 1 125 collector := .inl 3 126 opening b := .inr (.inr (b,false)) 127 closing b := .inr (.inr (b,true)) 128 color := color 129 test := test 130 arc u v := precedes I (Sum.elim fixedLabel probeLabel u) (Sum.elim fixedLabel probeLabel v) 131 132 end Lax833301.Tracks 133 -
Successful schedules and 3-partitions
A partition gives a successful order with at most 11 live blockers. Outside arcs entering the collector, its executed frontier has constant size. Conversely, a successful order determines 1 item in each window and 3 items of combined size in each bin.
1 import Lax833301.Tracks 2 … module docstring, 10 lines 13 14 namespace Lax833301.BaseSchedule 15 16 open ThreePartition Schedules Tracks 17 18 axiom pack : ∃ B : ℕ, ∀ I : Instance, I.Positive → 19 ∃ time, (template I).Good B time 20 21 axiom unpack (I : Instance) (time : (template I).Event → ℕ) 22 (legal : (template I).Respects time) (success : (template I).Succeeds time) : I.Positive 23 24 end Lax833301.BaseSchedule 25 -
no assumptions
Each item fills all the name stages of its window. Distinct binary names therefore occupy distinct windows. The alternating letters biject with all size slots, and the three windows of each bin use exactly its slots.
-
no assumptions
Order the three items of each bin in consecutive windows. Each name stage offers its item's bit and the size slots offer its alternating word. The resulting schedule has at most 11 active blockers. For arcs outside the collector, the frontier injects into a fixed finite set of labels.
-
Recursive replacement of probes
At depth the replacement is a single interval. At depth the events are the fixed events of the template and the events in a depth- copy for each probe. An external arc leaves a child's exit or arrives at its entry. A coordinate has one type per level. Its load is the number of active intervals whose prefix matches that coordinate.
1 import Lax833301.Schedules 2 … module docstring, 11 lines 14 15 namespace Lax833301.Expansion 16 17 open Schedules 18 19 def Event (T : Template) : ℕ → Type 20 | 0 => Bool 21 | d+1 => T.Fixed ⊕ (T.Probe × Event T d) 22 23 def Interval (T : Template) : ℕ → Type 24 | 0 => Unit 25 | d+1 => T.Blocker ⊕ (T.Probe × Interval T d) 26 27 def Coord : ℕ → Type 28 | 0 => Unit 29 | d+1 => Kind × Coord d 30 31 noncomputable instance eventFinite (T : Template) (d : ℕ) : Fintype (Event T d) := by 32 induction d with 33 | zero => exact inferInstanceAs (Fintype Bool) 34 | succ d ih => exact inferInstanceAs (Fintype (T.Fixed ⊕ (T.Probe × Event T d))) 35 36 noncomputable instance intervalFinite (T : Template) (d : ℕ) : Fintype (Interval T d) := by 37 induction d with 38 | zero => exact inferInstanceAs (Fintype Unit) 39 | succ d ih => exact inferInstanceAs (Fintype (T.Blocker ⊕ (T.Probe × Interval T d))) 40 41 instance coordFinite (d : ℕ) : Fintype (Coord d) := by 42 induction d with 43 | zero => exact inferInstanceAs (Fintype Unit) 44 | succ d ih => exact inferInstanceAs (Fintype (Kind × Coord d)) 45 46 def terminal (T : Template) : (d : ℕ) → Bool → Event T d 47 | 0, endPoint => endPoint 48 | _+1, endPoint => Sum.inl (if endPoint then T.exit else T.entry) 49 50 def endpoint (T : Template) : (d : ℕ) → Interval T d → Bool → Event T d 51 | 0, _, e => e 52 | _+1, .inl i, e => Sum.inl (if e then T.closing i else T.opening i) 53 | d+1, .inr (p,i), e => Sum.inr (p, endpoint T d i e) 54 55 def uses (T : Template) : (d : ℕ) → Interval T d → Coord d → Prop 56 | 0, _, _ => True 57 | _+1, .inl i, (r,_) => T.color i = r 58 | d+1, .inr (p,i), (r,q) => T.test p = r ∧ uses T d i q 59 60 def port (T : Template) (d : ℕ) (e : T.Event) (last : Bool) : Event T (d+1) := 61 match e with 62 | .inl v => Sum.inl v 63 | .inr p => Sum.inr (p, terminal T d last) 64 65 def arc (T : Template) : (d : ℕ) → Event T d → Event T d → Prop 66 | 0, a, b => a = false ∧ b = true 67 | d+1, a, b => 68 (∃ u v, T.arc u v ∧ a = port T d u true ∧ b = port T d v false) ∨ 69 ∃ p x y, arc T d x y ∧ a = Sum.inr (p,x) ∧ b = Sum.inr (p,y) 70 71 abbrev Clock (T : Template) (d : ℕ) := Event T d → ℕ 72 73 def child {T : Template} {d : ℕ} (f : Clock T (d+1)) (p : T.Probe) : Clock T d := 74 fun x => f (Sum.inr (p,x)) 75 76 /-- Respect the local arcs and keep every copy between its entry and exit. -/ 77 def Legal (T : Template) : (d : ℕ) → Clock T d → Prop 78 | 0, f => f false < f true 79 | d+1, f => 80 (∀ p, Legal T d (child f p)) ∧ 81 (∀ u v, T.arc u v → f (port T d u true) < f (port T d v false)) ∧ 82 ∀ x, f (terminal T (d+1) false) ≤ f x ∧ f x ≤ f (terminal T (d+1) true) 83 84 noncomputable def load (T : Template) : (d : ℕ) → Clock T d → ℕ → Coord d → ℕ 85 | 0, f, z, _ => if f false ≤ z ∧ z < f true then 1 else 0 86 | d+1, f, z, (r,q) => 87 T.count (fun v => f (Sum.inl v)) z (fun i => T.color i = r) + 88 ∑ p : T.Probe, if T.test p = r then load T d (child f p) z q else 0 89 90 end Lax833301.Expansion 91 -
The serial order of a positive instance
At each successful probe, run the whole replacement before proceeding to the next event. This order has coordinate load at most and at most active intervals in total. The time of an event is written in mixed blocks, one block for each ancestor probe.
1 import Lax833301.Expansion 2 … module docstring, 10 lines 13 14 namespace Lax833301.SerialOrder 15 16 open Schedules Expansion 17 18 def radix (T : Template) (time : T.Event → ℕ) := 2 + ∑ e, time e 19 def length (T : Template) (time : T.Event → ℕ) (d : ℕ) := (radix T time)^(d+1) 20 21 def run (T : Template) (time : T.Event → ℕ) : (d : ℕ) → ℕ → Clock T d 22 | 0, a => fun (e : Bool) => if e then a+1 else a 23 | d+1, a => Sum.elim (fun v => a + time (.inl v) * length T time d) 24 (fun (p,v) => run T time d (a + time (.inr p) * length T time d) v) 25 26 noncomputable def total (T : Template) : (d : ℕ) → Clock T d → ℕ → ℕ 27 | 0, f, z => if f false ≤ z ∧ z < f true then 1 else 0 28 | d+1, f, z => T.count (fun v => f (.inl v)) z (fun _ => True) + 29 ∑ p : T.Probe, total T d (child f p) z 30 31 axiom bounds (T : Template) (B : ℕ) (time : T.Event → ℕ) (good : T.Good B time) 32 (d : ℕ) : Legal T d (run T time d 0) ∧ 33 (∀ z q, load T d (run T time d 0) z q ≤ 11) ∧ 34 ∀ z, total T d (run T time d 0) z ≤ 11*d+1 35 36 end Lax833301.SerialOrder 37 -
Load amplification
If every order of a template fails some probe, every depth- expansion has a coordinate of load at least . Copies may interleave arbitrarily.
1 import Lax833301.Expansion 2 … module docstring, 8 lines 11 12 namespace Lax833301.Amplification 13 14 open Schedules Expansion 15 16 axiom peak (T : Template) 17 (fails : ∀ time, T.Respects time → ¬ T.Succeeds time) (d : ℕ) 18 (f : Clock T d) (h : Legal T d f) : 19 ∃ z q, f (terminal T d false) ≤ z ∧ z ≤ f (terminal T d true) ∧ 20 d + 1 ≤ load T d f z q 21 22 end Lax833301.Amplification 23 -
no assumptions
Give each probe its own block of times. A cut meets at most one child block. On its chosen coordinate the parent contributes zero, and outside that coordinate the child contributes zero. Total load adds at most 11 per level.
-
no assumptions
Sample a high-load cut independently in each child. These cuts respect the external precedences. A failed probe of the sampled order adds a parent blocker of the right type to the selected child's load.
-
Writing the expanded skeleton and its bag lift
For fixed , recursively substitute the probe gadgets, number the graph vertices, and write the adjacency and bag incidence matrices. The underlying skeleton bags have size bounded in terms of . The transducer writes these same matrices on every unary input, independently of its answer.
1 import Lax833301.PathBags 2 import Lax833301.Tracks 3 import Mathlib.Combinatorics.SimpleGraph.Maps 4 … module docstring, 10 lines 15 16 namespace Lax833301.SkeletonOutput 17 18 open Schedules Expansion Realization ThreePartition Tracks Instances PathBags 19 open Lax183560.PathDecomposition Lax434930.PolynomialTime 20 21 noncomputable def preimageBag {V : Type} {n : ℕ} (e : Fin n ≃ V) (S : Finset V) : Finset (Fin n) := by 22 classical exact Finset.univ.filter (fun v => e v ∈ S) 23 24 /-- The same bounded-width layout works on positive and negative instances. 25 For fixed depth its number of bags is polynomial in the input length. -/ 26 axiom bounded_bags (d : ℕ) : 27 ∃ h k : ℕ, ∀ I : Instance, ∃ D : PathDecomposition (skeleton (template I) d), 28 (∀ j, (D.bag j).card ≤ h) ∧ D.length ≤ (20 * (I.bits.length + 10))^k 29 30 axiom encode_graph (d t : ℕ) (hd : 0 < d) (ht : 0 < t) : 31 ∃ h : ℕ, ∃ F : Word → Word, Poly F ∧ ∀ I : Instance, 32 ∃ D : PathDecomposition (skeleton (template I) d), (∀ j, (D.bag j).card ≤ h) ∧ 33 ∃ n : ℕ, ∃ e : Fin n ≃ Vertex (template I) d t, 34 F I.bits = encode ((graph (template I) d t).comap e) D.length 35 (fun j => preimageBag e (bag (D.bag j))) 36 37 end Lax833301.SkeletonOutput 38 -
no assumptions
In the base layout, the name and size tracks meet at every bin boundary, and different items occupy disjoint ranges. At the next depth, keep both child terminals in the host interval and reserve a private block there for internal events. Each bag contains at most two vertices per host event and one child bag. The number of reserved blocks in each host is polynomial in the input.
Loading the paper…