1 NFAs accept the Regular Languages. 2 Equivalence of Machines Definition: Machine is equivalent to machine if.

Slides:



Advertisements
Similar presentations
CS2303-THEORY OF COMPUTATION Closure Properties of Regular Languages
Advertisements

CSC 361NFA vs. DFA1. CSC 361NFA vs. DFA2 NFAs vs. DFAs NFAs can be constructed from DFAs using transitions: Called NFA- Suppose M 1 accepts L 1, M 2 accepts.
1 Introduction to Computability Theory Lecture3: Regular Expressions Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture4: Regular Expressions Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture3: Regular Expressions Prof. Amos Israeli.
Prof. Busch - LSU1 Properties of Context-Free languages.
Costas Busch - RPI1 Single Final State for NFAs. Costas Busch - RPI2 Any NFA can be converted to an equivalent NFA with a single final state.
Courtesy Costas Busch - RPI1 Non Deterministic Automata.
Fall 2006Costas Busch - RPI1 Regular Expressions.
1 Positive Properties of Context-Free languages. 2 Context-free languages are closed under: Union is context free is context-free.
1 More Properties of Regular Languages. 2 We have proven Regular languages are closed under: Union Concatenation Star operation Reverse.
1 Regular Expressions. 2 Regular expressions describe regular languages Example: describes the language.
Fall 2004COMP 3351 Single Final State for NFA. Fall 2004COMP 3352 Any NFA can be converted to an equivalent NFA with a single final state.
1 Single Final State for NFAs and DFAs. 2 Observation Any Finite Automaton (NFA or DFA) can be converted to an equivalent NFA with a single final state.
Lecture 7 Sept 22, 2011 Goals: closure properties regular expressions.
Fall 2006Costas Busch - RPI1 Properties of 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.
Fall 2006Costas Busch - RPI1 Non-Deterministic Finite Automata.
1 Non-Deterministic Automata Regular Expressions.
Fall 2004COMP 3351 Another NFA Example. Fall 2004COMP 3352 Language accepted (redundant state)
Fall 2006Costas Busch - RPI1 PDAs Accept Context-Free Languages.
Costas Busch - LSU1 Non-Deterministic Finite Automata.
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
1 A Single Final State for Finite Accepters. 2 Observation Any Finite Accepter (NFA or DFA) can be converted to an equivalent NFA with a single final.
1 A Non Context-Free Language (We will prove it at the next class)
Fall 2004COMP 3351 Regular Expressions. Fall 2004COMP 3352 Regular Expressions Regular expressions describe regular languages Example: describes the language.
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.
NFA Closure Properties. NFAs also have closure properties We have given constructions for showing that DFAs are closed under 1.Complement 2.Intersection.
NFA Closure Properties Sipser pages pages NFAs also have closure properties We have given constructions for showing that DFAs are closed under.
Theory of Computation, Feodor F. Dragan, Kent State University 1 Regular expressions: definition An algebraic equivalent to finite automata. We can build.
Prof. Busch - LSU1 NFAs accept the Regular Languages.
Lecture 5 Sept 06, 2012 Regular expressions – examples Converting DFA to regular expression. (same works for NFA to r.e. conversion.) Converting R.E. to.
CHAPTER 1 Regular Languages
Lecture # 12. Nondeterministic Finite Automaton (NFA) Definition: An NFA is a TG with a unique start state and a property of having single letter as label.
INHERENT LIMITATIONS OF COMPUTER PROGAMS CSci 4011.
Regular Expressions Costas Busch - LSU.
Costas Busch - LSU1 Properties of Context-Free languages.
1 Language Recognition (11.4) Longin Jan Latecki Temple University Based on slides by Costas Busch from the courseCostas Busch
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen.
1 Some Properties of Regular Languages. 2 Properties Concatenation:Star: Union: Are regular Languages For regular languages and.
Complexity and Computability Theory I Lecture #5 Rina Zviel-Girshin Leah Epstein Winter
Finite Automata A simple model of computation. 2 Finite Automata2 Outline Deterministic finite automata (DFA) –How a DFA works.
Costas Busch - LSU1 PDAs Accept Context-Free Languages.
P Symbol Q E(Q) a b a b a b Convert to a DFA: Start state: Final States:
1 Closure E.g., we understand number systems partly by understanding closure properties: Naturals are closed under +, , but not -, . Integers are closed.
Lecture 15: Theory of Automata:2014 Finite Automata with Output.
Languages.
Non Deterministic Automata
Properties of Regular Languages
PROPERTIES OF REGULAR LANGUAGES
Formal Language & Automata Theory
Formal Language & Automata Theory
PDAs Accept Context-Free Languages
Single Final State for NFA
Language Recognition (12.4)
Non-Deterministic Finite Automata
CSE322 PROPERTIES OF REGULAR LANGUAGES
Properties of Regular Languages
Non-Deterministic Finite Automata
Non Deterministic Automata
Deterministic PDAs - DPDAs
Closure Properties of Context-Free languages
CSCI 2670 Introduction to Theory of Computing
Properties of Context-Free languages
Language Recognition (12.4)
Convert to a DFA: Start state: Final States: P Symbol Q E(Q) a b.
Chapter 1 Regular Language
Lecture # 13.
NFAs accept the Regular Languages
Presentation transcript:

1 NFAs accept the Regular Languages

2 Equivalence of Machines Definition: Machine is equivalent to machine if

3 Example of equivalent machines NFA FA

4 We will prove: Languages accepted by NFAs Regular Languages NFAs and FAs have the same computation power Languages accepted by FAs

5 Languages accepted by NFAs Regular Languages accepted by NFAs Regular Languages We will show:

6 Languages accepted by NFAs Regular Languages Proof-Step 1 Proof: Every FA is trivially an NFA Any language accepted by a FA is also accepted by an NFA

7 Languages accepted by NFAs Regular Languages Proof-Step 2 Proof: Any NFA can be converted to an equivalent FA Any language accepted by an NFA is also accepted by a FA

8 Convert NFA to FA NFA FA

9 Convert NFA to FA NFA FA

10 Convert NFA to FA NFA FA

11 Convert NFA to FA NFA FA

12 Convert NFA to FA NFA FA

13 Convert NFA to FA NFA FA

14 Convert NFA to FA NFA FA

15 NFA to FA: Remarks We are given an NFA We want to convert it to an equivalent FA With

16 If the NFA has states the FA has states in the powerset

17 Procedure NFA to FA 1. Initial state of NFA: Initial state of FA:

18 Example NFA FA

19 Procedure NFA to FA 2. For every FA’s state Compute in the NFA Add transition to FA

20 Exampe NFA FA

21 Procedure NFA to FA Repeat Step 2 for all letters in alphabet, until no more transitions can be added.

22 Example NFA FA

23 Procedure NFA to FA 3. For any FA state If is accepting state in NFA Then, is accepting state in FA

24 Example NFA FA

25 Theorem Take NFA Apply procedure to obtain FA Then and are equivalent :

26 Proof AND

27 First we show: Take arbitrary: We will prove:

28

29 denotes

30 We will show that if then

31 More generally, we will show that if in : (arbitrary string) then

32 Proof by induction on Induction Basis: Is true by construction of

33 Induction hypothesis:

34 Induction Step:

35 Induction Step:

36 Therefore if then

37 We have shown: We also need to show: (proof is similar)

38 Single Accepting State for NFAs

39 Any NFA can be converted to an equivalent NFA with a single accepting state

40 NFA Equivalent NFA Example

41 NFA In General Equivalent NFA Single accepting state

42 Extreme Case NFA without accepting state Add an accepting state without transitions

43 Properties of Regular Languages

44 Concatenation: Star: Union: Are regular Languages For regular languages and we will prove that: Complement: Intersection: Reversal:

45 We say: Regular languages are closed under Concatenation: Star: Union: Complement: Intersection: Reversal:

46 Regular language Single accepting state NFA Single aceepting state Regular language NFA

47 Example

48 Union NFA for

49 Example NFA for

50 Concatenation NFA for

51 Example NFA for

52 Star Operation NFA for

53 Example NFA for

54 Reverse NFA for 1. Reverse all transitions 2. Make initial state accepting state and vice versa

55 Example

56 Complement 1. Take the FA that accepts 2. Make final states non-final, and vice-versa

57 Example

58 Intersection regular We show regular

59 DeMorgan’s Law: regular

60 Example regular

61 for FA Construct a new FA that accepts Machine simulates in parallel and Another Proof for Intersection Closure

62 States in State in

63 transition FA transition FA

64 initial state Initial state FA

65 accept state accept states FA Both constituents must be accepting states

66 Example:

67 Automaton for intersection

68 simulates in parallel and accepts stringif and only if accepts string and accepts string