Efficient Transitive Closure Algorithms

Total Page:16

File Type:pdf, Size:1020Kb

Efficient Transitive Closure Algorithms Efficient Transitive Closure Algorithms Yards E. Ioannidis t Raghu Rantakrishnan ComputerSciences Department Universityof Wisconsin Madison.WJ 53706 Abstract closure (e.g. to find the shortestpaths between pairs of We havedeveloped some efficient algorithms for nodes) since it loses path information by merging all computing the transitive closure of a directed graph. nodes in a strongly connectedcomponent. Only the This paper presentsthe algorithmsfor the problem of Seminaive algorithm computes selection queries reachability. The algorithms,however, can be adapted efficiently. Thus, if we wish to find all nodesreachable to deal with path computationsand a signitkantJy from a given node, or to find the longest path from a broaderclass of queriesbased on onesided recursions. given node, with the exceptionof the Seminaivealgo- We analyze these algorithms and compare them to ritbm, we must essentiallycompute the entire transitive algorithms in the literature. The resulti indicate that closure(or find the longestpath from every node in the thesealgorithms, in addition to their ability to deal with graph)first and then perform a selection. queries that am generakations of transitive closure, We presentnew algorithmsbased on depth-first also perform very efficiently, in particular, in the con- searchand a schemeof marking nodes (to record ear- text of a dish-baseddatabase environment. lier computation implicitly) that computes transitive closure efficiently. They can also be adaptedto deal 1. Introduction with selection queries ‘and path computations Severaltransitive closure algoritluus have been efficiently. Jn particular, in the context of databasesan presentedin the literature.These include the Warshall importantconsideration is J/O cost, since it is expected and Warren algorithms, which use a bit-matrix that relations will not fit in main memory. A recent representationof the graph, the Schmitz algorithm, study [Agrawal and Jagadish871 has emphasizedthe which usesTatjan’s algorithmto identify strongly con- significant cost of J/O for duplicate elimination. The nectedcomponents in reversetopological order, and the algorithmspresented here will incur no J/O costs for Seminaiveand Smart/Logarithmicalgorithms, which duplicateelimination, and we thereforeexpect that they view the graph as a bii relation and compute the will be particularly suitedto databaseapplications. (We transitiveclosure by a seriesof relationaljoins. presentan analysisof the algorithmsthat reinforcesthis While all of the above algorithmscan compute PW transitive closure, not all can be used to solve some The paper is organizedas follows. We introduce related problems. Schmitx’salgorithm camrotbe used somenotation in Section2. Section3 presentsthe algo- to answerqueries about the set of pathsin the transitive rithms, starting with some simple versionsand subse- quently refining them. We presentan analysisof these algorithmsin Section4 and discussselection queries in Section5. Section6 containsa comparisonof the algo- rithms to related work. We briefly discussthese algo- ritbms in the context of path computations,one-sided recursion,and parallel executionin Section7. Finally, our conclusionsare presentedin Section8. Permission to copy without fee alI ar Put of this mataid is 2. Notation and Basic Definitions grcmtcdpovided~theoopiesnellotmrdeardistribugdfor We assumethat the graph G is specitiedas fol- ditectco mmacial advmage, the VKIB copyhght lrotice and lows: For eachnode i in tbe graph,there is a set of suc- the title of the pblicatian and its date appear, and notice is given CeSSOlSEi = (j I(i, j)isanarcofG ). hat copying is by permission of the Very Large Data Base Endowment. To copy otherwise, or to republish, mquin~ a fee d/or specialpumission fmm the Endowment. Proceedingsof the 14th VLDB Confemce Los Angeles, California 1988 382 We denotethe transitiveclosure of a graph G by additions as closed additions. (The successorset Sj is G’. The strongly connected component of node i is closed.that is, it containsall successorsof j in the tran- dehed as vi = (i ) u (j l(i,j)e G’and(j,i)E sitive closure.) G’)).Thecomp~net~Vi is~ntivialifVi f (i ). To deal correctly with cycles, we must make The condensation graph of G has the strongly con- some modifications.The idea is to ignore back arcs nectedcomponents of G as its nodes.There is an am (arcs into nodes previously visited by the depth-first from Vi to Vj in the condensationgraph if and only if search lxocedure) during the numbering phase. ‘Ihe thereisapathfromi toj inG. algorithm Basic-TC is run using this numbering.In the The algorithmswe presentconstruct a set of suc- presenceof cycles, not all additions are closed. (For cessorsin the transitiveclosure for eachnode in G . The example,the addition of Sj to Si when the arc (i , j) is a set of successomin the transitiveclosure for a node i is back ate is not a closedaddition.) Si~(jI(i,j)isan~ofG’). AsuccessorsetSiis While numbering the nodes in a preprocessing partitionedinto hV0 setsMl and Ti, and thesemay be phasefor algorithm Basic-TC exposes the underlying thought of as the “marked” and “tagged” subsetsof ideasclearly, we might improveperformance by doing Si. h&llyMi =Ti =Oforalli.+ the transitive closure work as we proceed in the numberingalgorithm. The following simple algorithm 3. The Transitive Closure Algorithms ilhrstratesthe idea,although it only works for dags. 3.1. A Marking Algorithm proc DagDFTC( G ) In this section,we presenta simpleversion of the Input: A graph G repmsented by successor sets El. algorithm. We do not suggestusing this algorithm in Output: Si, i = 1 to n, &noting G’. general; we present better algorithms, which are derived by refining this algorithm. (In this algorithm (fori=ltondovbited[i]:=O;Si:=Ood two alone,Si is partitionedinto setsMj and Vi - not Tj while there is some node i s.t. visited [i] = 0 do visit(i) od - that can be thought of as “marked’* and “unmarked”.) I pr0Cvisit ( i ) procBasic-TC ( C ) ( visited [i] := 1; Iq~:AdigraphG witbsuccessorsetsEi,i=lton. whilethereissomej E Ei -Si do Olctput:Si=UIvMi,i=lton.denotingG’. il visited [i] = 0 then visit(j); (U, :=Ei;M, :=4 Si := Si v Sj v ( j ) lori=ltondo od wldletbereisanodej E (I, 1 doMi:;=MiUM,V(j); U~:=U,VU,-Miod The abovealgorithm can be mod&xl to dealwith od cyclic graphsas follows. We need to distinguishnodes 1 that a~ mhed via back TICS, and we now partition Si Proposition 3.1: Algorithm Basic-TC cmrectly com- into hV0 subsetsMi, and Ti . Tj denotes nodesreached putesthe transitiveclosure of a directedgraph G . via back arcs. 3.2. A Depth-First Transitive CIosure Algorithm pror:Dm(G 1 Suppose that the graph G is acyclic. Let us Inprrt: A graph G represented by successor sets Ei . number the nodes using a depth-firstsearch such that Outprct:Si=MivTI,i=lton.denotingG’. all descendantsof a node numberedn have a lower ( p visited [i ] 1 ifviPitl(i)bssbeencalled. *I number than n. If we now run algorithm Basic-TC I* vi&d2[i] 1 if visit2(i) has bean called. */ using this ordering, every time we add a successorset P popped Ii I 1ifcalltovisifl(i)hasrettxned. +I S) toaset&,Sj =Mi,andUj =d. Werefertosuch r Global The succ. set of the mot of a stz camp. */ r Initialized before calling visit 2 for mot. */ t?bCretSim~bethouehtOfaScoa~g~~~~~~ue either mabd or tagged. Agrawal and Jqadi.sh [Agmwal and Jagati 88) pinted ant thst this would lead to O(n2) storage cve&ead for the marks and tags. ‘lkey dxerved that implementing &is by paxtiticning fori=ltondo St into sepamtesets hors almost no additional cvehead. (llbe space visited[i] := visited2[i] :=popped[i] := 0; for storing the graph in O(n2) in any case.) Mi := Ti := Global := 0 383 od Dug-DFTC, which is the need for a second phase to while there is somenode i s.t. vkired [i] = 0 do vi&l(i) al take care of nontrivial strongly connected components. 1 The graph of Figure 3.1 contains two such components, namely (a ,b ,d) and (e J ). Concentrating on the proc visit1 ( i ) former, when a is visited via the arc (d p), the succes- ( visited [i] := 1; sor list of a has not been computed yet, and so the suc- whilethereisj E El -Ml -TJ do cessor set of d cannot be updated properly. Bark-TC if vi&d [i] = 0 then vi&l(j); solves the problem by continuing to visit the successors Upoppedfj]>O P(i,j)ismtabackarc.*/ of a again, but this may lead to serious inefficiencies. then(Mf:=MIuMIu(j);Tr:P~~uTI)-MI) DFTC solves the problem in the secondpass, where a else Ti := Ti u ( j ) is identified as the root of the componentand its succes- od sor list is distributed to all the nodes in the component. iliETithenribelongstoastrong~~.*/ This is done by the calls to visir2. Similar comments ifTi=(i) Piisthemot.*/ hold for the other componentalso. then(Mi:=Miu(i);Ti=4 Global :=Mi; virir2(i) ) 3.3. Optimized Processing of Nontrivial Strong else(Ti:=Z-(i);M~:=M~u(i)) Components poppfzd[i] := 1 l&m is a major potential inefficiency in DFTC 1 in that the second pass over a strong component re- infers several arcs of the transitive closure that have P Assigns Global to sly%. sets of all nodesin str. camp. +/ been inferred during the lirst pass also. This can be seen in the component (a ,b ,d) of Figure 3.1. Assume prec vi&( i ) thatfromd wefirstvisite andf andthenvisita. As ( visited 2[i] := 1; soonas(dp)isdiscoveredasabackarc,DFTCputsa while there is j E Ef s.t. visited2~]10 and TJ # B do inthetaggedsetofd,anditthenpopsbacktob adding visit2(j) od into its successor list d,e f , and a, with a being h4i :=Global;Ti :=d tagged. Finally, the successorlist of a is updated to contain all the nodes in the graph without any tags. 1 During the second phase of going over the component Theorem 3.2: Algorithm DFTC correctly computes (a,b,d), nodes d&f, and a (as well as c) will be the transitive closure of G .
Recommended publications
  • Relations 21
    2. CLOSURE OF RELATIONS 21 2. Closure of Relations 2.1. Definition of the Closure of Relations. Definition 2.1.1. Given a relation R on a set A and a property P of relations, the closure of R with respect to property P , denoted ClP (R), is smallest relation on A that contains R and has property P . That is, ClP (R) is the relation obtained by adding the minimum number of ordered pairs to R necessary to obtain property P . Discussion To say that ClP (R) is the “smallest” relation on A containing R and having property P means that • R ⊆ ClP (R), • ClP (R) has property P , and • if S is another relation with property P and R ⊆ S, then ClP (R) ⊆ S. The following theorem gives an equivalent way to define the closure of a relation. \ Theorem 2.1.1. If R is a relation on a set A, then ClP (R) = S, where S∈P P = {S|R ⊆ S and S has property P }. Exercise 2.1.1. Prove Theorem 2.1.1. [Recall that one way to show two sets, A and B, are equal is to show A ⊆ B and B ⊆ A.] 2.2. Reflexive Closure. Definition 2.2.1. Let A be a set and let ∆ = {(x, x)|x ∈ A}. ∆ is called the diagonal relation on A. Theorem 2.2.1. Let R be a relation on A. The reflexive closure of R, denoted r(R), is the relation R ∪ ∆. Proof. Clearly, R ∪ ∆ is reflexive, since (a, a) ∈ ∆ ⊆ R ∪ ∆ for every a ∈ A.
    [Show full text]
  • Scalability of Reflexive-Transitive Closure Tables As Hierarchical Data Solutions
    Scalability of Reflexive- Transitive Closure Tables as Hierarchical Data Solutions Analysis via SQL Server 2008 R2 Brandon Berry, Engineer 12/8/2011 Reflexive-Transitive Closure (RTC) tables, when used to persist hierarchical data, present many advantages over alternative persistence strategies such as path enumeration. Such advantages include, but are not limited to, referential integrity and a simple structure for data queries. However, RTC tables grow exponentially and present a concern with scaling both operational performance of the RTC table and volume of the RTC data. Discovering these practical performance boundaries involves understanding the growth patterns of reflexive and transitive binary relations and observing sample data for large hierarchical models. Table of Contents 1 Introduction ......................................................................................................................................... 2 2 Reflexive-Transitive Closure Properties ................................................................................................. 3 2.1 Reflexivity ...................................................................................................................................... 3 2.2 Transitivity ..................................................................................................................................... 3 2.3 Closure .......................................................................................................................................... 4 3 Scalability
    [Show full text]
  • MATH 213 Chapter 9: Relations
    MATH 213 Chapter 9: Relations Dr. Eric Bancroft Fall 2013 9.1 - Relations Definition 1 (Relation). Let A and B be sets. A binary relation from A to B is a subset R ⊆ A×B, i.e., R is a set of ordered pairs where the first element from each pair is from A and the second element is from B. If (a; b) 2 R then we write a R b or a ∼ b (read \a relates/is related to b [by R]"). If (a; b) 2= R, then we write a R6 b or a b. We can represent relations graphically or with a chart in addition to a set description. Example 1. A = f0; 1; 2g;B = f1; 2; 3g;R = f(1; 1); (2; 1); (2; 2)g Example 2. (a) \Parent" (b) 8x; y 2 Z; x R y () x2 + y2 = 8 (c) A = f0; 1; 2g;B = f1; 2; 3g; a R b () a + b ≥ 3 1 Note: All functions are relations, but not all relations are functions. Definition 2. If A is a set, then a relation on A is a relation from A to A. Example 3. How many relations are there on a set with. (a) two elements? (b) n elements? (c) 14 elements? Properties of Relations Definition 3 (Reflexive). A relation R on a set A is said to be reflexive if and only if a R a for all a 2 A. Definition 4 (Symmetric). A relation R on a set A is said to be symmetric if and only if a R b =) b R a for all a; b 2 A.
    [Show full text]
  • Properties of Binary Transitive Closure Logics Over Trees S K
    8 Properties of binary transitive closure logics over trees S K Abstract Binary transitive closure logic (FO∗ for short) is the extension of first-order predicate logic by a transitive closure operator of binary relations. Deterministic binary transitive closure logic (FOD∗) is the restriction of FO∗ to deterministic transitive closures. It is known that these logics are more powerful than FO on arbitrary structures and on finite ordered trees. It is also known that they are at most as powerful as monadic second-order logic (MSO) on arbitrary structures and on finite trees. We will study the expressive power of FO∗ and FOD∗ on trees to show that several MSO properties can be expressed in FOD∗ (and hence FO∗). The following results will be shown. A linear order can be defined on the nodes of a tree. The class EVEN of trees with an even number of nodes can be defined. On arbitrary structures with a tree signature, the classes of trees and finite trees can be defined. There is a tree language definable in FOD∗ that cannot be recognized by any tree walking automaton. FO∗ is strictly more powerful than tree walking automata. These results imply that FOD∗ and FO∗ are neither compact nor do they have the L¨owenheim-Skolem-Upward property. Keywords B 8.1 Introduction The question aboutthe best suited logic for describing tree properties or defin- ing tree languages is an important one for model theoretic syntax as well as for querying treebanks. Model theoretic syntax is a research program in mathematical linguistics concerned with studying the descriptive complex- Proceedings of FG-2006.
    [Show full text]
  • Descriptive Complexity: a Logician's Approach to Computation
    Descriptive Complexity a Logicians Approach to Computation Neil Immerman Computer Science Dept University of Massachusetts Amherst MA immermancsumassedu App eared in Notices of the American Mathematical Society A basic issue in computer science is the complexity of problems If one is doing a calculation once on a mediumsized input the simplest algorithm may b e the b est metho d to use even if it is not the fastest However when one has a subproblem that will havetobesolved millions of times optimization is imp ortant A fundamental issue in theoretical computer science is the computational complexity of problems Howmuch time and howmuch memory space is needed to solve a particular problem Here are a few examples of such problems Reachability Given a directed graph and two sp ecied p oints s t determine if there is a path from s to t A simple lineartime algorithm marks s and then continues to mark every vertex at the head of an edge whose tail is marked When no more vertices can b e marked t is reachable from s i it has b een marked Mintriangulation Given a p olygon in the plane and a length L determine if there is a triangulation of the p olygon of total length less than or equal to L Even though there are exp onentially many p ossible triangulations a dynamic programming algorithm can nd an optimal one in O n steps ThreeColorability Given an undirected graph determine whether its vertices can b e colored using three colors with no two adjacentvertices having the same color Again there are exp onentially many p ossibilities
    [Show full text]
  • Relations April 4
    math 55 - Relations April 4 Relations Let A and B be two sets. A (binary) relation on A and B is a subset R ⊂ A × B. We often write aRb to mean (a; b) 2 R. The following are properties of relations on a set S (where above A = S and B = S are taken to be the same set S): 1. Reflexive: (a; a) 2 R for all a 2 S. 2. Symmetric: (a; b) 2 R () (b; a) 2 R for all a; b 2 S. 3. Antisymmetric: (a; b) 2 R and (b; a) 2 R =) a = b. 4. Transitive: (a; b) 2 R and (b; c) 2 R =) (a; c) 2 R for all a; b; c 2 S. Exercises For each of the following relations, which of the above properties do they have? 1. Let R be the relation on Z+ defined by R = f(a; b) j a divides bg. Reflexive, antisymmetric, and transitive 2. Let R be the relation on Z defined by R = f(a; b) j a ≡ b (mod 33)g. Reflexive, symmetric, and transitive 3. Let R be the relation on R defined by R = f(a; b) j a < bg. Symmetric and transitive 4. Let S be the set of all convergent sequences of rational numbers. Let R be the relation on S defined by f(a; b) j lim a = lim bg. Reflexive, symmetric, transitive 5. Let P be the set of all propositional statements. Let R be the relation on P defined by R = f(a; b) j a ! b is trueg.
    [Show full text]
  • A Transitive Closure Algorithm for Test Generation
    A Transitive Closure Algorithm for Test Generation Srimat T. Chakradhar, Member, IEEE, Vishwani D. Agrawal, Fellow, IEEE, and Steven G. Rothweiler Abstract-We present a transitive closure based test genera- Cox use reduction lists to quickly determine necessary as- tion algorithm. A test is obtained by determining signal values signments [5]. that satisfy a Boolean equation derived from the neural net- These algorithms solve two main problems: (1) they work model of the circuit incorporating necessary conditions for fault activation and path sensitization. The algorithm is a determine logical consequences of a partial set of signal sequence of two main steps that are repeatedly executed: tran- assignments and (2) they determine the order in which sitive closure computation and decision-making. To compute decisions on fixing signals should be made. the transitive closure, we start with an implication graph whose In spite of making extensive use of the circuit structure vertices are labeled as the true and false states of all signals. A directed edge (x, y) in this graph represents the controlling in- and function, most algorithms have several shortcomings. fluence of the true state of signal x on the true state of signal y First, they do not guarantee the identification of all logi- that are connected through a wire or a gate. Since the impli- cal consequences of a partial set of signal assignments. In cation graph only includes local pairwise (or binary) relations, other words, local conditions are easier to identify than it is a partial representation of the netlist. Higher-order signal the global ones.
    [Show full text]
  • Accelerating Transitive Closure of Large-Scale Sparse Graphs
    New Jersey Institute of Technology Digital Commons @ NJIT Theses Electronic Theses and Dissertations 12-31-2020 Accelerating transitive closure of large-scale sparse graphs Sanyamee Milindkumar Patel New Jersey Institute of Technology Follow this and additional works at: https://digitalcommons.njit.edu/theses Part of the Computer Sciences Commons Recommended Citation Patel, Sanyamee Milindkumar, "Accelerating transitive closure of large-scale sparse graphs" (2020). Theses. 1806. https://digitalcommons.njit.edu/theses/1806 This Thesis is brought to you for free and open access by the Electronic Theses and Dissertations at Digital Commons @ NJIT. It has been accepted for inclusion in Theses by an authorized administrator of Digital Commons @ NJIT. For more information, please contact [email protected]. Copyright Warning & Restrictions The copyright law of the United States (Title 17, United States Code) governs the making of photocopies or other reproductions of copyrighted material. Under certain conditions specified in the law, libraries and archives are authorized to furnish a photocopy or other reproduction. One of these specified conditions is that the photocopy or reproduction is not to be “used for any purpose other than private study, scholarship, or research.” If a, user makes a request for, or later uses, a photocopy or reproduction for purposes in excess of “fair use” that user may be liable for copyright infringement, This institution reserves the right to refuse to accept a copying order if, in its judgment, fulfillment
    [Show full text]
  • CDM Relations
    CDM 1 Relations Relations Operations and Properties Orders Klaus Sutner Carnegie Mellon University Equivalence Relations 30-relations 2017/12/15 23:22 Closures Relations 3 Binary Relations 4 We have seen how to express general concepts (or properties) as sets: we form the set of all objects that “fall under” the concept (in Frege’s Let’s focus on the binary case where two objects are associated, though terminology). Thus we can form the set of natural numbers, of primes, of not necessarily from the same domain. reals, of continuous functions, of stacks, of syntactically correct The unifying characteristic is that we have some property (attribute, C-programs and so on. quality) that can hold or fail to hold of any two objects from the Another fundamental idea is to consider relationships between two or appropriate domains. more objects. Here are some typical examples: Standard notation: for a relation P and suitable objects a and b write P (a, b) for the assertion that P holds on a and b. divisibility relation on natural numbers, Thus we can associate a truth value with P (a, b): the assertion holds if a less-than relation on integers, and b are indeed related by P , and is false otherwise. greater-than relation on rational numbers, For example, if P denotes the divisibility relation on the integers then the “attends course” relation for students and courses, P (3, 9) holds whereas P (3, 10) is false. the “is prerequisite” relation for courses, Later we will be mostly interested in relations where we can effectively the “is a parent of” relation for humans, determine whether P (a, b) holds, but for the time being we will consider the “terminates on input and produces output” relation for programs the general case.
    [Show full text]
  • Transitive-Closure Spanners∗
    Transitive-Closure Spanners∗ Arnab Bhattacharyya† Elena Grigorescu† Kyomin Jung† Sofya Raskhodnikova‡ David P. Woodruff§ Abstract Inapproximability. Our main technical contribution is We define the notion of a transitive-closure spanner of a di- a pair of strong inapproximability results. We resolve the ap- rected graph. Given a directed graph G = (V, E) and an in- proximability of 2-TC-spanners, showing that it is Θ(log n) unless P = NP . For constant k 3, we prove that the size teger k 1, a k-transitive-closure-spanner (k-TC-spanner) ≥ of is a≥ directed graph that has (1) the same of the sparsest k-TC-spanner is hard to approximate within G H = (V, EH ) 1−ǫ transitive-closure as G and (2) diameter at most k. These 2log n, for any ǫ > 0, unless NP DTIME(npolylog n). ⊆ spanners were studied implicitly in access control, property Our hardness result helps explain the difficulty in designing testing, and data structures, and properties of these spanners general efficient solutions for the applications above, and it have been rediscovered over the span of 20 years. We bring cannot be improved without resolving a long-standing open these areas under the unifying framework of TC-spanners. question in complexity theory. It uses an involved applica- We abstract the common task implicitly tackled in these di- tion of generalized butterfly and broom graphs, as well as verse applications as the problem of constructing sparse TC- noise-resilient transformations of hard problems, which may spanners. be of independent interest. We study the approximability of the size of the spars- Structural bounds.
    [Show full text]
  • Descriptive Complexity: a Logicians Approach to Computation
    Descriptive Complexity: A Logician’s Approach to Computation N. Immerman basic issue in computer science is there are exponentially many possibilities, the complexity of problems. If one is but in this case no known algorithm is faster doing a calculation once on a than exponential time. medium-sized input, the simplest al- Computational complexity measures how gorithm may be the best method to much time and/or memory space is needed as Ause, even if it is not the fastest. However, when a function of the input size. Let TIME[t(n)] be the one has a subproblem that will have to be solved set of problems that can be solved by algorithms millions of times, optimization is important. A that perform at most O(t(n)) steps for inputs of fundamental issue in theoretical computer sci- size n. The complexity class polynomial time (P) ence is the computational complexity of prob- is the set of problems that are solvable in time lems. How much time and how much memory at most some polynomial in n. space is needed to solve a particular problem? ∞ Here are a few examples of such problems: P= TIME[nk] 1. Reachability: Given a directed graph and k[=1 two specified points s,t, determine if there Even though the class TIME[t(n)] is sensitive is a path from s to t. A simple, linear-time to the exact machine model used in the com- algorithm marks s and then continues to putations, the class P is quite robust. The prob- mark every vertex at the head of an edge lems Reachability and Min-triangulation are el- whose tail is marked.
    [Show full text]
  • Rewriting Abstract Reduction Relations
    A Change in Notation From now on, when we write Γ j= ', 22c:295 Seminar in AI — Decision Procedures we will assume that all the free variables of ' and of each formula in Γ are universally quantified. Rewriting This is done for convenience, but note that it does change the Cesare Tinelli meaning of j= for non-closed formulas. [email protected] Example The University of Iowa Without implicit quantifiers: p(x) 6j= p(y). With the implicit quantifiers: p(x) j= p(y). Copyright 2004-05 — Cesare Tinelli and Clark Barrett. a a These notes were developed from a set of lecture notes originally written by Clark Barrett at New York University. These notes are copyrighted material and may not be used in other course settings outside of the University of Iowa in their current form or modified form without the express written permission of the copyright holders. Spring 04, 22c:295 Notes: Rewriting – p.1/25 Spring 04, 22c:295 Notes: Rewriting – p.3/25 Outline Rewriting • Rewriting Consider the general problem of establishing E j= s = t where E • Termination is a set of equations. • Completion Congruence closure handles the case when all equations are ground. (How?) Sources: There cannot be a simple procedure for the more general case Harrison, John. Introduction to Logic and Automated because first order logic with equality is, in general, undecidable. Theorem Proving. Unpublished manuscript. Used by permission. However, often the kind of equational reasoning needed is straightforward: equations are used in a predictable direction to simplify expressions. Using equations in a directional fashion is called rewriting, and there are indeed cases when this technique gives us a decision procedure.
    [Show full text]