Complexity and Computability Theory I Lecture #2 Rina Zviel-Girshin Leah Epstein Winter 2002-2003.

Slides:



Advertisements
Similar presentations
Complexity and Computability Theory I Lecture #4 Rina Zviel-Girshin Leah Epstein Winter
Advertisements

1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 3 School of Innovation, Design and Engineering Mälardalen University 2012.
FORMAL LANGUAGES, AUTOMATA, AND COMPUTABILITY
1 Languages. 2 A language is a set of strings String: A sequence of letters Examples: “cat”, “dog”, “house”, … Defined over an alphabet: Languages.
1 Introduction to Computability Theory Lecture3: Regular Expressions Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture3: Regular Expressions Prof. Amos Israeli.
Lecture 3UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 3.
1 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY (For next time: Read Chapter 1.3 of the book)
CS5371 Theory of Computation
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.
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.
79 Regular Expression Regular expressions over an alphabet  are defined recursively as follows. (1) Ø, which denotes the empty set, is a regular expression.
Fall 2006Costas Busch - RPI1 Non-Deterministic Finite Automata.
CS5371 Theory of Computation Lecture 4: Automata Theory II (DFA = NFA, Regular Language)
Fall 2004COMP 3351 Another NFA Example. Fall 2004COMP 3352 Language accepted (redundant state)
Costas Busch - LSU1 Non-Deterministic Finite Automata.
Great Theoretical Ideas in Computer Science.
Relations Chapter 9.
Finite-State Machines with No Output
DECIDABILITY OF PRESBURGER ARITHMETIC USING FINITE AUTOMATA Presented by : Shubha Jain Reference : Paper by Alexandre Boudet and Hubert Comon.
1 Chapter 1 Automata: the Methods & the Madness Angkor Wat, Cambodia.
Theory of Computation, Feodor F. Dragan, Kent State University 1 Regular expressions: definition An algebraic equivalent to finite automata. We can build.
Chapter 9. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing Relations.
Lecture 07: Formal Methods in SE Finite Automata Lecture # 07 Qaisar Javaid Assistant Professor.
Chapter 9. Section 9.1 Binary Relations Definition: A binary relation R from a set A to a set B is a subset R ⊆ A × B. Example: Let A = { 0, 1,2 } and.
Great Theoretical Ideas in Computer Science.
1 Course Overview PART I: overview material 1Introduction 2Language processors (tombstone diagrams, bootstrapping) 3Architecture of a compiler PART II:
Complexity and Computability Theory I Lecture #9 Instructor: Rina Zviel-Girshin Lea Epstein.
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 3 Mälardalen University 2010.
Kleene’s Theorem Group No. 3 Presented To Mam Amina Presented By Roll No Roll No Roll No Roll No Group No. 3 Presented To Mam.
Mathematical Preliminaries
Complexity and Computability Theory I Lecture #11 Instructor: Rina Zviel-Girshin Lea Epstein.
Complexity and Computability Theory I Lecture #8 Instructor: Rina Zviel-Girshin Lea Epstein.
Chapter 9. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing Relations.
Finite State Machines 1.Finite state machines with output 2.Finite state machines with no output 3.DFA 4.NDFA.
Modeling Computation: Finite State Machines without Output
Lecture Notes 
Great Theoretical Ideas in Computer Science for Some.
1 Language Recognition (11.4) Longin Jan Latecki Temple University Based on slides by Costas Busch from the courseCostas Busch
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen.
Conversions Regular Expression to FA FA to Regular Expression.
Complexity and Computability Theory I Lecture #5 Rina Zviel-Girshin Leah Epstein Winter
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 Chapter Pushdown Automata. 2 Section 12.2 Pushdown Automata A pushdown automaton (PDA) is a finite automaton with a stack that has stack operations.
Complexity and Computability Theory I Lecture #12 Instructor: Rina Zviel-Girshin Lea Epstein.
Lecture 14: Theory of Automata:2014 Finite Automata with Output.
Lecture #4 Thinking of designing an abstract machine acts as finite automata. Advanced Computation Theory.
Lecture #5 Advanced Computation Theory Finite Automata.
1/29/02CSE460 - MSU1 Nondeterminism-NFA Section 4.1 of Martin Textbook CSE460 – Computability & Formal Language Theory Comp. Science & Engineering Michigan.
Theory of Computation Automata Theory Dr. Ayman Srour.
Chapter 1 INTRODUCTION TO THE THEORY OF COMPUTATION.
Introduction to Automata Theory Theory of Computation Lecture 3 Tasneem Ghnaimat.
Finite Automata.
Complexity and Computability Theory I
Languages.
Non Deterministic Automata
Complexity and Computability Theory I
THEORY OF COMPUTATION Lecture One: Automata Theory Automata Theory.
COSC 3340: Introduction to Theory of Computation
Non-Deterministic Finite Automata
Introduction to Finite Automata
CSE 2001: Introduction to Theory of Computation Fall 2009
Deterministic Finite Automaton (DFA)
Recap lecture 19 NFA corresponding to Closure of FA, Examples, Memory required to recognize a language, Example, Distinguishing one string from another,
Finite-State Machines with No Output
CSCI 2670 Introduction to Theory of Computing
Recap Lecture 4 Regular expression of EVEN-EVEN language, Difference between a* + b* and (a+b)*, Equivalent regular expressions; sum, product and closure.
What is it? The term "Automata" is derived from the Greek word "αὐτόματα" which means "self-acting". An automaton (Automata in plural) is an abstract self-propelled.
Presentation transcript:

Complexity and Computability Theory I Lecture #2 Rina Zviel-Girshin Leah Epstein Winter

Rina Overview Proofs Finite Automaton

Rina Proofs Four main types: –direct proof (syllogism) –proof by construction –proof by contradiction –proof by induction

Rina Direct proof axioms + rules of deduction (modus ponens)  theorems axioms + theorems + rules of deduction  theorems All philosophers are wise. Socrates is a philosopher. Socrates is wise. modus ponens: a, a  b  b

Rina Proof by Construction The idea: prove by building a solution (algorithm, automaton) Example: Theorem: There exists a graph with no edges. Proof: Construct such a graph: Q.E.D.

Rina Proof by Contradiction The idea: assume the opposite of the theorem derive a contradiction

Rina Example Theorem: There does not exist a “greatest natural number” (i.e. N is infinite). Proof: Assume that there is a greatest natural number. Call it x. From our assumption it is obvious that no larger number can exist. Let y = x+1. y is greater than x. y is a natural number. Contradiction to the assumption that x is a greatest natural number. Q.E.D.

Rina Proof by Induction Three main part: basis of induction induction hypothesis induction step Two types of induction: Partial induction Full induction

Rina Partial induction Basis of induction – the theorem is true for some natural number k (usually 0, 1) Induction hypothesis - we assume that the theorem is true for some n Induction step - proof that assuming the theorem is true for n, it is true for n+1

Rina Full induction Basis of induction – the theorem is true for some natural number k (usually 0, 1) Induction hypothesis - we assume that the theorem is true for all x  n Induction step - proof that assuming theorem is true for all x  n, it is true for n+1

Rina Example Theorem: The number of edges in a tree equals to the number of vertices minus 1 (|E|=|V|-1). Proof (by induction on number of vertices): Let n be the number of vertices. Induction basis: for n=1, a tree of a single vertex has n-1=0 edges. The theorem is, therefore true. Induction hypothesis:The theorem is true for some n  1 i.e. number of edges in it is n-1. Induction step:A tree of n+1 vertices is a tree of n vertices, with addition of exactly one vertex and exactly one edge. Therefore the number of edges in the new tree is: The number of edges in a tree of n vertices +1 = (n-1) + 1 = n, where n = number of vertices in the new tree minus 1.

Rina Finite Automata Informally - our model will include basically: states transition between states as a reaction to some input w: Automaton: 

Rina Example

Rina Formal Definition A finite automaton FA is a 5-tuple (Q, , , q 0, F), where: Q - a finite set of states (all the legal states of the automaton)  - alphabet (a finite set of symbols - alphabet of the input)  - transition function - Q  Q (given a state and input symbol - what is the next state to be in) q 0 - q 0  Q is the start state (the initial state, before input) F - F  Q the set of accept states

Rina Modus operandi Each state can be accepting or not. The automaton reads one symbol of the input word (i.e. one letter) at a time. On each symbol it moves to a new state (defined in transition function) by: –The current state –The symbol read The automaton stops after the last symbol in the input word is read. If the state in which it stops is accepting - the automaton accepts (recognized the input word).

Rina Language of an automaton Language of an automaton A : L(A) Informally: the words that A accepts (recognizes), i.e. when reading them it stops in an accepting state.

Rina Graphical representation A: accepting state not accepting state starting state The language of A: L(A)= { w | |w| is even over  ={0,1}}

Rina Graphical representation A circle represents a state of the automaton. The transition function, delta, is represented by directed and labeled edges between states. Final states have a double circle. The start state has an incoming arrow.

Rina Example Construct an automaton B accepting the following language: L(B)= { w | |w| is odd over  ={a,b,c}} B:

Rina Example Construct an automaton C accepting the following language: L(C)= { w | w  *,  ={a,b,c} and a last letter of w is c} C:

Rina Example Construct an automaton D accepting the following language: L(D)= { w | w is over  * } D:

Rina Example Construct an automaton accepting the empty language: L= 

Rina Example Construct an automaton accepting the following language: L= { w | |w| mod 4=0 is over  * } E:

Rina State diagram A graphical representation of a finite automaton FA is also called a state diagram. Given a formal definition of the FA one can draw its state diagram. Given a state diagram one can write a formal definition of the FA..

Rina Example Consider the finite-state automaton A defined by the state diagram shown below: What are the states Q of A? Q={q0,q1,q2}

Rina Example Consider the finite-state automaton A defined by the state diagram shown below: What is the alphabet  of A?  ={a,b}

Rina Example Consider the finite-state automaton A defined by the state diagram shown below: What is the start state of A? q0

Rina Example Consider the finite-state automaton A defined by the state diagram shown below: What are the accept states F of A? F ={q0,q1}

Rina Example Create the transition table  A of A AA ab q0q1q0 q1 q2 q1q0

Rina Formal description of A The formal description of A is: A={Q={q0,q1,q2},  ={a,b},  A, q0, F={q0,q1}}

Rina Transition function Motivation:  ( delta )  : Q  Q The transition function  defines the movement of an automaton from one state to another. Transition function input is an ordered pair: (current state, current input symbol). For each pair of "current state" and "current input symbol" the transition function produces as output the next state in the automaton.

Rina Example  (q0,a)=q1 means that state q1 is reachable from state q0 by the transition labeled by the input symbol a. where q0 is a current state a is an input symbol q1 is an output state also called “next state” q0 q1 a

Rina FA description Draw a FSA according to given  and F. State/ input symbol 01 q0q1q3 q1 q2 q1q2 q3 F={q1} ::

Rina Example

Rina Extended transition function Notation:  ’  ’: Q  *  Q The extended transition function  ’ defines the movement of an automaton on word w= u . Formal definition  ’(q,u  )=  (  ’(q,u),  )=m

Rina Example qkm  u where  ’(q,u  )=  (  ’(q,u),  )=  (k,  )= m

Rina The language of an automaton Informally: the words that A accepts (recognizes), i.e. when reading them it stops in an accepting state. Formally: L(A)={x| x  *,  ’( q 0,x)  F}