CSCI 2670 Introduction to Theory of Computing August 24, 2005.

Slides:



Advertisements
Similar presentations
CS 208: Computing Theory Assoc. Prof. Dr. Brahim Hnich Faculty of Computer Sciences Izmir University of Economics.
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)
CSE 105 Theory of Computation Alexander Tsiatas Spring 2012 Theory of Computation Lecture Slides by Alexander Tsiatas is licensed under a Creative Commons.
Finite Automata Section 1.1 CSC 4170 Theory of Computation.
Introduction to Computability Theory
Intro to DFAs Readings: Sipser 1.1 (pages 31-44) With basic background from Sipser 0.
Introduction to Computability Theory
Intro to DFAs Readings: Sipser 1.1 (pages 31-44) With basic background from Sipser 0.
Lecture 3UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 3.
Finite Automata and Non Determinism
CS5371 Theory of Computation
Courtesy Costas Busch - RPI1 Non Deterministic Automata.
Finite Automata Finite-state machine with no output. FA consists of States, Transitions between states FA is a 5-tuple Example! A string x is recognized.
Fall 2006Costas Busch - RPI1 Deterministic Finite Automata And Regular Languages.
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.
CS 310 – Fall 2006 Pacific University CS310 Finite Automata Sections: September 1, 2006.
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.
CS5371 Theory of Computation Lecture 4: Automata Theory II (DFA = NFA, Regular Language)
1 Regular Languages Finite Automata eg. Supermarket automatic door: exit or entrance.
1.Defs. a)Finite Automaton: A Finite Automaton ( FA ) has finite set of ‘states’ ( Q={q 0, q 1, q 2, ….. ) and its ‘control’ moves from state to state.
Finite Automata Costas Busch - RPI.
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
Regular Languages A language is regular over  if it can be built from ;, {  }, and { a } for every a 2 , using operators union ( [ ), concatenation.
Nondeterministic Finite Automata CS 130: Theory of Computation HMU textbook, Chapter 2 (Sec 2.3 & 2.5)
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
REGULAR LANGUAGES.
Theory of Languages and Automata
1 For each language, give a regular expression that generates the language and a DFA that accepts it. L 1 = { w  {0, 1}* : has both 00 and 11 as substrings}
Athasit Surarerks THEORY OF COMPUTATION 07 NON-DETERMINISTIC FINITE AUTOMATA 1.
Languages Given an alphabet , we can make a word or string by concatenating the letters of . Concatenation of “x” and “y” is “xy” Typical example: 
CSCI 2670 Introduction to Theory of Computing August 26, 2004.
CSCI 2670 Introduction to Theory of Computing August 25, 2005.
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 3 Mälardalen University 2010.
Finite Automata – Definition and Examples Lecture 6 Section 1.1 Mon, Sep 3, 2007.
Deterministic Finite Automata CS 130: Theory of Computation HMU textbook, Chapter 2 (Sec 2.2)
CS 208: Computing Theory Assoc. Prof. Dr. Brahim Hnich Faculty of Computer Sciences Izmir University of Economics.
INHERENT LIMITATIONS OF COMPUTER PROGAMS CSci 4011.
August 23, 2005 CSCI 2670 Introduction to Theory of Computing August 23, 2005.
The decidability of Presburger Arithmetic By Guillermo Guillen 04/13/05 Dr. Smith COT 6421 FIU Spring 2005.
CSCI 3130: Formal languages and automata theory Tutorial 1 Lee Chin Ho.
Lecture Notes 
Transparency No. 2-1 Formal Language and Automata Theory Homework 2.
Nondeterministic Finite Automata (NFAs). Reminder: Deterministic Finite Automata (DFA) q For every state q in Q and every character  in , one and only.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen.
CSCI 2670 Introduction to Theory of Computing September 7, 2004.
Finite Automata A simple model of computation. 2 Finite Automata2 Outline Deterministic finite automata (DFA) –How a DFA works.
CSCI 2670 Introduction to Theory of Computing September 16, 2004.
Costas Busch - LSU1 Deterministic Finite Automata And Regular Languages.
Theory of Computation Automata Theory Dr. Ayman Srour.
Theory of Languages and Automata By: Mojtaba Khezrian.
Fall 2004COMP 3351 Finite Automata. Fall 2004COMP 3352 Finite Automaton Input String Output String Finite Automaton.
Deterministic Finite-State Machine (or Deterministic Finite Automaton) A DFA is a 5-tuple, (S, Σ, T, s, A), consisting of: S: a finite set of states Σ:
Introduction to Automata Theory Theory of Computation Lecture 3 Tasneem Ghnaimat.
CSCI 2670 Introduction to Theory of Computing
Lecture2 Regular Language
Non Deterministic Automata
Nondeterministic Finite Automata
Finite Automata & Regular Languages
Deterministic Finite Automata And Regular Languages Prof. Busch - LSU.
COSC 3340: Introduction to Theory of Computation
Non Deterministic Automata
CSCI 2670 Introduction to Theory of Computing
CSCI 2670 Introduction to Theory of Computing
CSCI 2670 Introduction to Theory of Computing
Chapter 1 Regular Language
CSC 4170 Theory of Computation Finite Automata Section 1.1.
CSCI 2670 Introduction to Theory of Computing
CSCI 2670 Introduction to Theory of Computing
Presentation transcript:

CSCI 2670 Introduction to Theory of Computing August 24, 2005

Announcements Please send me an by midnight tonight Office hours changed –Tues & Wed 11:00 – 12:30

Agenda Last class –Introduced deterministic finite automata Formally defined DFA’s Informally described DFA’s This class –Quiz –Continue Chapter 1

Group 1 q1q1 q2q2 q4q ,1 0 q3q3 0 Hint: What string doesn’t this DFA accept? q5q5 1 0,1

Group 2 q1q1 q2q2 0,1 0 q3q3 q4q4 q5q5 1 Hint: String length counts.

Group 3 q1q1 q2q2 1 0,1 Hint: Symbol position counts. q3q3 0 0,1

Group 4 q1q1 q2q2 0 0,1 Hint: Can you simplify this DFA? q3q3 q4q4 0,1 1

Group 5 q1q1 q2q2 0 Hint: For each state, what do you know about how many times each symbol has appeared? q3q3 q4q q5q ,1 q6q q7q7 1

Group 6 q1q1 0, 1 Hint: What happens when you get to q 3 ? q2q q3q3 1

Remainder of class Formal definition of computation –Definition of a regular language Designing finite automata

Formalizing computation Let M = (Q, , ,q 0,F) be a finite automaton and let w = w 1 w 2 …w n be any string over . M accepts w if there is a sequence of states r 0, r 1, …, r n, of Q such that –r 0 = q 0 start in the start state –r i =  (r i-1, w i ) the transition function determines each step –rn  F–rn  F the last state is one of the final states

Regular languages A deterministic finite automaton M recognizes the language A if A = { w | M accepts w } Alternatively, we say the language of M is A L(M) = { w | M accepts w } Any language recognized by a deterministic finite automaton is called a regular language

Designing finite automata Select states specifically to reflect some important concept –even number of 0’s –odd number of occurrences of the string 010 Ensure this meaning is relevant to the language you are trying to define Try to get “in the head” of the automaton

Example Design a DFA accepting all strings over {0,1,2,3} such that the sum of the symbols in the string is equivalent to 2 modulo 4 or 3 modulo 4

Step 1 What states do we need? –One state for each value modulo 4 q 1 represents 1 modulo 4 q 2 represents 2 modulo 4 q 3 represents 3 modulo 4 q 4 represents 0 modulo 4

Step 2 Create the state transition table 0123 q 1 (1 mod 4)q1q1 q2q2 q3q3 q4q4 q 2 (2 mod 4)q2q2 q3q3 q4q4 q1q1 q 3 (3 mod 4)q3q3 q4q4 q1q1 q2q2 q 4 (0 mod 4)q4q4 q1q1 q2q2 q3q3

Step 3 What elements of the 5-tuple do we know? –Q, , and  So we still need q 0 and F –q 0 = q 4 –F = {q 2, q 3 }

Draw DFA q1q1 q3q3 q4q4 q2q