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

Slides:



Advertisements
Similar presentations
CS 208: Computing Theory Assoc. Prof. Dr. Brahim Hnich Faculty of Computer Sciences Izmir University of Economics.
Advertisements

CSE 105 Theory of Computation Alexander Tsiatas Spring 2012 Theory of Computation Lecture Slides by Alexander Tsiatas is licensed under a Creative Commons.
Deterministic Finite Automata (DFA)
YES-NO machines Finite State Automata as language recognizers.
Finite Automata Section 1.1 CSC 4170 Theory of Computation.
Finite Automata Great Theoretical Ideas In Computer Science Anupam Gupta Danny Sleator CS Fall 2010 Lecture 20Oct 28, 2010Carnegie Mellon University.
1 Introduction to Computability Theory Lecture3: Regular Expressions Prof. Amos Israeli.
Intro to DFAs Readings: Sipser 1.1 (pages 31-44) With basic background from Sipser 0.
1 Introduction to Computability Theory Discussion1: Non-Deterministic Finite Automatons Prof. Amos Israeli.
Intro to DFAs Readings: Sipser 1.1 (pages 31-44) With basic background from Sipser 0.
CS5371 Theory of Computation
CS5371 Theory of Computation
Fall 2006Costas Busch - RPI1 Deterministic Finite Automata And Regular Languages.
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
CS5371 Theory of Computation Lecture 6: Automata Theory IV (Regular Expression = NFA = DFA)
CS 490: Automata and Language Theory Daniel Firpo Spring 2003.
CS5371 Theory of Computation Lecture 4: Automata Theory II (DFA = NFA, Regular Language)
Finite Automata Chapter 5. Formal Language Definitions Why need formal definitions of language –Define a precise, unambiguous and uniform interpretation.
Topics Automata Theory Grammars and Languages Complexities
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
Nondeterminism (Deterministic) FA required for every state q and every symbol  of the alphabet to have exactly one arrow out of q labeled . What happens.
Great Theoretical Ideas in Computer Science.
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 (RE) Empty set Φ A RE denotes the empty set Empty string λ A RE denotes the set {λ} Symbol a A RE denotes the set {a} Alternation M.
CSCI 2670 Introduction to Theory of Computing September 21, 2005.
CSCI 2670 Introduction to Theory of Computing August 24, 2005.
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
Introduction to CS Theory Lecture 3 – Regular Languages Piotr Faliszewski
4b 4b Lexical analysis Finite Automata. Finite Automata (FA) FA also called Finite State Machine (FSM) –Abstract model of a computing entity. –Decides.
CSCI 2670 Introduction to Theory of Computing August 26, 2004.
CSCI 2670 Introduction to Theory of Computing August 25, 2005.
A Quick Math Overview (not the last one!) Section 1.4, you should it read carefully! Reading the corresponding material from the book is strongly encouraged.
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)
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.
CSCI 3130: Formal languages and automata theory Tutorial 1 Lee Chin Ho.
Transparency No. 2-1 Formal Language and Automata Theory Homework 2.
Pushdown Automata Hopcroft, Motawi, Ullman, Chap 6.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen.
CSCI 2670 Introduction to Theory of Computing September 7, 2004.
Regular Languages Chapter 1 Giorgi Japaridze Theory of Computability.
1 Finite Automata. 2 Introductory Example An automaton that accepts all legal Pascal identifiers: Letter Digit Letter or Digit "yes" "no" 2.
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.
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 Σ:
CSCI 2670 Introduction to Theory of Computing
Nondeterministic Finite Automata
CSC 4170 Theory of Computation Nondeterminism Section 1.2.
THEORY OF COMPUTATION Lecture One: Automata Theory Automata Theory.
Deterministic Finite Automata And Regular Languages Prof. Busch - LSU.
Chapter 7 Regular Grammars
CSE 2001: Introduction to Theory of Computation Fall 2009
Chapter Five: Nondeterministic Finite Automata
CSCI 2670 Introduction to Theory of Computing
CSCI 2670 Introduction to Theory of Computing
Deterministic Finite Automaton (DFA)
CSCI 2670 Introduction to Theory of Computing
CSC 4170 Theory of Computation Nondeterminism Section 1.2.
Chapter 1 Regular Language
CSCI 2670 Introduction to Theory of Computing
CHAPTER 1 Regular Languages
CSCI 2670 Introduction to Theory of Computing
CSCI 2670 Introduction to Theory of Computing
CSCE 355 Foundations of Computation
Presentation transcript:

August 23, 2005 CSCI 2670 Introduction to Theory of Computing August 23, 2005

2 Agenda Last class –Reviewed syllabus –Reviewed material in Chapter 0 of Sipser –Assigned pages Chapter 0 of Sipser Questions? This class –Begin Chapter 1 Goal for the week –Section 1.1 Read Section 1.1 (pages 29 – 47) this week

August 23, Announcements Website is up Quiz tomorrow (8/24) –Material: Chapter 0 Homework due next Tuesday (8/30) –Chapter 0 numbers 0.3 all, 0.7b, 0.12 –Chapter 1 numbers 1.3, 1.4c, 1.5f, 1.6(a, c, h) Unregistered students Please give me your student id after class

August 23, Relation on A Function R:A×A×…×A  { true, false } –Often described as a set of elements for which the relation is true Example –A={1,2,3,4,5} –R:A×A×A  { true, false } R is true if the three-tuple is increasing –{(1,2,3),(1,2,4),(2,3,4),(3,4,5)}  R –(1,1,5)  R

August 23, Graphical representation (binary relations only) Directed arrow with edge (a,b) if (a,b)  R Example: A={a,b,c,d}, R=“earlier in alphabet” –R={(a,b),(a,c),(a,d),(b,c),(b,d),(c,d)} a c b d

August 23, Equivalence Relation Symmetric –{(a,a) | a  A}  R Reflexive –(a,b)  R  (b,a)  R Transitive –(a,b)  R  (b,c)  R  (a,c)  R Examples –Equality –“Has the same eye color”

August 23, Languages Alphabet –Finite collection of objects (denoted  ) String –Concatenation of 0 or more elements of an alphabet Language –Collection of strings  * is the set of all strings over  (including ε) This week we will define a specific class of languages – regular languages

August 23, Deterministic finite automata (DFA) Method for modeling computers with limited memory –Language recognizer Idea –Keep track of current state –Events can move you from one state to another Today’s goal –Formally describe DFA’s –Interpret DFA’s

August 23, Example Ball in frictionless room Moves left, right or not at all –Three possible states: left, right, stop –One other state: impossible –Start at rest (in stop state) State changes under four conditions –Ball hits a wall (reverse direction) –Paddle hits left (ball moves left) –Paddle hits right (ball moves right) –Hand grabs ball (stop moving)

August 23, Example State table Hits Wall Paddle Left Paddle Right Grab LeftRightLeftRightStop RightLeft RightStop Impossi ble LeftRightStop Impossible Event State

August 23, Example »Ball in frictionless room –Ball hits a wall (reverse direction) –Paddle hits left (ball moves left) –Paddle hits right (ball moves right) –Hand grabs ball (stop moving) Left Stop Right Impossible

August 23, Finite automaton (formal definition) A finite automaton is a 5-tuple (Q, , ,q 0,F), where 1.Q is a finite set called the states 2.  is a finite set called the alphabet 3.  : Q ×   Q is the transition function  corresponds to the event function from previous example 4.q 0 is the start state, and 5.F  Q is the set of accept states (also called final states).

August 23, Example From previous example –Q = –  = –  = –q 0 = –F = {Left, Right, Stop, Impossible} {Hit wall, Paddle left, Paddle right, Grab} The state table we constructed Stop {Left, Right, Stop} What if we accept any set of events that ends with the ball in motion? –F = {Left, Right}

August 23, Another example q1q1 q2q2 q3q  = {0,1} 1 0 Q =  =  q 0 = F = {q 1, q 2, q 3, q 4 } {0, 1} (next slide) q1q1 {q 3 } q4q4 1 0,1

August 23, Another example q1q1 q2q2 q3q  = {0,1} State table01 q1q1 q2q2 q4q4 q2q2 q2q2 q3q3 q3q3 q2q2 q3q3 q4q4 q4q4 q4q4 1 0 q4q4 1 0,1

August 23, Another example q1q1 q2q2 q3q  = {0,1} 1 0 Informal description of the strings accepted by this DFA All strings of 0’s and 1’s beginning with a 0 and ending with a 1 q4q4 1 0,1

August 23, Group problem Formally describe the DFA (deterministic finite automaton) illustrated in your group’s sheet

August 23, Group problem  = {0, 1} for all groups 1.Q is a finite set called the states 2.  is a finite set called the alphabet 3.  : Q ×   Q is the transition function 4.q 0 is the start state, and 5.F  Q is the set of accept states (also called final states). Include informal description

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

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

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

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

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

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