Finite Model Theory Lecture 11

Slides:



Advertisements
Similar presentations
Chapter 2 Revision of Mathematical Notations and Techniques
Advertisements

1 Conditional XPath, the first order complete XPath dialect Maarten Marx Presented by: Einav Bar-Ner.
Regular operations Sipser 1.1 (pages 44 – 47). CS 311 Mount Holyoke College 2 Building languages If L is a language, then its complement is L’ = {w |
1 Finite Model Theory Lecture 10 Second Order Logic.
Transparency No. 4-1 Formal Language and Automata Theory Chapter 4 Patterns, Regular Expressions and Finite Automata (include lecture 7,8,9) Transparency.
Lecture 3 Goals: Formal definition of NFA, acceptance of a string by an NFA, computation tree associated with a string. Algorithm to convert an NFA to.
1 Finite Model Theory Lecture 13 FO k, L k 1, ,L  1, , and Pebble Games.
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Regular.
Validating Streaming XML Documents Luc Segoufin & Victor Vianu Presented by Harel Paz.
Foundations of (Theoretical) Computer Science Chapter 2 Lecture Notes (Section 2.2: Pushdown Automata) Prof. Karen Daniels, Fall 2009 with acknowledgement.
1 Regular Grammars Generate Regular Languages. 2 Theorem Regular grammars generate exactly the class of regular languages: If is a regular grammar then.
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Nondeterminism.
Theory of Computing Lecture 22 MAS 714 Hartmut Klauck.
Regular Languages A language is regular over  if it can be built from ;, {  }, and { a } for every a 2 , using operators union ( [ ), concatenation.
Regular Expressions. Notation to specify a language –Declarative –Sort of like a programming language. Fundamental in some languages like perl and applications.
Introduction to CS Theory Lecture 3 – Regular Languages Piotr Faliszewski
1 State SymbolRead- Q E(Q) a b a b a b Convert to a DFA: Start state: Final States:
Regular Grammars Chapter 7. Regular Grammars A regular grammar G is a quadruple (V, , R, S), where: ● V is the rule alphabet, which contains nonterminals.
Regular Grammars Chapter 7 1. Regular Grammars A regular grammar G is a quadruple (V, , R, S), where: ● V is the rule alphabet, which contains nonterminals.
Theory of Computation, Feodor F. Dragan, Kent State University 1 TheoryofComputation Spring, 2015 (Feodor F. Dragan) Department of Computer Science Kent.
1 Finite Model Theory Lecture 3 Ehrenfeucht-Fraisse Games.
Chapter 3 Regular Expressions, Nondeterminism, and Kleene’s Theorem Copyright © 2011 The McGraw-Hill Companies, Inc. Permission required for reproduction.
Foundations of (Theoretical) Computer Science Chapter 2 Lecture Notes (Section 2.2: Pushdown Automata) Prof. Karen Daniels, Fall 2010 with acknowledgement.
Introduction Finite Automata accept all regular languages and only regular languages Even very simple languages are non regular (  = {a,b}): - {a n b.
Finite Automata Chapter 1. Automatic Door Example Top View.
Lecture 2 Overview Topics What I forgot from last lecture Proof techniques continued Alphabets, strings, languages Automata June 2, 2015 CSCE 355 Foundations.
Transparency No. 4-1 Formal Language and Automata Theory Chapter 4 Patterns, Regular Expressions and Finite Automata (include lecture 7,8,9) Transparency.
1 Finite Model Theory Lecture 5 Turing Machines and Finite Models.
 2004 SDU Lecture4 Regular Expressions.  2004 SDU 2 Regular expressions A third way to view regular languages. Say that R is a regular expression if.
P Symbol Q E(Q) a b a b a b Convert to a DFA: Start state: Final States:
1/29/02CSE460 - MSU1 Nondeterminism-NFA Section 4.1 of Martin Textbook CSE460 – Computability & Formal Language Theory Comp. Science & Engineering Michigan.
1 Context-Free Languages & Grammars (CFLs & CFGs) Reading: Chapter 5.
1 Finite Model Theory Lecture 9 Logics and Complexity Classes (cont’d)
Context-Free Languages & Grammars (CFLs & CFGs) (part 2)
BCS2143 – Theory of Computer Science
Context-Free Languages & Grammars (CFLs & CFGs)
Formal Language & Automata Theory
Regular grammars Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section
Regular Expressions.
CS314 – Section 5 Recitation 3
PARSE TREES.
Context-Free Languages
Hierarchy of languages
Chapter 7 Regular Grammars
CS 154, Lecture 3: DFANFA, Regular Expressions.
Non-Deterministic Finite Automata
Context-Free Languages
Finite Automata and Formal Languages
CSE 311: Foundations of Computing
Introduction to Finite Automata
Finite Automata.
Properties of Context-Free Languages
Finite Model Theory Lecture 2
Finite Model Theory Lecture 6
Lecture 10: Query Complexity
Compiler Construction
CS21 Decidability and Tractability
Convert to a DFA: Start state: Final States: State Symbol Read- Q E(Q)
Finite Model Theory Lecture 4
Regular grammars Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section
Convert to a DFA: Start state: Final States: P Symbol Q E(Q) a b.
Chapter 1 Regular Language
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
CSCI 2670 Introduction to Theory of Computing
Regular grammars Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section
CSC312 Automata Theory Lecture # 24 Chapter # 11 by Cohen Decidability.
PZ02B - Regular grammars Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section PZ02B.
CSCE 355 Foundations of Computation
COSC 3340: Introduction to Theory of Computation
COSC 3340: Introduction to Theory of Computation
Presentation transcript:

Finite Model Theory Lecture 11 Second Order Logic

Outline Chapter 7 in the textbook: Games for SO, application to reachability Buchi’s theorem Star Free Languages Tree automata

Buchi’s Theorem Proof Part 1: regular languages µ MSO Every regular language is in 9MSO [in class] Every regular language is in 8 MSO [in class]

Buchi’s Theorem MSO µ regular languages This is harder: let f 2 MSO. Need to show that the set {M | M ² f} is regular Proof 1 (not in the book): induction on f [in class] Proof 2 (from the book): using types [in class]

Applications Corollary Over strings, 9 MSO = 8 MSO = MSO Does this hold in general ?

Applications Consider s = {<} A structure M = a string in {1}* = a number What sets of natural numbers are definable in MSO ?

Applications Proposition Hamiltonean path on undirected graphs is not definable in MSO Proof in class

Star-free regular languages Let S = {a,b,c} (can be larger in general) A regular language is defined by the grammar: E ::= ; E ::= e | a | b | c E ::= E [ E E ::= E.E E ::= E* A star-free regular language: drop E*, add E (need overline, not underline)

Star-free Regular Languages Which of the following are star-free ? Theorem L is star-free iff it is in FO. L is regular iff it is in MSO {ab, accb, ca} S* a* {a,b}* ((a [ b).c)*

Ranked Trees A ranked alphabet is a set S and r : S ! N For a 2 S, r = r(a) ¸ 0 is it’s rank; also write ar Rank(S)=max(r(a) | a 2 S) A ranked tree T is a tree labeled with symbols in S s.t. each node x labeled with a has exactly r(a) children

Tree Automtata Notations: Trees(S) A tree language is L µ Tree(S) This generalizes languages over strings (why ?)

Example Symbolic expressions: S = {a,b,c,f1,g2,h2,k3} h f h k b b a c

Not needed Tree Automata A = (S, Q, q0, d, F) where: q0 2 Q, F µ Q d is a set of tuples of the form: (w, a, q) w 2 Q*, a 2 S, q 2 Q, s.t. |w| = r(a) Execution: given a tree T, A executes bottom up or top down [show in class] A language L µ Tree[S] is a regular tree language iff there exists A s.t. L = {T | T accepted by A}

Tree Automata Example: S = {0,1,:, Æ, Ç} A = (S, Q, q0, d, F) Q = {false, true} q0 = (not needed) F = { true } d = (e, 0, false), (e, 1, true) (false, :, true), (true, :, false) (false.false, Æ, false), …, (true.true, Æ, true) (false.false, Ç, false), …, (true.true, Ç, true)

Ranked Trees as Structures Let’s restrict to Rank(S) = 2 easy to generalize Let s = {<, (Pa)a 2 S, succ1, succ2} Consider only structures in STRUCT[s] that are trees, where < is the ancestor-descendant relation, and succ1, succ2 are the left and right child respectively

MSO and Regular Tree Languages Theorem A set of trees is definable in MSO iff it is regular Proof: almost identical to Buchi’s theorem What are star-free regular tree languages ?