“A PROCEDURE FOR CHECKING EQUALITY OF REGULAR EXPRESSIONS” - A. GINZBURG Presented by Kenneth Burgess Ginzburg, A. "A Procedure for Checking Equality of.

Slides:



Advertisements
Similar presentations
Teaching through the Mathematical Processes Session 4: Developing Proficiency with Questioning.
Advertisements

4b Lexical analysis Finite Automata
Lecture 24 MAS 714 Hartmut Klauck
Theory Of Automata By Dr. MM Alam
L ECTURE 3 T HEORY OF AUTOMATA. E QUIVALENT R EGULAR E XPRESSIONS Definition Two regular expressions are said to be equivalent if they generate the same.
Lecture 9,10 Theory of AUTOMATA
Context Free Grammars.
Chapter 7 Relations : the second time around
Linear Transformations
CSCI 2670 Introduction to Theory of Computing October 19, 2005.
COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University.
COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University.
NFA- to NFA conversion. Purpose This presentation presents an example execution of the algorithm which takes as input an NFA with -transitions and produces.
Finite Automata Chapter 5. Formal Language Definitions Why need formal definitions of language –Define a precise, unambiguous and uniform interpretation.
Copyright © Cengage Learning. All rights reserved. 7.6 The Inverse of a Square Matrix.
Graphing Linear Equations
Lecture 03: Theory of Automata:08 Finite Automata.
Basics of automata theory
THEORY OF COMPUTATION 08 KLEENE’S THEOREM.
Lecture 07: Formal Methods in SE Finite Automata Lecture # 07 Qaisar Javaid Assistant Professor.
4b 4b Lexical analysis Finite Automata. Finite Automata (FA) FA also called Finite State Machine (FSM) –Abstract model of a computing entity. –Decides.
Decidable Questions About Regular languages 1)Membership problem: “Given a specification of known type and a string w, is w in the language specified?”
Computer Science 101 Circuit Design - Examples. Sum of Products Algorithm Identify each row of the output that has a 1. Identify each row of the output.
Computability Review homework. Regular Operations. Nondeterministic machines. NFSM = FSM Homework: By hand, build FSM version of specific NFSM. Try to.
Lecture # 12. Nondeterministic Finite Automaton (NFA) Definition: An NFA is a TG with a unique start state and a property of having single letter as label.
Lecture 4 Theory of AUTOMATA
CSC312 Automata Theory Nonregular Languages Chapter # 10 by Cohen
WARM-UP 1.Is the ordered pair (-6,-5) a solution to the inequality 2x -4y < 8? 2. Solve the linear inequalities: a.y > (3/5) x – 3 b.4x – 2y > -3.
Regular Languages Prepared by Manuel E. Bermúdez, Ph.D. Associate Professor University of Florida Programming Language Translators.
Lecture # 15. Mealy machine A Mealy machine consists of the following 1. A finite set of states q 0, q 1, q 2, … where q 0 is the initial state. 2. An.
Mathematical Foundations of Computer Science Chapter 3: Regular Languages and Regular Grammars.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen.
Conversions Regular Expression to FA FA to Regular Expression.
1 Chapter 3 Regular Languages.  2 3.1: Regular Expressions (1)   Regular Expression (RE):   E is a regular expression over  if E is one of:
1 Section 11.2 Finite Automata Can a machine(i.e., algorithm) recognize a regular language? Yes! Deterministic Finite Automata A deterministic finite automaton.
1 Recap lecture 28 Examples of Myhill Nerode theorem, Quotient of a language, examples, Pseudo theorem: Quotient of a language is regular, prefixes of.
L ECTURE 3 T HEORY OF AUTOMATA. E QUIVALENT R EGULAR E XPRESSIONS Definition Two regular expressions are said to be equivalent if they generate the same.
Lecture # 8 (Transition Graphs). Example Consider the language L of strings, defined over Σ={a, b}, having (containing) triple a or triple b. Consider.
Recap Lecture 3 RE, Recursive definition of RE, defining languages by RE, { x}*, { x}+, {a+b}*, Language of strings having exactly one aa, Language of.
Copyright © Cengage Learning. All rights reserved. 8 Matrices and Determinants.
CSCI 2670 Introduction to Theory of Computing
Since all points on the x-axis have a y-coordinate of 0, to find x-intercept, let y = 0 and solve for x Since all points on the y-axis have an x-coordinate.
Generalized Transition Graphs
Lexical analysis Finite Automata
CSCI 2670 Introduction to Theory of Computing
Recap lecture 33 Example of trees, Polish Notation, examples, Ambiguous CFG, example,
Theory of Automata.
Even-Even Devise a grammar that generates strings with even number of a’s and even number of b’s.
Theory of Computation Lecture 22: Turing Machines III
[Week#03,04] (b) - Finite Automata
Notes Over 4.2 Is a Solution Verifying Solutions of an Equation
REGULAR LANGUAGES AND REGULAR GRAMMARS
Recap lecture 29 Example of prefixes of a language, Theorem: pref(Q in R) is regular, proof, example, Decidablity, deciding whether two languages are equivalent.
Kleene’s Theorem Muhammad Arif 12/6/2018.
NFAs and Transition Graphs
4b Lexical analysis Finite Automata
Multiplicative Inverses of Matrices and Matrix Equations
Recap lecture 6 Language of strings, beginning with and ending in different letters, Accepting all strings, accepting non-empty strings, accepting no string,
4b Lexical analysis Finite Automata
Warm Up Problem of the Day Lesson Presentation Lesson Quizzes.
CSC312 Automata Theory Transition Graphs Lecture # 9
RECAP Lecture 7 FA of EVEN EVEN, FA corresponding to finite languages(using both methods), Transition graphs.
Warm Up What three terms come next? 1. 9, 12, 15, 18, . . .
Warm Up What three terms come next? 1. 9, 12, 15, 18, . . .
CSC312 Automata Theory Lecture # 5 Chapter # 4 Cont…
NFAs and Transition Graphs
Recap Lecture 4 Regular expression of EVEN-EVEN language, Difference between a* + b* and (a+b)*, Equivalent regular expressions; sum, product and closure.
Recap Lecture 3 RE, Recursive definition of RE, defining languages by RE, { x}*, { x}+, {a+b}*, Language of strings having exactly one aa, Language of.
LECTURE # 07.
Lesson 4.1: Identifying linear functions
Presentation transcript:

“A PROCEDURE FOR CHECKING EQUALITY OF REGULAR EXPRESSIONS” - A. GINZBURG Presented by Kenneth Burgess Ginzburg, A. "A Procedure for Checking Equality of Regular Expressions." Journal of the ACM 14.2 (1967): Web.

CONNECTION TO CLASS  FA -> TG -> RE -> FA  Polymorphism  In acquiescence to the insatiable demands of a ravening appetite, I require sustenance in the form of ingested nutrition.  Yes.  The Equality Dilemma

MOTIVE – WHY THIS MATTERS  Algorithmic  Which translates into…

FINALLY, THE PROCEDURE  Taking advantage of polymorphism  RE -> TG -> Finite set of left linear equations Y = aY a + bY b + ^ Y a = aY aa + bY ab Y b = aY ba + bY bb  If each possible pairing of derivatives share “^”, the RE’s are equal.

THE THEORY BEHIND  Taking derivatives of a RE  Definition of a derivative  R = ab+bab(a+b)*  An example derivative: R(b) = ab(a+b)*  You try: R(a) =

LINEAR EQUATIONS  Now we take the finite set of !!unequal!! derivatives  R = a + ba* R = aR a + bR b R a = aR aa + bR ab + ^ = aR aa + bR ab + ^ R b = aR ba + bR bb + ^ = aR b + bR aa + ^ R aa = aR aaa + bR aab = aR aa + bR aa

CHARACTERISTICS OF DERIVATIVES  Every RE has a finite number of unequal derivatives  Similar to our proposition -> every RE will produce a TG of finite states  Every derivative has a corresponding set of vertices in the graph  In short, R x is rep. by the same TG as R, but with A x as initial vertice

EXAMPLE – R ~ S

PAIRS  # of distinct derivatives = # of distinct sets of beginning inputs  To consider equality, we have to consider all possible beginning inputs for both regular expressions  u (the number of pairs of inputs we have to consider) <= mn  u (distinct pairs of R and S) <= m (distinct derivatives of R) n (distinct derivatives of S)

PAIRS OF R AND S Pair (R x,S x )InfersR has ^?S has ^? (^,^)(a,a)(b,b) (a,a)Yep (b,b)(ba,ba)Yep However, we do not continue, since ba is considered equal to b Since the columns R has ^? and S has ^? agree, the two RE’s are equivalent.

TABLE REPRESENTATION InputsVertices of REqual To^? 123 ^x axx bxx baxbx To streamline this process, we create tables of equivalencies – showing derivatives (or inputs), vertices corresponding, and whether they include ^.

HOW DOES THIS HELP US? Examine T 0 When 0 is inputted into the graph, 2 -> 4 3 -> 2

HOW DOES THIS HELP US? Examine T ^ When ^ is put into the graph, what happens?

HOW DOES THIS HELP US? A ^ are the starting vertices So A ^ T ^ = A ^ Relational functions… so 2 T 1 = 2 (does nothing) 2 T 0 = 4 (input 2, get out 4) 2 T ^ = 2,3

HOW DOES THIS HELP US? - A(10) can be computed by relational functions. - Computers can produce the derivatives. - Computers can check equivalency as long as they keep track of which states are accepting states

TO REVIEW  RE -> TG  Construct table representation of possible inputs  Represent TG as set of relational matrices  Determine U, the set of unique pairs of R and S inputs  For each pair in U, determine if both R and S agree on whether or not they accept