CSCI 2670 Introduction to Theory of Computing

Similar documents
Theory of Computation (I) Yijia Chen Fudan University

COM364 Automata Theory Lecture Note 2 - Nondeterminism

CSCI 2200 Foundations of Computer Science Spring 2018 Quiz 3 (May 2, 2018) SOLUTIONS

Chapter Five: Nondeterministic Finite Automata

CS 154, Lecture 2: Finite Automata, Closure Properties Nondeterminism,

CSE 105 THEORY OF COMPUTATION

Equivalence of DFAs and NFAs

CS5371 Theory of Computation. Lecture 7: Automata Theory V (CFG, CFL, CNF)

CS 154. Finite Automata, Nondeterminism, Regular Expressions

CSE 105 Theory of Computation Professor Jeanne Ferrante

Theory of Computation Lecture 1. Dr. Nahla Belal

CS 154 Introduction to Automata and Complexity Theory

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

Nondeterministic Finite Automata

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

Clarifications from last time. This Lecture. Last Lecture. CMSC 330: Organization of Programming Languages. Finite Automata.

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

Announcements. Problem Set Four due Thursday at 7:00PM (right before the midterm).

Computer Sciences Department

CSE 105 THEORY OF COMPUTATION

2017/08/31 Chapter 1.2 & 1.3 in Sipser Ø Announcement:

CSE 105 THEORY OF COMPUTATION

Introduction to the Theory of Computation. Automata 1VO + 1PS. Lecturer: Dr. Ana Sokolova.

CSC236 Week 11. Larry Zhang

2017/08/29 Chapter 1.2 in Sipser Ø Announcement:

CS 133 : Automata Theory and Computability

CS 121, Section 2. Week of September 16, 2013

CSC236 Week 10. Larry Zhang

CSE 105 THEORY OF COMPUTATION

Critical CS Questions

Proofs, Strings, and Finite Automata. CS154 Chris Pollett Feb 5, 2007.

CMSC 330: Organization of Programming Languages

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

September 11, Second Part of Regular Expressions Equivalence with Finite Aut

CS 455/555: Finite automata

Finite-state machines (FSMs)

Finite Automata Part Two

Theory of Computation (II) Yijia Chen Fudan University

Chapter Two: Finite Automata

CS:4330 Theory of Computation Spring Regular Languages. Finite Automata and Regular Expressions. Haniel Barbosa

CMSC 330: Organization of Programming Languages. Theory of Regular Expressions Finite Automata

Finite Automata (contd)

CMP 309: Automata Theory, Computability and Formal Languages. Adapted from the work of Andrej Bogdanov

CISC 4090: Theory of Computation Chapter 1 Regular Languages. Section 1.1: Finite Automata. What is a computer? Finite automata

Computational Models: Class 1

Formal Definition of a Finite Automaton. August 26, 2013

What we have done so far

Automata and Formal Languages - CM0081 Non-Deterministic Finite Automata

Incorrect reasoning about RL. Equivalence of NFA, DFA. Epsilon Closure. Proving equivalence. One direction is easy:

Theory of Languages and Automata

Closure under the Regular Operations

Great Theoretical Ideas in Computer Science. Lecture 4: Deterministic Finite Automaton (DFA), Part 2

Intro to Theory of Computation

September 7, Formal Definition of a Nondeterministic Finite Automaton

Computational Models Lecture 2 1

Introduction to the Theory of Computation. Automata 1VO + 1PS. Lecturer: Dr. Ana Sokolova.

CSE 311 Lecture 23: Finite State Machines. Emina Torlak and Kevin Zatloukal

Automata Theory. Lecture on Discussion Course of CS120. Runzhe SJTU ACM CLASS

CS 154. Finite Automata vs Regular Expressions, Non-Regular Languages

Computational Models - Lecture 1 1

Finite-State Machines (Automata) lecture 12

CS 154, Lecture 3: DFA NFA, Regular Expressions

Closure under the Regular Operations

Finite Automata. Finite Automata

Nondeterministic Finite Automata and Regular Expressions

Deterministic Finite Automata. Non deterministic finite automata. Non-Deterministic Finite Automata (NFA) Non-Deterministic Finite Automata (NFA)

Computational Models #1

Time Magazine (1984)

CSE 105 THEORY OF COMPUTATION

Automata: a short introduction

Automata Theory, Computability and Complexity

CSE 105 Homework 3 Due: Monday October 23, Instructions. should be on each page of the submission.

Name: Student ID: Instructions:

Decidability. Human-aware Robotics. 2017/10/31 Chapter 4.1 in Sipser Ø Announcement:

Computational Models Lecture 2 1

Inf2A: Converting from NFAs to DFAs and Closure Properties

Finite Automata and Regular languages

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

Languages, regular languages, finite automata

Decision, Computation and Language

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

Deterministic Finite Automata (DFAs)

Nonregular Languages

Lecture 23 : Nondeterministic Finite Automata DRAFT Connection between Regular Expressions and Finite Automata

Formal Definition of Computation. August 28, 2013

Büchi Automata and their closure properties. - Ajith S and Ankit Kumar

CSE 311: Foundations of Computing. Lecture 23: Finite State Machine Minimization & NFAs

Harvard CS 121 and CSCI E-207 Lecture 10: CFLs: PDAs, Closure Properties, and Non-CFLs

Sri vidya college of engineering and technology

UNIT-II. NONDETERMINISTIC FINITE AUTOMATA WITH ε TRANSITIONS: SIGNIFICANCE. Use of ε-transitions. s t a r t. ε r. e g u l a r

Automata Theory CS F-04 Non-Determinisitic Finite Automata

What is this course about?

Part I: Definitions and Properties

Homework. Turing Machines. Announcements. Plan for today. Now our picture looks like. Languages

Turing Machines Part III

Nondeterministic finite automata

CSE 105 Homework 1 Due: Monday October 9, Instructions. should be on each page of the submission.

Turing machines COMS Ashley Montanaro 21 March Department of Computer Science, University of Bristol Bristol, UK

Finite Automata Part One

Theory of Computation

Transcription:

CSCI 267 Introduction to Theory of Computing

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

Announcements Website is up Quiz tomorrow (8/24) Material: Chapter Homework due next Tuesday (8/3) Chapter numbers.3 all,.7b,.2 Chapter numbers.3,.4c,.5f,.6(a, c, h) Unregistered students Please give me your student id after class 3

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={,2,3,4,5} R:A A A {true, false} R is true if the three-tuple is increasing {(,2,3),(,2,4),(2,3,4),(3,4,5)} R (,,5) R 4

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 b c d 5

Symmetric Equivalence Relation {(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 6

Languages Alphabet Finite collection of objects (denoted Σ) String Concatenation of 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 7

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 8

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) 9

Example State table State Event Hits Wall Paddle Left Paddle Right Grab Left Right Left Right Stop Right Left Left Right Stop Stop Impossi ble Left Right Stop Impossible Impossible Impossible Impossible Impossible

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 Right Stop Impossible

Finite automaton (formal definition) A finite automaton is a 5-tuple (Q,Σ,δ,q,F), where. 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 is the start state, and 5. F Q is the set of accept states (also called final states). 2

Example From previous example Q = Σ = δ = q = 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} 3

q 4 Another example Σ = {} q q 2 q 3 Q = Σ = δ q = F = {q, q 2, q 3, q 4 } {, } (next slide) q {q 3 } 4

q 4 Another example Σ = {} q q 2 q 3 State table q q 2 q 4 q 2 q 2 q 3 q 3 q 2 q 3 q 4 q 4 q 4 5

q 4 Another example Σ = {} q q 2 q 3 Informal description of the strings accepted by this DFA All strings of s and s beginning with a and ending with a 6

Group problem Formally describe the DFA (deterministic finite automaton) illustrated in your group s sheet 7

Group problem Σ = {, } for all groups. 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 is the start state, and 5. F Q is the set of accept states (also called final states). Include informal description 8

Group q 3 q q 2 q 4 q 5 Hint: What string doesn t this DFA accept? 9

Group 2 q 2 q 3 q q 4 q 5 Hint: String length counts. 2

Group 3 q q 2 q 3 Hint: Symbol position counts. 2

Group 4 q q 2 q 3 q 4 Hint: Can you simplify this DFA? 22

Group 5 q 7 q q 3 q 5 q 2 q 4 q 6 Hint: For each state, what do you know about how many times each symbol has appeared? 23

Group 6 q q 2 q 3, Hint: What happens when you get to q 3? 24