CSCI 2670 Introduction to Theory of Computing

Slides:



Advertisements
Similar presentations
CSCI 2670 Introduction to Theory of Computing September 13, 2005.
Advertisements

1 Introduction to Computability Theory Discussion1: Conversion of A DFA to a Regular Expression Prof. Amos Israeli.
Regular expressions Regular languages Sipser 1.3 (pages 63-76)
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.
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 Regular Expressions. 2 Regular expressions describe regular languages Example: describes the language.
Lecture 3: Closure Properties & Regular Expressions Jim Hook Tim Sheard Portland State University.
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Regular.
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.
Fall 2006Costas Busch - RPI1 Non-Deterministic Finite Automata.
Lecture 8 Sept 29, 2011 Regular expressions – examples Converting DFA to regular expression. (same works for NFA to r.e. conversion.) Converting R.E. to.
CS 310 – Fall 2006 Pacific University CS310 Homework 2 & JFLAP September 22, 2006.
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.
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.
Fall 2004COMP 3351 Regular Expressions. Fall 2004COMP 3352 Regular Expressions Regular expressions describe regular languages Example: describes the language.
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.
CSCI 2670 Introduction to Theory of Computing September 1, 2005.
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
CSCI 2670 Introduction to Theory of Computing September 13.
Regular Expressions Costas Busch - LSU.
 2004 SDU Lecture4 Regular Expressions.  2004 SDU 2 Regular expressions A third way to view regular languages. Say that R is a regular expression if.
1 Introduction to the Theory of Computation Regular Expressions.
CSCI 2670 Introduction to Theory of Computing September 7, 2004.
CSCI 2670 Introduction to Theory of Computing September 11, 2007.
Regular Languages Chapter 1 Giorgi Japaridze Theory of Computability.
Theory of Computation Automata Theory Dr. Ayman Srour.
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:
Lecture # 16. Applications of Incrementing and Complementing machines 1’s complementing and incrementing machines which are basically Mealy machines are.
Page 1. 1)Let B n = { a k | where k is a multiple of n}. I.e. B 1 = { a k | where k is a multiple of 1} = { a k | k Є {0,1,2,3,…}} = {‘’, a, aa, aaa, aaaa,
CSCI 2670 Introduction to Theory of Computing
Non Deterministic Automata
Single Final State for NFA
CSC 4170 Theory of Computation Nondeterminism Section 1.2.
CS 154, Lecture 3: DFANFA, Regular Expressions.
Non-Deterministic Finite Automata
CSCI 2670 Introduction to Theory of Computing
NFA vs DFA DFA: For every state q in S and every character  in , one and only one transition of the following form occurs:  q q’ NFA: For every state.
NFAs, DFAs, and regular expressions
CSCI 2670 Introduction to Theory of Computing
CSCI 2670 Introduction to Theory of Computing
CSCI 2670 Introduction to Theory of Computing
CS21 Decidability and Tractability
CSCI 2670 Introduction to Theory of Computing
Chapter 1 Regular Language - 02
CS21 Decidability and Tractability
CSCI 2670 Introduction to Theory of Computing
CSCI 2670 Introduction to Theory of Computing
CSCI 2670 Introduction to Theory of Computing
CSC 4170 Theory of Computation Nondeterminism Section 1.2.
MA/CSSE 474 DFSM to RE Theory of Computation
CSCI 2670 Introduction to Theory of Computing
Kleene’s Theorem (Part-3)
CSCI 2670 Introduction to Theory of Computing
CSCI 2670 Introduction to Theory of Computing
CSCI 2670 Introduction to Theory of Computing
CSCI 2670 Introduction to Theory of Computing
Intro to Theory of Computation
CSCI 2670 Introduction to Theory of Computing
COSC 3340: Introduction to Theory of Computation
COSC 3340: Introduction to Theory of Computation
Presentation transcript:

CSCI 2670 Introduction to Theory of Computing September 8, 2005

Announcement Remove problems 1.46c and 1.55(c,f,j) from your homework assignments New assignment 1.7(d,h), 1.16b, 1.21b (show the GNFA steps),1.19a Old text numbers 1.5(d,g), 1.12b, 1.16b, 1.14a

Agenda This week Today Proved every RE has a corresponding DFA I.e., every RE describes a regular language Showed how to convert GNFA to RE Today Prove every DFA has a corresponding RE Example of conversion from GNFA to RE Proving a language is not regular?

Accounting for loops a22a23a33*a32 a11a13a33*a31 a12a13a33*a32 q1’

Every DFA has a corresponding RE Proof: Let M be any DFA and let w be any string in Σ*. Convert M to G, a GNFA, then convert G to R, a regular expression, using methods shown in class. Want to show wL(M) iff wL(R). First show wL(M) iff wL(G). Then show wL(G) iff wL(R).

wL(M) iff wL(G) Assume wL(M) and w = w1w2…wn, where each wi  Σ. Then there is a sequence of states q1, q2, …, qn+1 such that q1 = q0 qn+1F qi+1 = (qi,wi) for each i = 1, 2, …, n When w is read by G, the sequence of states qs, q1, q2, …, qn+1, qt would accept w i.e., wL(G)

wL(M) iff wL(G) Assume wL(G) and w = w1w2…wn, where each wiΣ. Then there is a sequence of states qs, q1, q2, …, qn+1, qt such that q1 = q0 qn+1F qi+1 = (qi,wi) for each i = 1, 2, …, n When w is read by M, the sequence of states q1, q2, …, qn+1 would accept w i.e., wL(M)

wL(G) iff wL(R) Prove by induction on number of states in G Base case: If G has 2 states then clearly wL(G) iff wL(R). Induction step: Assume wL(G) iff wL(R) for every G with k-1 states. Prove w  L(G) iff wL(R) for every G with k states.

wL(R) if wL(G) Assume wL(G) and an accepting branch of the computation G enters on w is qs, q1, q2, …, qt. Let G’ be the GNFA that results from removing one of G’s states, qrip. There are two possibilities: Case 1: qrip is never entered in the computation of w. Then the same branch of computation exists in G’.

wL(R) if wL(G) Assume wL(G) and an accepting branch of the computation G enters on w is qs, q1, q2, …, qt. Let G’ be the GNFA that results from removing one of G’s states, qrip. There are two possibilities: Case 2: qrip is entered in the computation of w (bracketed byqi and qj). Then the new transition between qi and qj in G’ describes the computation that could be done on the computation of w through the branch qi, qrip, qj. So G’ accepts w. By induction wL(R).

wL(G) if wL(R) Assume wL(R). By induction hypothesis, wL(G’), the k-1 state GNFA resulting from removing one state from G. By construction, any computation in G’ can also be done in G – possibly going through an extra state qrip. Therefore, wL(G).

Example 1 q1 q2

Example 1 1 q1 q2 ε ε qs qt Step 1: Add two new states

Example 101*0 1 1 q1 q2 ε ε qs qt 1*0 Step 2: Remove q1

Example 101*0 q2 ε qs qt 1*0 1*0(101*0)* Step 3: Remove q2

Example So this DFA 1 q1 q2 Is equivalent to the regular expression 1*0(101*0)*

Have an excellent weekend