Historical Perspectives

Slides:



Advertisements
Similar presentations
CS2303-THEORY OF COMPUTATION Closure Properties of Regular Languages
Advertisements

Complexity and Computability Theory I Lecture #4 Rina Zviel-Girshin Leah Epstein Winter
Nondeterministic Finite Automata CS 130: Theory of Computation HMU textbook, Chapter 2 (Sec 2.3 & 2.5)
8/27/2009 Sofya Raskhodnikova Intro to Theory of Computation L ECTURE 2 Theory of Computation Finite Automata Operations on languages Nondeterminism L2.1.
Historical Perspectives Stephen Kleene ( ) Founded recursive function theory Pioneered theoretical computer science Student of Alonzo Church; was.
Formal Languages: Review Alphabet: a finite set of symbols String: a finite sequence of symbols Language: a set of strings String length: number of symbols.
Nathan Brunelle Department of Computer Science University of Virginia Theory of Computation CS3102 – Spring 2014 A tale.
1 Languages. 2 A language is a set of strings String: A sequence of letters Examples: “cat”, “dog”, “house”, … Defined over an alphabet: Languages.
Finite Automata Great Theoretical Ideas In Computer Science Anupam Gupta Danny Sleator CS Fall 2010 Lecture 20Oct 28, 2010Carnegie Mellon University.
Lecture 3UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 3.
Courtesy Costas Busch - RPI1 Non Deterministic Automata.
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.
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Regular.
1 Languages and Finite Automata or how to talk to machines...
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.
Normal forms for Context-Free Grammars
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
1 Non-Deterministic Finite Automata. 2 Alphabet = Nondeterministic Finite Automaton (NFA)
Nathan Brunelle Department of Computer Science University of Virginia Theory of Computation CS3102 – Spring 2014 A tale.
Nathan Brunelle Department of Computer Science University of Virginia Theory of Computation CS3102 – Spring 2014 A tale.
Regular Languages A language is regular over  if it can be built from ;, {  }, and { a } for every a 2 , using operators union ( [ ), concatenation.
Context-Free and Noncontext-Free Languages Chapter 13 1.
CS 208: Computing Theory Assoc. Prof. Dr. Brahim Hnich Faculty of Computer Sciences Izmir University of Economics.
INHERENT LIMITATIONS OF COMPUTER PROGAMS CSci 4011.
UNIT - I Formal Language and Regular Expressions: Languages Definition regular expressions Regular sets identity rules. Finite Automata: DFA NFA NFA with.
Finite Automata Great Theoretical Ideas In Computer Science Victor Adamchik Danny Sleator CS Spring 2010 Lecture 20Mar 30, 2010Carnegie Mellon.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen.
 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.
1 Introduction to the Theory of Computation Regular Expressions.
Complexity and Computability Theory I Lecture #5 Rina Zviel-Girshin Leah Epstein Winter
Set, Alphabets, Strings, and Languages. The regular languages. Clouser properties of regular sets. Finite State Automata. Types of Finite State Automata.
1/29/02CSE460 - MSU1 Nondeterminism-NFA Section 4.1 of Martin Textbook CSE460 – Computability & Formal Language Theory Comp. Science & Engineering Michigan.
Topic 3: Automata Theory 1. OutlineOutline Finite state machine, Regular expressions, DFA, NDFA, and their equivalence, Grammars and Chomsky hierarchy.
Languages.
Non Deterministic Automata
Properties of Regular Languages
Natural Language Processing - Formal Language -
CSE 105 theory of computation
Formal Language & Automata Theory
Chapter 2 Finite Automata
Complexity and Computability Theory I
Formal Languages: Review
Hierarchy of languages
Formal Languages Alphabet: a finite set of symbols
Formal Languages Alphabet: a finite set of symbols
Non-Deterministic Finite Automata
Formal Languages Alphabet: a finite set of symbols
CS 154, Lecture 3: DFANFA, Regular Expressions.
Principles of Computing – UFCFA3-30-1
COSC 3340: Introduction to Theory of Computation
Non-Deterministic Finite Automata
CSE322 Definition and description of finite Automata
Non Deterministic Automata
CSE 2001: Introduction to Theory of Computation Fall 2009
FORMAL LANGUAGES, AUTOMATA, AND COMPUTABILITY
Formal Languages Alphabet: a finite set of symbols
Instructor: Aaron Roth
Instructor: Aaron Roth
Formal Languages: Review
Chapter 1 Regular Language
Formal Languages Alphabet: a finite set of symbols
Finite-State Machines with No Output
Formal Languages Alphabet: a finite set of symbols
CSCI 2670 Introduction to Theory of Computing
CSE 105 theory of computation
Formal Languages: Review
CHAPTER 1 Regular Languages
NFAs accept the Regular Languages
CSCI 2670 Introduction to Theory of Computing
Presentation transcript:

Historical Perspectives Stephen Kleene (1909-1994) Founded recursive function theory Pioneered theoretical computer science Student of Alonzo Church; was at the Institute for Advanced Study (1940) Invented regular expressions Kleene star / closure, Kleene algebra, Kleene recursion theorem, Kleene fixed point theorem, Kleene-Rosser paradox “Kleeneliness is next to Gödeliness”

Historical Perspectives Noam Chomsky (1928-) Linguist, philosopher, cognitive scientist, political activist, dissident, author Father of modern liguistics Pioneered formal languages Developed generative grammars Invented context-free grammars Defined the Chomsky hierarchy Influenced cognitive psychology, philosophy of language and mind Chomskyan linguistics, Chomskyan syntax, Chomskyan models Critic of U.S. foreign policy Most widely cited living scholar Eighth most-cited source overall!

“…I must admit to taking a copy of Noam Chomsky's ‘Syntactic Structures’ along with me on my honeymoon in 1961 … Here was a marvelous thing: a mathematical theory of language in which I could use as a computer programmer's intuition!” - Don Knuth on Chomsky’s influence

Formal Languages: Review Alphabet: a finite set of symbols String: a finite sequence of symbols Language: a set of strings String length: number of symbols in it String concatenation: w1w2 Empty string: e or ^ Language concatenation: L1L2={w1w2 | w1ÎL1, w2ÎL2} String exponentiation: wk = ww…w (k times) Language exponentiation: Lk = LL…L (k times) LL = L2 Lk=LLk-1 L0={e} S={a,b} ababbaab L={a,aa,aaa,…} |aba|=3 ab•ba=abba "w w•e = e•w = w {1,2}•{a,aa,…} ={1a,2a,1aa,2aa,…} a3=aaa {0,1}32

Formal Languages: Review String reversal: wR Language reversal: LR ={wR | wÎL} Kleene closure: L* = L0 È L1 È L2 È L3 È ... L+ = L1 È L2 È L3 È L4 È ... Theorem: L+ = LL* Trivial language: {e} Empty language: Ø All finite strings: S* LÍS* "L Theorem: S* is countable, |S*| = |Z| Theorem: 2S* is uncountable. Theorem: S* contains no infinite strings. Theorem: (L*)* =L* (aabc)R=cbaa {ab,cd}R={ba,dc} {a}* {a}+ {e}•L=L•{e}=L Ø*={e} {a,aa,…}•{1,2} dovetailing diagonalization finite strings in Si L*Í(L*)* & (L*)*ÍL*

Finite Automata: Review Basic idea: a FA is a “machine” that changes states while processing symbols, one at a time. Finite set of states: Q = {q0, q1, q3, ..., qk} Transition function: d: Q´S ® Q Initial state: q0 Î Q Final states: F Í Q Finite automaton is M=(Q, S, d, q0, F) Ex: an FA that accepts all odd-length strings of zeros: q1 qi qj q0 qk q0 q1 M=({q0,q1}, {0}, {((q0,0),q1), ((q1,0),q0)}, q0, {q1})

Finite Automata: Review FA operation: consume a string wÎS* one symbol at a time while changing states Acceptance: end up in a final state Rejection: anything else (including hang-up / crash) Ex: FA that accepts all strings of form abababab…= (ab)* M=({q0,q1}, {a,b}, {((q0,a),q1), ((q1,b),q0)}, q0, {q0}) But M “crashes” on input string “abba”! Solution: add dead-end state to fully specify M M’=({q0,q1,q2}, {a,b}, {((q0,a),q1), ((q1,b),q0), ((q0,b),q2), ((q1,b),q2). ((q2,a),q2), ((q2,b),q2) }, q0, {q0}) M a q0 q1 b b a q2 M’ a,b

Finite Automata: Review Transition function d extends from symbols to strings: d:Q´S*®Q d(q0,wx) = d(d(q0,w),x) where d(qi,e) = qi Language of M is L(M)={wÎS*| d(q0,w) ÎF} Definition: a language is regular iff it is accepted by some FA. Theorem: Complementation preserves regularity. Proof: Invert final and non-final states in fully specified FA. q1 a b q0 q2 a,b M q1 a b q0 q2 a,b M’ L(M)=(ab)* L(M’)= b(a+b)* + (a+b)*a + (a+b)*(aa+bb)(a+b)* M’ “simulates” M and does the opposite! Why are these complements?

Finite Automata: Review Theorem: Intersection perserves regularity. Proof: (“parallel” simulation): Construct all super-states, one per each state pair. New super-transition function jumps among super-states, simulating old transition function Initial super state contains both old initial states. Final super states contains pairs of old final states. Resulting DFA accepts same language as original NFA (but size can be the product of two old sizes). Given M1=(Q1, S, d1, q’, F1) and M2=(Q2, S, d2 , q”, F2) construct M=(Q, S, d, q, F) Q = Q1´Q2 F = F1´F2 q=(q’,q”) d :Q´S ® Q d((qi,qj),x) = (d1(qi,x),d2(qj,x)) “cross product construction”

Finite Automata: Review Theorem: Union preserves regularity. Proof: De Morgan's law: L1 È L2 = L1 Ç L2 Or cross-product construction, i.e., parallel simulation with F = (F1´Q2) È (Q1´F2) Theorem: Set difference preserves regularity. Proof: Set identity L1 – L2 = L1 Ç L2 parallel simulation with F = (F1´(Q2 –F2)) Theorem: XOR preserves regularity. Proof: Set identity L1 Å L2 = (L1 È L2) – (L1 Ç L2) parallel simulation with F = (F1´(Q2–F2)) È ((Q1–F1)´F2) Meta-Theorem: Identity-based proofs are easier!

Finite Automata: Review Non-determinism: generalizes determinism, where many “next moves” are allowed at each step: Old d:Q´S ® Q New d:2Q´S ® 2Q Computation becomes a “tree”. Acceptance: $ a path from root (start state) to some leaf (a final state) Ex: non-deterministically accept all strings where the 7th symbol before the end is a “b”: q0 b q1 a,b q2 a,b q3 a,b q4 a,b q5 a,b q6 a,b q7 a,b Input: a b a b b a a a Þ Accept!

Finite Automata: Review Theorem: Non-determinism in FAs does not increase power. Proof: by simulation: Construct all super-states, one per each state subset. New super-transition function jumps among super-states, simulating old transition function Initial super state are those containing old initial state. Final super states are those containing old final states. Resulting DFA accepts the same language as original NFA, but can have exponentially more states. “powerset construction” Q: Why doesn’t this work for PDAs?

Finite Automata: Review Note: The powerset construction generalizes the cross-product construction. Other, more general constructions are possible. EC: Let HALF(L)={v | $ v,w Î S* ' |v|=|w| and vw e L} Show that HALF preserves regularity. A two way FA can move its head backwards on the input: d:Q´S ® Q´{left,right} EC: Show that two-way FA are not more powerful than ordinary one-way FA. e-transitions: Theorem: e-transitions do not increase FA recognition power. Proof: Simulate e-transitions FA without using e-transitions. i.e., consider e-transitions to be a form of non-determinism. qi qj e qi e qj One super-state!

The movie “Next” (2007) Based on the science fiction story “The Golden Man” by Philip Dick Premise: a man with the super power of non-determinism! At any given moment his reality branches into multiple directions, and he can choose the branch that he prefers! Transition function!

Regular Expressions: Review Regular expressions are defined recursively as follows: Ø empty set {e} trivial language {x} " xÎS singleton language q0 q1 x q0 q0 Inductively, if R and S are regular expressions, then so are: (R+S) union RS concatenation R* Kleene closure M1 e M1 e M2 e M e M2 e Compositions! e Examples: aa(a+b)*bb (a+b)*b(a+b)*a(a+b)* Theorem: Any regular expression is accepted by some FA.