Well-Quasi-Orders for Algorithms MPRI Course 2.9.1 – 2017/2018
Total Page:16
File Type:pdf, Size:1020Kb
Well-Quasi-Orders for Algorithms MPRI Course 2.9.1 – 2017/2018 S. Demri, A. Finkel, J. Goubault-Larrecq, S. Schmitz, and Ph. Schnoebelen LSV, ENS Cachan, CNRS, Universit´e Paris-Saclay, 94235 Cachan, France Lecture Notes Work supported in part by ANR ReacHard. CONTENTS 1 Basics of WQOs and Applications 1 1.1 Well Quasi Orderings ............................. 1 1.2 An algebra of well quasi-ordered domains ................. 5 1.3 Finite products, Dickson’s Lemma ...................... 6 1.4 Finite words, and Higman’s Lemma ..................... 6 1.5 Finite multisets, finite sets .......................... 8 1.6 Kruskal’s Tree Theorem ............................ 10 1.7 Graphs ..................................... 12 1.8 Ideals, and completions ............................ 13 1.9 Well-Structured Transition Systems ..................... 15 1.9.1 Termination .............................. 16 1.9.2 Coverability .............................. 17 1.10 Examples of Applications ........................... 18 1.10.1 Program Termination ......................... 18 1.10.2 Relevance Logic ............................ 21 1.10.3 Karp & Miller Trees .......................... 24 1.10.4 Termination of rewrite systems ................... 26 1.10.5 Van Der Meyden’s algorithm, and Ogawa’s improvement .... 27 1.10.6 A short word on parameterized complexity ............ 29 1.10.7 Dickson’s 1913 theorem on odd perfect numbers ......... 29 1.10.8 Polynomial ideals, and Hilbert’s Basis Theorem .......... 30 1.10.9 Buchberger’s algorithm ....................... 32 1.11 Beyond Wqos ................................. 33 1.11.1 Noetherian Spaces .......................... 33 1.11.2 Better quasi-orderings ........................ 35 Exercises ....................................... 36 Bibliographic Notes .................................. 42 2 Complexity Upper Bounds 45 2.1 The Length of Controlled Bad Sequences .................. 47 2.1.1 Controlled Sequences ........................ 47 2.1.2 Polynomial nwqos .......................... 48 2.1.3 Subrecursive Functions ........................ 50 2.1.4 Upper Bounds for Dickson’s Lemma ................ 51 2.2 Applications .................................. 52 2.2.1 Termination Algorithm ........................ 52 2.2.2 Coverability Algorithm ........................ 53 iv Contents 2.3 Bounding the Length Function ........................ 53 2.3.1 Residual nwqos and a Descent Equation .............. 54 2.3.2 Reflecting nwqos ........................... 56 2.3.3 A Bounding Function ......................... 58 2.4 Classification in the Grzegorczyk Hierarchy ................ 60 2.4.1 Maximal Order Types ........................ 60 2.4.2 The Cichon´ Hierarchy ........................ 62 2.4.3 Monotonicity ............................. 64 2.4.4 Wrapping Up ............................. 66 Exercises ....................................... 67 Bibliographic Notes .................................. 71 3 Complexity Lower Bounds 73 3.1 Counter Machines ............................... 74 3.1.1 Extended Counter Machines ..................... 74 3.1.2 Operational Semantics ........................ 74 3.1.3 Lossy Counter Machines ....................... 75 3.1.4 Behavioural Problems on Counter Machines ............ 76 3.2 Hardy Computations ............................. 76 3.2.1 Encoding Hardy Computations ................... 78 3.2.2 Implementing Hardy Computations with Counter Machines ... 78 3.3 Minsky Machines on a Budget ........................ 79 3.4 Ackermann-Hardness for Lossy Counter Machines ............ 81 3.5 Handling Reset Petri Nets ........................... 83 3.5.1 Replacing Zero-Tests with Resets .................. 83 3.5.2 From Extended to Minsky Machines ................ 84 3.6 Hardness for Termination ........................... 86 Exercises ....................................... 87 Bibliographic Notes .................................. 88 4 Ideals 89 4.1 Ideals of WQOs ................................ 89 4.1.1 Prime Decompositions of Order-Closed Subsets .......... 90 4.1.2 Ideals ................................. 91 4.2 Effective Well Quasi-Orders and Ideals ................... 93 4.2.1 Effective WQOs ............................ 93 4.2.2 Ideally Effective WQOs ........................ 94 4.3 Some Ideally Effective WQOs ......................... 97 4.3.1 Base Cases ............................... 97 4.3.2 Sums and Products .......................... 98 4.3.3 Sequence Extensions ......................... 99 4.4 Some Algorithmic Applications of Ideals .................. 102 4.4.1 Forward Coverability ......................... 102 4.4.2 Dual Backward Coverability ..................... 104 Exercises ....................................... 107 Bibliographic Notes .................................. 109 Contents v A Subrecursive Functions 111 A.1 Ordinal Terms ................................. 111 A.2 Fundamental Sequences and Predecessors .................. 112 A.3 Pointwise Ordering and Lean Ordinals ................... 113 A.4 Ordinal Indexed Functions .......................... 117 A.5 Pointwise Ordering and Monotonicity .................... 119 A.6 Different Fundamental Sequences ...................... 120 A.7 Different Control Functions .......................... 121 A.8 Classes of Subrecursive Functions ...................... 123 B Problems of Enormous Complexity 127 B.1 Fast-Growing Complexities .......................... 127 B.2 Ackermann-Complete Problems ....................... 132 B.2.1 Vector Addition Systems ....................... 132 B.2.2 Energy Games ............................. 133 B.2.3 Unreliable Counter Machines .................... 134 B.2.4 Relevance Logics ........................... 134 B.2.5 Data Logics & Register Automata .................. 135 B.2.6 Metric Temporal Logic ........................ 135 B.2.7 Ground Term Rewriting ....................... 136 B.2.8 Interval Temporal Logics ....................... 136 References 139 Index 149 vi Contents 1 BASICS OF WQOS AND APPLICATIONS 1.1 Well Quasi Orderings 1 1.2 An algebra of well quasi-ordered domains 5 1.3 Finite products, Dickson’s Lemma 6 1.4 Finite words, and Higman’s Lemma 6 1.5 Finite multisets, finite sets 8 1.6 Kruskal’s Tree Theorem 10 1.7 Graphs 12 1.8 Ideals, and completions 13 1.9 Well-Structured Transition Systems 15 1.10 Examples of Applications 18 1.11 Beyond Wqos 33 1.1 Well Quasi Orderings A quasi-ordering (some say preorder) on a set X is a reflexive transitive relation quasi-ordering ≤. It need not be antisymmetric, allowing us to avoid quotients. An ordering is preorder an antisymmetric quasi-ordering. A quasi-order is a set with a quasi-ordering, an ordering order or a poset is a set with an ordering. A qo will denote a quasi-ordering or a quasi-order order quasi-order, depending on context. poset Two elements x, y are comparable iff x ≤ y or x ≥ y. A qo is total, or linear, qo iff all its elements are pairwise comparable. The usual ordering on N is total, the comparable componentwise ordering on N2 is not. total linear We write x ≡ y, and say that x and y are equivalent, iff x ≤ y and y ≤ x. We equivalent write x < y iff x ≤ y and x ̸≡ y. A binary relation ! is terminating iff there is no infinite rewrite x0 ! x1 ! terminating ···! xn !··· . A qo ≤ is well-founded (on X) iff there is no infinite strictly well-founded descending chain x0 > x1 > ··· > xn > ··· , namely iff > is terminating. An antichain is a set of pairwise incomparable elements. antichain Definition 1.1 (Well). A qo ≤ is well iff, for every infinite sequence x0; x1; ··· ; well xn; ··· , there is a pair i < j such that xi ≤ xj. A well qo is called a wqo. wqo 2 Chapter 1. Basics of WQOs and Applications Please mind the condition i < j, too! A (finite or infinite) sequence satisfying that property is called good. All others are called bad. good The usual ordering on N is well. More generally: bad Lemma 1.2. The following implications hold for a qo: total well-founded ) well ) well-founded. They are all strict. Proof. Leftmost: If ≤ is not well, there is a sequence xn, n 2 N such that i < j implies xi ̸≤ xj. By totality the latter is equivalent to xi > xj, and we get an infinite strictly descending chain, contradiction. Rightmost: take an infinite strictly descending chain x0 > x1 > ··· > xn ··· , by wellness xi ≤ xj for some i < j, which is absurd. Counterexamples for the reverse implications: f0; 1g with = as qo, N with = as qo. minimal An element x 2 A is minimal iff every y < x is outside A. Lemma 1.3. Let ≤ be a well-founded qo on a subset A of X. minimal 1. For every a 2 A, there is a minimal x 2 A such that x ≤ a. 2. There is an antichain A0 ⊆ A such that every element of A is ≥ some element of A0. Proof. (1) Let x0 = a. If x0 is minimal in A, stop. Otherwise, pick an element x1 2 A such that x0 > x1. If x1 is minimal in A, stop. Otherwise, pick x2 2 A such that x1 > x2, and proceed. The process must stop at some rank n since ≤ is well-founded on A. Then x = xn is minimal in A, et x ≤ a. (2) Let Min A be the set of minimal elements in A. If ≤ is an ordering, then we just take A0 = Min A, and minimality implies that this is an antichain. Otherwise, use the axiom of choice and associate each a 2 A with a canonical representative f(a) of its equivalence class, then let A0 = ff(a) j a 2 Ag. Remark 1.4. (1) fails without well-foundedness. For example, Z does not even have any minimal element. (1) is in fact equivalent to the well-foundedness of ≤ on A. subsequence A subsequence of an infinite sequence x0; x1; ··· ; xn; ··· is an