Nondeterministic Finite Automata

Similar documents
The Pairwise-Comparison Method

Closure Properties of Regular Languages

Direct Proof Division into Cases

Direct Proof Floor and Ceiling

Composition of Functions

Strong Mathematical Induction

Theory of Computation (I) Yijia Chen Fudan University

Nondeterministic Finite Automata

Maximums and Minimums

COM364 Automata Theory Lecture Note 2 - Nondeterminism

Direct Proof Universal Statements

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

Direct Proof Divisibility

Confidence Intervals for Proportions Sections 22.2, 22.3

Direct Proof Divisibility

Chapter Five: Nondeterministic Finite Automata

Lecture 4 Nondeterministic Finite Accepters

Automata and Languages

Paired Samples. Lecture 37 Sections 11.1, 11.2, Robb T. Koether. Hampden-Sydney College. Mon, Apr 2, 2012

Instantaneous Rate of Change

Lecture 1: Finite State Automaton

Direct Proof Rational Numbers

Lecture 3: Nondeterministic Finite Automata

Automata and Formal Languages - CM0081 Non-Deterministic Finite Automata

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

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

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

Predicates and Quantifiers

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

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

Finite Automata. Seungjin Choi

CS 455/555: Finite automata

The Interpretation of λ

Conditional Statements

Chapter 6: NFA Applications

CSE 135: Introduction to Theory of Computation Nondeterministic Finite Automata (cont )

Inf2A: Converting from NFAs to DFAs and Closure Properties

Compound Interest. Lecture 34 Section 4.1. Robb T. Koether. Hampden-Sydney College. Tue, Mar 28, 2017

Sampling Distribution of a Sample Proportion

Intro to Theory of Computation

Vector Operations. Lecture 19. Robb T. Koether. Hampden-Sydney College. Wed, Oct 7, 2015

Nondeterministic Finite Automata. Nondeterminism Subset Construction

Theory of Computation (II) Yijia Chen Fudan University

September 7, Formal Definition of a Nondeterministic Finite Automaton

Chap. 1.2 NonDeterministic Finite Automata (NFA)

INF Introduction and Regular Languages. Daniel Lupp. 18th January University of Oslo. Department of Informatics. Universitetet i Oslo

Nondeterminism and Epsilon Transitions

Finite Automata and Regular Languages (part III)

Sampling Distribution of a Sample Proportion

The Cobb-Douglas Production Functions

C2.1 Regular Grammars

Elementary Logic and Proof

Fooling Sets and. Lecture 5

CS243, Logic and Computation Nondeterministic finite automata

C2.1 Regular Grammars

Classes and conversions

Finite Automata and Regular languages

CSC236 Week 11. Larry Zhang

Nondeterminism. September 7, Nondeterminism

Negations of Quantifiers

Recitation 2 - Non Deterministic Finite Automata (NFA) and Regular OctoberExpressions

Outline. Nondetermistic Finite Automata. Transition diagrams. A finite automaton is a 5-tuple (Q, Σ,δ,q 0,F)

Theory of Languages and Automata

Nondeterministic Finite Automata

CS 208: Automata Theory and Logic

Nondeterministic finite automata

T (s, xa) = T (T (s, x), a). The language recognized by M, denoted L(M), is the set of strings accepted by M. That is,

Finite Automata. Dr. Neil T. Dantam. Fall CSCI-561, Colorado School of Mines. Dantam (Mines CSCI-561) Finite Automata Fall / 43

Closure under the Regular Operations

CSE 135: Introduction to Theory of Computation Nondeterministic Finite Automata

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

Extended transition function of a DFA

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

Independent Samples: Comparing Means

Equivalence of DFAs and NFAs

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

CS 154. Finite Automata, Nondeterminism, Regular Expressions

Decision, Computation and Language

Formal Models in NLP

Finite Automata. Dr. Neil T. Dantam. Fall CSCI-561, Colorado School of Mines. Dantam (Mines CSCI-561) Finite Automata Fall / 35

Theory of Computation

Deterministic Finite Automaton (DFA)

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

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

Finite Automata. Mahesh Viswanathan

Course 4 Finite Automata/Finite State Machines

Theory of Computation

Recap DFA,NFA, DTM. Slides by Prof. Debasis Mitra, FIT.

CS21 Decidability and Tractability

Java II Finite Automata I

Outline. CS21 Decidability and Tractability. Machine view of FA. Machine view of FA. Machine view of FA. Machine view of FA.

HKN CS/ECE 374 Midterm 1 Review. Nathan Bleier and Mahir Morshed

Finite Automata. Theorems - Unit I SUSAN ELIAS. Professor Department of Computer Science & Engineering Sri Venkateswara College of Engineering

Lecture 2: Regular Expression

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

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

FORMAL LANGUAGES, AUTOMATA AND COMPUTATION

Parikh s Theorem and Descriptional Complexity

Pushdown automata. Twan van Laarhoven. Institute for Computing and Information Sciences Intelligent Systems Radboud University Nijmegen

FINITE STATE MACHINES (AUTOMATA)

Transcription:

Nondeterministic Finite Automata Lecture 6 Section 2.2 Robb T. Koether Hampden-Sydney College Mon, Sep 5, 2016 Robb T. Koether (Hampden-Sydney College) Nondeterministic Finite Automata Mon, Sep 5, 2016 1 / 20

Outline 1 Nondeterminism Definition Examples 2 Building a DFA from an NFA 3 Assignment Robb T. Koether (Hampden-Sydney College) Nondeterministic Finite Automata Mon, Sep 5, 2016 2 / 20

Outline 1 Nondeterminism Definition Examples 2 Building a DFA from an NFA 3 Assignment Robb T. Koether (Hampden-Sydney College) Nondeterministic Finite Automata Mon, Sep 5, 2016 3 / 20

Determinism A deterministic finite automaton is deterministic because every move is forced. That is, δ is a function. For every state-symbol combination (q, x) in Q Σ, there is exactly one q Q such that δ(q, x) = q. Robb T. Koether (Hampden-Sydney College) Nondeterministic Finite Automata Mon, Sep 5, 2016 4 / 20

Nondeterminism To make a finite automaton nondeterministic, we drop the requirement that the image of (q, x) be a unique state and allow it to be a set of states. (q, x) may have no image, one image, or more than one image. Robb T. Koether (Hampden-Sydney College) Nondeterministic Finite Automata Mon, Sep 5, 2016 5 / 20

Nondeterminism Definition (λ-move) An λ-move is a transition from one state to another made without reading an input symbol. (We read λ.) We also allow λ-moves. Robb T. Koether (Hampden-Sydney College) Nondeterministic Finite Automata Mon, Sep 5, 2016 6 / 20

Outline 1 Nondeterminism Definition Examples 2 Building a DFA from an NFA 3 Assignment Robb T. Koether (Hampden-Sydney College) Nondeterministic Finite Automata Mon, Sep 5, 2016 7 / 20

Definition of a Nondeterministic Finite Automaton Definition (Nondeterministic finite automaton) A nondeterministic finite automaton (NFA) is a 5-tuple {Q, Σ, δ, q 0, F}, where Q, Σ, q 0, and F are as they were for a DFA. The transition function is δ : Q (Σ {λ}) P(Q). Robb T. Koether (Hampden-Sydney College) Nondeterministic Finite Automata Mon, Sep 5, 2016 8 / 20

Example Example (NFA) a, b a, b q 0 a q 1 b q 2 Robb T. Koether (Hampden-Sydney College) Nondeterministic Finite Automata Mon, Sep 5, 2016 9 / 20

The Language of an NFA Definition (Acceptance by an NFA) A string w is accepted by an NFA if there is at least one computation on the NFA with input w that terminates in an accepting state. Definition (Language of an NFA) The language of an NFA is the set of all strings in Σ that are accepted by the NFA. For a given input, an NFA may admit a multitude of computations. Robb T. Koether (Hampden-Sydney College) Nondeterministic Finite Automata Mon, Sep 5, 2016 10 / 20

Outline 1 Nondeterminism Definition Examples 2 Building a DFA from an NFA 3 Assignment Robb T. Koether (Hampden-Sydney College) Nondeterministic Finite Automata Mon, Sep 5, 2016 11 / 20

Examples Example (Nondeterministic finite automata) Let Σ = {a, b}. Let L 1 = {w Σ w contains an even number of a s}. Let L 2 = {w Σ w contains an even number of b s}. Design NFAs that accept L 1 L 2 L 1 L 2 L 1 L 1 L 2 Describe δ for the NFA that accepts AB. Do the computation for the strings ababb and ababbb. Robb T. Koether (Hampden-Sydney College) Nondeterministic Finite Automata Mon, Sep 5, 2016 12 / 20

Outline 1 Nondeterminism Definition Examples 2 Building a DFA from an NFA 3 Assignment Robb T. Koether (Hampden-Sydney College) Nondeterministic Finite Automata Mon, Sep 5, 2016 13 / 20

Relations and Functions Given a function f : A P(B), we may derive a function g : P(A) P(B). Robb T. Koether (Hampden-Sydney College) Nondeterministic Finite Automata Mon, Sep 5, 2016 14 / 20

Example Example Let A = {2, 3, 4, 5}. Let B = {6, 7, 8, 9}. Let f be the function that maps every integer in A to the set of its multiples in B. f : A P(B) f (2) = {6, 8}, f (3) = {6, 9}, f (4) = {8}, f (5) =. Robb T. Koether (Hampden-Sydney College) Nondeterministic Finite Automata Mon, Sep 5, 2016 15 / 20

Deriving g : P(A) P(B) Define g : P(A) P(B) as follows. For each subset S A, define g(s) = f (a). a S Robb T. Koether (Hampden-Sydney College) Nondeterministic Finite Automata Mon, Sep 5, 2016 16 / 20

Example Example (Deriving g : P(A) P(B)) Then, for example, g({2}) = f (2) = {6, 8}, g({2, 3}) = f (2) f (3) = {6, 8, 9}, g({2, 3, 4}) = f (2) f (3) f (4) = {6, 8, 9}. What is g( )? What is g({4, 5})? Robb T. Koether (Hampden-Sydney College) Nondeterministic Finite Automata Mon, Sep 5, 2016 17 / 20

Outline 1 Nondeterminism Definition Examples 2 Building a DFA from an NFA 3 Assignment Robb T. Koether (Hampden-Sydney College) Nondeterministic Finite Automata Mon, Sep 5, 2016 18 / 20

Collected To be collected on Wed, Sep 7: Section 1.1 Exercises 31, 43a. Section 1.2 Exercises 15, 17e. Section 2.1 Exercises 7e, 17, 22. Robb T. Koether (Hampden-Sydney College) Nondeterministic Finite Automata Mon, Sep 5, 2016 19 / 20

Assignment Assignment Section 2.2 Exercises 3, 5, 7, 8, 9, 12, 13, 14. Robb T. Koether (Hampden-Sydney College) Nondeterministic Finite Automata Mon, Sep 5, 2016 20 / 20