CSCI 2670 Introduction to Theory of Computing

Slides:



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

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.
8/27/2009 Sofya Raskhodnikova Intro to Theory of Computation L ECTURE 2 Theory of Computation Finite Automata Operations on languages Nondeterminism L2.1.
Deterministic Finite Automata (DFA)
YES-NO machines Finite State Automata as language recognizers.
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 Section 1.1 CSC 4170 Theory of Computation.
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.
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.
CS5371 Theory of Computation
Fall 2006Costas Busch - RPI1 Deterministic Finite Automata And Regular Languages.
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
1 Languages and Finite Automata or how to talk to machines...
CS 310 – Fall 2006 Pacific University CS310 Finite Automata Sections: September 1, 2006.
CS5371 Theory of Computation Lecture 4: Automata Theory II (DFA = NFA, Regular Language)
Finite Automata Costas Busch - RPI.
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.
Lecture 23: Finite State Machines with no Outputs Acceptors & Recognizers.
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.
Fall 2006Costas Busch - RPI1 Deterministic Finite Automaton (DFA) Input Tape “Accept” or “Reject” String Finite Automaton Output.
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.
Finite Automata – Definition and Examples Lecture 6 Section 1.1 Mon, Sep 3, 2007.
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.
Transparency No. 2-1 Formal Language and Automata Theory Homework 2.
Theory of Computation Automata Theory Dr. Ayman Srour.
Costas Busch - LSU1 Deterministic Finite Automata And Regular Languages.
Theory of Computation Automata Theory Dr. Ayman Srour.
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.
Nondeterminism The Chinese University of Hong Kong Fall 2011
Languages.
Deterministic Finite Automata And Regular Languages.
Lecture2 Regular Language
Non Deterministic Automata
Pushdown Automata PDAs
Nondeterministic Finite Automata
Finite Automata & Regular Languages
CSC 4170 Theory of Computation Nondeterminism Section 1.2.
Deterministic Finite Automata And Regular Languages Prof. Busch - LSU.
Non-Deterministic Finite Automata
COSC 3340: Introduction to Theory of Computation
CSE322 Definition and description of finite Automata
Non Deterministic Automata
Introduction to Finite Automata
CSE 2001: Introduction to Theory of Computation Fall 2009
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
CSC 4170 Theory of Computation Finite Automata Section 1.1.
CSCI 2670 Introduction to Theory of Computing
CSCI 2670 Introduction to Theory of Computing
Non Deterministic Automata
CSCI 2670 Introduction to Theory of Computing
Nondeterminism The Chinese University of Hong Kong Fall 2010
Presentation transcript:

CSCI 2670 Introduction to Theory of Computing September 4, 2007

Languages Alphabet String Language 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, 2005

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, 2005

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, 2005

Example State table Stop Right Left Impossi ble Grab Paddle Right Paddle Left Hits Wall Event State August 23, 2005

Example Left Stop Right Ball hits a wall (reverse direction)‏ 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, 2005

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

Example From previous example Q =  =  = q0 = 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, 2005

Another example  = {0,1} q4 q1 q2 q3 Q =  =  q0 = F = 1 1 q1 q2 1 q3 Q =  =  q0 = F = {q1, q2, q3, q4} {0, 1} (next slide)‏ q1 {q3} August 23, 2005

Another example  = {0,1} q4 q1 q2 q3 q4 q3 q2 q1 1 State table 0,1 1 1 1 q1 q2 1 q3 q4 q3 q2 q1 1 State table August 23, 2005

Another example  = {0,1} q4 q1 q2 q3 1 1 q1 q2 1 q3 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 August 23, 2005

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

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

Group 1 q1 q2 q3 q4 q5 Hint: What string doesn’t this DFA accept? 0,1 q2 1 q3 q4 1 1 q5 0,1 Hint: What string doesn’t this DFA accept? August 23, 2005

Group 2 q2 q3 q1 q4 q5 Hint: String length counts. 0,1 0,1 0,1 1 0,1 q1 0,1 1 q4 0,1 q5 Hint: String length counts. August 23, 2005

Group 3 q1 q2 q3 Hint: Symbol position counts. 0,1 1 0,1 q3 0,1 Hint: Symbol position counts. August 23, 2005

Group 4 q1 q2 q3 q4 Hint: Can you simplify this DFA? 1 0,1 0,1 0,1 q1 q2 1 0,1 0,1 q3 0,1 q4 Hint: Can you simplify this DFA? August 23, 2005

0,1 q7 Group 5 1 q1 1 q3 q5 1 q4 q2 1 q6 1 Hint: For each state, what do you know about how many times each symbol has appeared? August 23, 2005

Group 6 q1 q2 q3 Hint: What happens when you get to q3? 1 1 0, 1 q1 1 q2 1 q3 0, 1 Hint: What happens when you get to q3? August 23, 2005