Finite Automata Part One

Size: px
Start display at page:

Download "Finite Automata Part One"

Transcription

1 Finite Automata Part One

2 Computability Theory

3 What problems can we solve with a computer?

4 What problems can we solve with a computer? What kind of computer?

5 Computers are Messy

6 Computers are Messy

7 Computers are Messy

8 Computers are Messy

9 We need a simpler way of discussing computing machines.

10 An automaton (plural: automata) is a mathematical model of a computing device.

11 Computers are Messy

12 Automata are Clean q q

13 Computers are Messy

14 Automata are Clean q q

15 Computers are Messy

16 Automata are Clean q q

17 Computers are Messy

18 Automata are Clean q q

19 Why Build Models? Mathematical simplicity. It is significantly easier to manipulate our abstract models of computers than it is to manipulate actual computers. Intellectual robustness. If we pick our models correctly, we can make broad, sweeping claims about huge classes of real computers by arguing that they're just special cases of our more general models.

20 Why Build Models? The models of computation we will explore in this class correspond to different conceptions of what a computer could do. Finite automata (next two weeks) are an abstraction of computers with finite resource constraints. Provide upper bounds for the computing machines that we can actually build. Turing machines (later) are an abstraction of computers with unbounded resources. Provide upper bounds for what we could ever hope to accomplish.

21 What problems can we solve with a computer?

22 What problems can we solve with a computer? What is a problem?

23 Problems with Problems Before we can talk about what problems we can solve, we need a formal definition of a problem. We want a definition that corresponds to the problems we want to solve, captures a large class of problems, and is mathematically simple to reason about. No one definition has all three properties.

24 Formal Language Theory

25 Strings An alphabet is a finite, nonempty set of symbols called characters. Typically, we use the symbol Σ to refer to an alphabet. A string over an alphabet Σ is a finite sequence of characters drawn from Σ. Example: If Σ = {a, b}, here are some valid strings over Σ: a aabaaabbabaaabaaaabbb abbababba The empty string has no characters and is denoted ε. Calling attention to an earlier point: since all strings are finite sequences of characters from Σ, you cannot have a string of infinite length.

26 Languages A formal language is a set of strings. We say that L is a language over Σ if it is a set of strings over Σ. Example: The language of palindromes over Σ = {a, b, c} is the set {ε, a, b, c, aa, bb, cc, aaa, aba, aca, bab, } The set of all strings composed from letters in Σ is denoted Σ*. Formally, we say that L is a language over Σ if L Σ*.

27 To Recap Languages are sets of strings, and strings are sequences of characters, and characters are elements of an alphabet.

28 The Model Fundamental Question: For what languages L can you design an automaton that takes as input a string, then decides whether the string is in L? The answer depends on the choice of L, the choice of automaton, and the definition of determines. In answering this question, we ll go through a whirlwind tour of models of computation and see how this seemingly abstract question has very real and powerful consequences.

29 To Summarize An automaton is an idealized mathematical computing machine. A language is a set of strings, a string is a (finite) sequence of characters, and a character is an element of an alphabet. Goal: Figure out in which cases we can build automata for particular languages.

30 What problems can we solve with a computer?

31 Finite Automata

32 A finite automaton is a simple type of mathematical machine for determining whether a string is contained within some language.

33 Each finite automaton consists of a set of states connected by transitions.

34 A Simple Finite Automaton q q

35 A Simple Finite Automaton q q Each Each circle circle represents represents aa state state of of the the automaton. automaton.

36 A Simple Finite Automaton q q

37 A Simple Finite Automaton q q One One special special state state isis designated designated as as the the state. state.

38 A Simple Finite Automaton q q

39 A Simple Finite Automaton q q

40 A Simple Finite Automaton q The The automaton automaton isis run run on on an an input input string string and and answers answers yes yes or or no. no. q

41 A Simple Finite Automaton q q

42 A Simple Finite Automaton q q

43 A Simple Finite Automaton q The The automaton automaton can can a be in one state at be in one state at a time. time. It It begins begins inin the the state. state. q

44 A Simple Finite Automaton q q

45 A Simple Finite Automaton q q

46 A Simple Finite Automaton q The The automaton automaton now now begins begins processing processing characters characters inin the the order order inin which which they they appear. appear. q

47 A Simple Finite Automaton q q

48 A Simple Finite Automaton q q

49 A Simple Finite Automaton q q Each Each arrow arrow inin this this diagram diagram represents represents aa transition. transition. The The automaton automaton always always follows follows the the transition transition corresponding corresponding to to the the current current symbol symbol being being read. read.

50 A Simple Finite Automaton q q

51 A Simple Finite Automaton q q

52 A Simple Finite Automaton q q

53 A Simple Finite Automaton q q

54 A Simple Finite Automaton q q After After transitioning, transitioning, the the automaton automaton considers considers the the next next symbol symbol inin the the input. input.

55 A Simple Finite Automaton q q

56 A Simple Finite Automaton q q

57 A Simple Finite Automaton q q

58 A Simple Finite Automaton q q

59 A Simple Finite Automaton q q

60 A Simple Finite Automaton q q

61 A Simple Finite Automaton q q

62 A Simple Finite Automaton q q

63 A Simple Finite Automaton q q

64 A Simple Finite Automaton q q

65 A Simple Finite Automaton q q

66 A Simple Finite Automaton q q

67 A Simple Finite Automaton q q

68 A Simple Finite Automaton q q

69 A Simple Finite Automaton q q

70 A Simple Finite Automaton q q

71 A Simple Finite Automaton q q

72 A Simple Finite Automaton q q

73 A Simple Finite Automaton q q

74 A Simple Finite Automaton q q

75 A Simple Finite Automaton q q

76 A Simple Finite Automaton Now Now that that the the automaton automaton has has q whether whether to to say say yes yes or or no. no. looked looked at at all all this this input, input, itit can can decide decide q

77 A Simple Finite Automaton Now Now that that the the automaton automaton has has q whether whether to to say say yes yes or or no. no. looked looked at at all all this this input, input, itit can can decide decide q The The double double circle circle indicates indicates that that this this state state isis an an accepting accepting state, state, so so the the automaton automaton outputs outputs yes. yes.

78 A Simple Finite Automaton Now Now that that the the automaton automaton has has q whether whether to to say say yes yes or or no. no. looked looked at at all all this this input, input, itit can can decide decide q The The double double circle circle indicates indicates that that this this state state isis an an accepting accepting state, state, so so the the automaton automaton outputs outputs yes. yes.

79 A Simple Finite Automaton Now Now that that the the automaton automaton has has q whether whether to to say say yes yes or or no. no. looked looked at at all all this this input, input, itit can can decide decide q The The double double circle circle indicates indicates that that this this state state isis an an accepting accepting state, state, so so the the automaton automaton outputs outputs yes. yes.

80 A Simple Finite Automaton q q

81 A Simple Finite Automaton q q

82 A Simple Finite Automaton q q

83 A Simple Finite Automaton q q

84 A Simple Finite Automaton q q

85 A Simple Finite Automaton q q

86 A Simple Finite Automaton q q

87 A Simple Finite Automaton q q

88 A Simple Finite Automaton q q

89 A Simple Finite Automaton q q

90 A Simple Finite Automaton q q

91 A Simple Finite Automaton q q

92 A Simple Finite Automaton q q

93 A Simple Finite Automaton q q

94 A Simple Finite Automaton q q

95 A Simple Finite Automaton q q

96 A Simple Finite Automaton q q

97 A Simple Finite Automaton q q

98 A Simple Finite Automaton q q

99 A Simple Finite Automaton q q

100 A Simple Finite Automaton q q

101 A Simple Finite Automaton q q

102 A Simple Finite Automaton q q

103 A Simple Finite Automaton q q

104 A Simple Finite Automaton q q

105 A Simple Finite Automaton q q

106 A Simple Finite Automaton q q

107 A Simple Finite Automaton q q

108 A Simple Finite Automaton q This This state state isis not not an an accepting accepting state, state, so so the the automaton automaton says says no. no. q

109 A Simple Finite Automaton q This This state state isis not not an an accepting accepting state, state, so so the the automaton automaton says says no. no. q

110 A Simple Finite Automaton q This This state state isis not not an an accepting accepting state, state, so so the the automaton automaton says says no. no. q

111 A Simple Finite Automaton q q

112 A Simple Finite Automaton q q Try Try itit yourself! yourself! Does Does the the automaton automaton accept accept (say (say yes) yes) or or reject reject (say (say no)? no)?

113 The Story So Far A finite automaton is a collection of states joined by transitions. Some state is designated as the state. Some states are designated as accepting states. The automaton processes a string by beginning in the state and following the indicated transitions. If the automaton ends in an accepting state, it accepts the input. Otherwise, the automaton rejects the input.

114 Time-Out For Announcements!

115 Problem Sets Problem Set Four was due at the of class today. You have three 24-hour late days to use throughout the quarter however you d like. Problem Set Five goes out today. It s due next Friday at the of class. Play around with just about everything we ve seen so far: graphs, binary relations, functions, cardinality, the pigeonhole principle, and induction! There is no checkpoint problem.

116 Problem Set Three PS3 has been graded. Here s the distribution: We re happy to chat with you about this problem set, the feedback you received, and how to tune and nudge things going forward. Feel free to stop by OH!

117 Your Questions

118 Is there a documentary or book that really changed the way you thought about something? Yes! Yes! The The books books Unlocking Unlocking the the Clubhouse Clubhouse and and Whistling Whistling Vivaldi Vivaldi completely completely changed changed how how II think think about about questions questions of of identity identity and and belonging. belonging. And And Jiro Jiro Dreams Dreams of of Sushi Sushi was was aa surprisingly surprisingly good good exploration exploration of of the the benefits benefits and and drawbacks drawbacks of of aa singleminded singleminded focus focus on on perfection perfection inin one one domain. domain.

119 Why do you hate philosophy/philosophers so much? I m I m sorry sorry that that I ve I ve given given that that impression! impression! Many Many of of the the foundational foundational ideas ideas inin computer computer science science and and mathematics mathematics are are due due to to philosophers philosophers like like Frege, Frege, Chomsky, Chomsky, and and Russell. Russell. II think think it s it s hugely hugely valuable valuable to to explore explore notions notions of of truth truth and and meaning meaning and and would would definitely definitely recommend recommend taking taking courses courses to to learn learn more more about about that! that!

120 Why should I or shouldn't I take a gap year if I REALLY love CS but have issues adjusting to the pace here? Taking Taking aa gap gap year year can can be be aa great great experience experience ifif you re you re strategic strategic about about when when you you take take itit and and what what you you want want to to accomplish, accomplish, but but it s it s certainly certainly not not for for everyone. everyone. II typically typically would would not not recommend recommend taking taking aa gap gap year year just just because because of of the the pace pace I m I m not not sure sure that that would would necessarily necessarily fix fix the the underlying underlying issue. issue. If If you re you re inin aa position position like like this this and and want want to to chat, chat, please please let let me me know! know! I m I m happy happy to to offer offer advice. advice.

121 Why do you use the number 37 everywhere? The The number number isis very very close close to to the the reciprocal reciprocal of of the the fine-structure fine-structure constant constant inin physics: physics: It It has has aa fun fun history. history. Plus, Plus, it s it s aa great great nothing-up-my-sleeve nothing-up-my-sleeve number number that that (usually) (usually) indicates indicates that that the the particular particular number number doesn t doesn t have have any any meaning. meaning.

122 Back to CS3!

123 Accepting States, Revisited q q q4

124 Accepting States, Revisited q q q4

125 Accepting States, Revisited q q q4

126 Accepting States, Revisited q q q4

127 Accepting States, Revisited q q q4

128 Accepting States, Revisited q q q4

129 Accepting States, Revisited q q q4

130 Accepting States, Revisited q q q4

131 Accepting States, Revisited q q q4

132 Accepting States, Revisited q q q4

133 Accepting States, Revisited q q q4

134 Accepting States, Revisited q q q4

135 Accepting States, Revisited q q q4

136 Accepting States, Revisited q q q4

137 A finite automaton does not accept as soon as it enters an accepting state. A finite automaton accepts if it ends in an accepting state.

138 What Does This Accept? q q q4

139 What Does This Accept? q q q4

140 What Does This Accept? q q q4

141 What Does This Accept? q q q4

142 What Does This Accept? q q q4

143 What Does This Accept? q q q4

144 What Does This Accept? q q q4

145 What Does This Accept? q No No matter matter where where we we in in the the automaton, automaton, q after after seeing seeing two two 's, 's, we we end end up up in in accepting accepting state state q.3. q4

146 What Does This Accept? q q q4

147 What Does This Accept? q q q4

148 What Does This Accept? q q q4

149 What Does This Accept? q q q4

150 What Does This Accept? q q q4

151 What Does This Accept? q q q4

152 What Does This Accept? q No No matter matter where where we we in in the the automaton, automaton, q after after seeing seeing two two 's, 's, we we end end up up in in accepting accepting state state qq5.5. q4

153 What Does This Accept? q q q4

154 What Does This Accept? q This This automaton automaton accepts accepts aa string string iff iff q the the string string ends ends in in or or.. q4

155 The language of an automaton is the set of strings that it accepts. If D is an automaton, we denote the language of D as ℒ(D). ℒ(D) = { w Σ* D accepts w }

156 A Small Problem q q

157 A Small Problem q q

158 A Small Problem q q

159 A Small Problem q q

160 A Small Problem q q

161 A Small Problem q q

162 A Small Problem q q

163 A Small Problem q q

164 A Small Problem q q

165 Another Small Problem, q, q,

166 Another Small Problem, q, q,

167 Another Small Problem, q, q,

168 Another Small Problem, q, q,

169 Another Small Problem, q, q,

170 Another Small Problem, q, q,

171 Another Small Problem, q, q,

172 Another Small Problem, q, q,

173 The Need for Formalism In order to reason about the limits of what finite automata can and cannot do, we need to formally specify their behavior in all cases. All of the following need to be defined or disallowed: What happens if there is no transition out of a state on some input? What happens if there are multiple transitions out of a state on some input?

174 DFAs A DFA is a Deterministic Finite Automaton DFAs are the simplest type of automaton that we will see in this course.

175 DFAs, Informally A DFA is defined relative to some alphabet Σ. For each state in the DFA, there must be exactly one transition defined for each symbol in Σ. This is the deterministic part of DFA. There is a unique state. There are zero or more accepting states.

176 Is this a DFA over {, }?

177 Is this a DFA over {, }? q q

178 Is this a DFA over {, }?

179 Is this a DFA over {, }? q q q4

180 Is this a DFA over {, }?

181 Is this a DFA over {, }? q q

182 Is this a DFA over {, }? q q

183 Is this a DFA over {, }?

184 Is this a DFA over {, }? q,, q,,

185 Is this a DFA over {, }?

186 Is this a DFA over {, }?, q, q,

187 Is this a DFA over {, }?, q, q,

188 Is this a DFA?

189 Is this a DFA?

190 Is this a DFA? Drinking Family of Aardvarks

191 Designing DFAs At each point in its execution, the DFA can only remember what state it is in. DFA Design Tip: Build each state to correspond to some piece of information you need to remember. Each state acts as a memento of what you're supposed to do next. Only finitely many different states only finitely many different things the machine can remember.

192 Recognizing Languages with DFAs L = { w {, }* the number of 's in w is congruent to two modulo three }

193 Recognizing Languages with DFAs L = { w {, }* the number of 's in w is congruent to two modulo three } q

194 Recognizing Languages with DFAs L = { w {, }* the number of 's in w is congruent to two modulo three } q

195 Recognizing Languages with DFAs L = { w {, }* the number of 's in w is congruent to two modulo three } q q

196 Recognizing Languages with DFAs L = { w {, }* the number of 's in w is congruent to two modulo three } q q

197 Recognizing Languages with DFAs L = { w {, }* the number of 's in w is congruent to two modulo three } q q

198 Recognizing Languages with DFAs L = { w {, }* the number of 's in w is congruent to two modulo three } q q

199 Recognizing Languages with DFAs L = { w {, }* the number of 's in w is congruent to two modulo three } q q

200 Recognizing Languages with DFAs L = { w {, }* the number of 's in w is congruent to two modulo three } q q

201 Recognizing Languages with DFAs L = { w {, }* the number of 's in w is congruent to two modulo three } q q Each Each state state remembers remembers the the remainder remainder of of the the number number of of 's 's seen seen so so far far modulo modulo three. three.

202 Recognizing Languages with DFAs L = { w {, }* w contains as a substring }

203 Recognizing Languages with DFAs L = { w {, }* w contains as a substring } q

204 Recognizing Languages with DFAs L = { w {, }* w contains as a substring } q

205 Recognizing Languages with DFAs L = { w {, }* w contains as a substring } q q

206 Recognizing Languages with DFAs L = { w {, }* w contains as a substring } q q

207 Recognizing Languages with DFAs L = { w {, }* w contains as a substring } q q

208 Recognizing Languages with DFAs L = { w {, }* w contains as a substring } q q

209 Recognizing Languages with DFAs L = { w {, }* w contains as a substring } q q,

210 Recognizing Languages with DFAs L = { w {, }* w contains as a substring } q q,

211 Recognizing Languages with DFAs L = { w {, }* w contains as a substring } q q Σ

212 Recognizing Languages with DFAs L = { w {, }* w contains as a substring } q q Σ

213 More Elaborate DFAs L = { w {a, *, /}* w represents a C-style comment } Let s Let s have have the the aa symbol symbol be be aa placeholder placeholder for for some some character character that that isn t isn t aa star star or or slash. slash. Try Try designing designing aa DFA DFA for for comments! comments! Here s Here s some some test test cases cases to to help help you you check check your your work: work: Accepted: Rejected: /*a*/ /**/ /***/ /*aaa*aaa*/ /*a/a*/ /** /**/a/*aa*/ aaa/**/aa /*/ /**a/ //aaaa

214 More Elaborate DFAs L = { w {a, *, /}* w represents a C-style comment } Σ a, * Σ q5 /, a q / q * * a a, / / * q4

Finite Automata Part One

Finite Automata Part One Finite Automata Part One Computability Theory What problems can we solve with a computer? What kind of computer? Computers are Messy http://www.intel.com/design/intarch/prodbref/27273.htm We need a simpler

More information

Finite Automata Part One

Finite Automata Part One Finite Automata Part One Computability Theory What problems can we solve with a computer? What kind of computer? Computers are Messy http://en.wikipedia.org/wiki/file:eniac.jpg Computers are Messy That

More information

Finite Automata Part One

Finite Automata Part One Finite Automata Part One Computability Theory What problems can we solve with a computer? What problems can we solve with a computer? What kind of computer? Computers are Messy http://www.intel.com/design/intarch/prodbref/27273.htm

More information

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

Announcements. Problem Set Four due Thursday at 7:00PM (right before the midterm). Finite Automata Announcements Problem Set Four due Thursday at 7:PM (right before the midterm). Stop by OH with questions! Email cs3@cs.stanford.edu with questions! Review session tonight, 7PM until whenever

More information

Finite Automata Part Two

Finite Automata Part Two Finite Automata Part Two Recap from Last Time Old MacDonald Had a Symbol, Σ-eye-ε-ey, Oh! You may have noticed that we have several letter- E-ish symbols in CS103, which can get confusing! Here s a quick

More information

Nonregular Languages

Nonregular Languages Nonregular Languages Recap from Last Time Theorem: The following are all equivalent: L is a regular language. There is a DFA D such that L( D) = L. There is an NFA N such that L( N) = L. There is a regular

More information

Turing Machines Part III

Turing Machines Part III Turing Machines Part III Announcements Problem Set 6 due now. Problem Set 7 out, due Monday, March 4. Play around with Turing machines, their powers, and their limits. Some problems require Wednesday's

More information

Mathematical Induction Part Two

Mathematical Induction Part Two Mathematical Induction Part Two Recap from Last Time Let P be some predicate. The principle of mathematical induction states that if If it starts true and it stays P(0) is true true and k ℕ. (P(k) P(k+1))

More information

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

CS 154, Lecture 2: Finite Automata, Closure Properties Nondeterminism, CS 54, Lecture 2: Finite Automata, Closure Properties Nondeterminism, Why so Many Models? Streaming Algorithms 0 42 Deterministic Finite Automata Anatomy of Deterministic Finite Automata transition: for

More information

Recap from Last Time

Recap from Last Time Regular Expressions Recap from Last Time Regular Languages A language L is a regular language if there is a DFA D such that L( D) = L. Theorem: The following are equivalent: L is a regular language. There

More information

Finite Automata Part Two

Finite Automata Part Two Finite Automata Part Two DFAs A DFA is a Deterministic Finite Automaton A DFA is defined relative to some alphabet Σ. For each state in the DFA, there must be exactly one transition defined for each symbol

More information

CSC236 Week 10. Larry Zhang

CSC236 Week 10. Larry Zhang CSC236 Week 10 Larry Zhang 1 Today s Topic Deterministic Finite Automata (DFA) 2 Recap of last week We learned a lot of terminologies alphabet string length of string union concatenation Kleene star language

More information

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY 5-453 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY NON-DETERMINISM and REGULAR OPERATIONS THURSDAY JAN 6 UNION THEOREM The union of two regular languages is also a regular language Regular Languages Are

More information

CS 154. Finite Automata, Nondeterminism, Regular Expressions

CS 154. Finite Automata, Nondeterminism, Regular Expressions CS 54 Finite Automata, Nondeterminism, Regular Expressions Read string left to right The DFA accepts a string if the process ends in a double circle A DFA is a 5-tuple M = (Q, Σ, δ, q, F) Q is the set

More information

CSC173 Workshop: 13 Sept. Notes

CSC173 Workshop: 13 Sept. Notes CSC173 Workshop: 13 Sept. Notes Frank Ferraro Department of Computer Science University of Rochester September 14, 2010 1 Regular Languages and Equivalent Forms A language can be thought of a set L of

More information

(Refer Slide Time: 0:21)

(Refer Slide Time: 0:21) Theory of Computation Prof. Somenath Biswas Department of Computer Science and Engineering Indian Institute of Technology Kanpur Lecture 7 A generalisation of pumping lemma, Non-deterministic finite automata

More information

CS 301. Lecture 18 Decidable languages. Stephen Checkoway. April 2, 2018

CS 301. Lecture 18 Decidable languages. Stephen Checkoway. April 2, 2018 CS 301 Lecture 18 Decidable languages Stephen Checkoway April 2, 2018 1 / 26 Decidable language Recall, a language A is decidable if there is some TM M that 1 recognizes A (i.e., L(M) = A), and 2 halts

More information

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

CISC 4090: Theory of Computation Chapter 1 Regular Languages. Section 1.1: Finite Automata. What is a computer? Finite automata CISC 4090: Theory of Computation Chapter Regular Languages Xiaolan Zhang, adapted from slides by Prof. Werschulz Section.: Finite Automata Fordham University Department of Computer and Information Sciences

More information

CSC236 Week 11. Larry Zhang

CSC236 Week 11. Larry Zhang CSC236 Week 11 Larry Zhang 1 Announcements Next week s lecture: Final exam review This week s tutorial: Exercises with DFAs PS9 will be out later this week s. 2 Recap Last week we learned about Deterministic

More information

Automata: a short introduction

Automata: a short introduction ILIAS, University of Luxembourg Discrete Mathematics II May 2012 What is a computer? Real computers are complicated; We abstract up to an essential model of computation; We begin with the simplest possible

More information

Turing Machines Part One

Turing Machines Part One Turing Machines Part One What problems can we solve with a computer? Regular Languages CFLs Languages recognizable by any feasible computing machine All Languages That same drawing, to scale. All Languages

More information

Chapter Two: Finite Automata

Chapter Two: Finite Automata Chapter Two: Finite Automata In theoretical computer science, automata theory is the study of abstract machines (or more appropriately, abstract 'mathematical' machines or systems) and the computational

More information

Theory of Computation

Theory of Computation Theory of Computation Lecture #2 Sarmad Abbasi Virtual University Sarmad Abbasi (Virtual University) Theory of Computation 1 / 1 Lecture 2: Overview Recall some basic definitions from Automata Theory.

More information

UNIT-III REGULAR LANGUAGES

UNIT-III REGULAR LANGUAGES Syllabus R9 Regulation REGULAR EXPRESSIONS UNIT-III REGULAR LANGUAGES Regular expressions are useful for representing certain sets of strings in an algebraic fashion. In arithmetic we can use the operations

More information

Turing machines and linear bounded automata

Turing machines and linear bounded automata and linear bounded automata Informatics 2A: Lecture 30 John Longley School of Informatics University of Edinburgh jrl@inf.ed.ac.uk 25 November 2016 1 / 17 The Chomsky hierarchy: summary Level Language

More information

CS 154 Introduction to Automata and Complexity Theory

CS 154 Introduction to Automata and Complexity Theory CS 154 Introduction to Automata and Complexity Theory cs154.stanford.edu 1 INSTRUCTORS & TAs Ryan Williams Cody Murray Lera Nikolaenko Sunny Rajan 2 Textbook 3 Homework / Problem Sets Homework will be

More information

Nondeterministic finite automata

Nondeterministic finite automata Lecture 3 Nondeterministic finite automata This lecture is focused on the nondeterministic finite automata (NFA) model and its relationship to the DFA model. Nondeterminism is an important concept in the

More information

A Note on Turing Machine Design

A Note on Turing Machine Design CS103 Handout 17 Fall 2013 November 11, 2013 Problem Set 7 This problem explores Turing machines, nondeterministic computation, properties of the RE and R languages, and the limits of RE and R languages.

More information

Proving languages to be nonregular

Proving languages to be nonregular Proving languages to be nonregular We already know that there exist languages A Σ that are nonregular, for any choice of an alphabet Σ. This is because there are uncountably many languages in total and

More information

Mathematical Logic Part One

Mathematical Logic Part One Mathematical Logic Part One Question: How do we formalize the definitions and reasoning we use in our proofs? Where We're Going Propositional Logic (Today) Basic logical connectives. Truth tables. Logical

More information

Griffith University 3130CIT Theory of Computation (Based on slides by Harald Søndergaard of The University of Melbourne) Turing Machines 9-0

Griffith University 3130CIT Theory of Computation (Based on slides by Harald Søndergaard of The University of Melbourne) Turing Machines 9-0 Griffith University 3130CIT Theory of Computation (Based on slides by Harald Søndergaard of The University of Melbourne) Turing Machines 9-0 Turing Machines Now for a machine model of much greater power.

More information

Turing Machines Part Two

Turing Machines Part Two Turing Machines Part Two Recap from Last Time Our First Turing Machine q acc a start q 0 q 1 a This This is is the the Turing Turing machine s machine s finiteisttiteiconntont. finiteisttiteiconntont.

More information

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY 15-453 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY REVIEW for MIDTERM 1 THURSDAY Feb 6 Midterm 1 will cover everything we have seen so far The PROBLEMS will be from Sipser, Chapters 1, 2, 3 It will be

More information

Theory of computation: initial remarks (Chapter 11)

Theory of computation: initial remarks (Chapter 11) Theory of computation: initial remarks (Chapter 11) For many purposes, computation is elegantly modeled with simple mathematical objects: Turing machines, finite automata, pushdown automata, and such.

More information

Languages, regular languages, finite automata

Languages, regular languages, finite automata Notes on Computer Theory Last updated: January, 2018 Languages, regular languages, finite automata Content largely taken from Richards [1] and Sipser [2] 1 Languages An alphabet is a finite set of characters,

More information

CS 154, Lecture 3: DFA NFA, Regular Expressions

CS 154, Lecture 3: DFA NFA, Regular Expressions CS 154, Lecture 3: DFA NFA, Regular Expressions Homework 1 is coming out Deterministic Finite Automata Computation with finite memory Non-Deterministic Finite Automata Computation with finite memory and

More information

Languages. A language is a set of strings. String: A sequence of letters. Examples: cat, dog, house, Defined over an alphabet:

Languages. A language is a set of strings. String: A sequence of letters. Examples: cat, dog, house, Defined over an alphabet: Languages 1 Languages A language is a set of strings String: A sequence of letters Examples: cat, dog, house, Defined over an alphaet: a,, c,, z 2 Alphaets and Strings We will use small alphaets: Strings

More information

Takeaway Notes: Finite State Automata

Takeaway Notes: Finite State Automata Takeaway Notes: Finite State Automata Contents 1 Introduction 1 2 Basics and Ground Rules 2 2.1 Building Blocks.............................. 2 2.2 The Name of the Game.......................... 2 3 Deterministic

More information

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION CSE 105 THEORY OF COMPUTATION "Winter" 2018 http://cseweb.ucsd.edu/classes/wi18/cse105-ab/ Today's learning goals Sipser Section 1.1 Design an automaton that recognizes a given language. Specify each of

More information

Author: Vivek Kulkarni ( )

Author: Vivek Kulkarni ( ) Author: Vivek Kulkarni ( vivek_kulkarni@yahoo.com ) Chapter-2: Finite State Machines Solutions for Review Questions @ Oxford University Press 2013. All rights reserved. 1 Q.1 Construct Mealy and Moore

More information

Formal Definition of Computation. August 28, 2013

Formal Definition of Computation. August 28, 2013 August 28, 2013 Computation model The model of computation considered so far is the work performed by a finite automaton Finite automata were described informally, using state diagrams, and formally, as

More information

6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, Class 8 Nancy Lynch

6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, Class 8 Nancy Lynch 6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, 2010 Class 8 Nancy Lynch Today More undecidable problems: About Turing machines: Emptiness, etc. About

More information

Most General computer?

Most General computer? Turing Machines Most General computer? DFAs are simple model of computation. Accept only the regular languages. Is there a kind of computer that can accept any language, or compute any function? Recall

More information

CISC4090: Theory of Computation

CISC4090: Theory of Computation CISC4090: Theory of Computation Chapter 2 Context-Free Languages Courtesy of Prof. Arthur G. Werschulz Fordham University Department of Computer and Information Sciences Spring, 2014 Overview In Chapter

More information

Turing machines and linear bounded automata

Turing machines and linear bounded automata and linear bounded automata Informatics 2A: Lecture 29 John Longley School of Informatics University of Edinburgh jrl@inf.ed.ac.uk 27 November 2015 1 / 15 The Chomsky hierarchy: summary Level Language

More information

Nondeterministic Finite Automata and Regular Expressions

Nondeterministic Finite Automata and Regular Expressions Nondeterministic Finite Automata and Regular Expressions CS 2800: Discrete Structures, Spring 2015 Sid Chaudhuri Recap: Deterministic Finite Automaton A DFA is a 5-tuple M = (Q, Σ, δ, q 0, F) Q is a finite

More information

Formal Definition of a Finite Automaton. August 26, 2013

Formal Definition of a Finite Automaton. August 26, 2013 August 26, 2013 Why a formal definition? A formal definition is precise: - It resolves any uncertainties about what is allowed in a finite automaton such as the number of accept states and number of transitions

More information

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

CSE 311 Lecture 23: Finite State Machines. Emina Torlak and Kevin Zatloukal CSE 3 Lecture 3: Finite State Machines Emina Torlak and Kevin Zatloukal Topics Finite state machines (FSMs) Definition and examples. Finite state machines with output Definition and examples. Finite state

More information

1 More finite deterministic automata

1 More finite deterministic automata CS 125 Section #6 Finite automata October 18, 2016 1 More finite deterministic automata Exercise. Consider the following game with two players: Repeatedly flip a coin. On heads, player 1 gets a point.

More information

Complexity Theory Part I

Complexity Theory Part I Complexity Theory Part I Outline for Today Recap from Last Time Reviewing Verifiers Nondeterministic Turing Machines What does nondeterminism mean in the context of TMs? And just how powerful are NTMs?

More information

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION CSE 105 THEORY OF COMPUTATION "Winter" 2018 http://cseweb.ucsd.edu/classes/wi18/cse105-ab/ Today's learning goals Sipser Section 1.1 Determine if a language is regular Apply closure properties to conclude

More information

Announcements. Using a 72-hour extension, due Monday at 11:30AM.

Announcements. Using a 72-hour extension, due Monday at 11:30AM. The Big Picture Announcements Problem Set 9 due right now. Using a 72-hour extension, due Monday at 11:30AM. On-time Problem Set 8's graded, should be returned at the end of lecture. Final exam review

More information

Closure under the Regular Operations

Closure under the Regular Operations Closure under the Regular Operations Application of NFA Now we use the NFA to show that collection of regular languages is closed under regular operations union, concatenation, and star Earlier we have

More information

CSCE 551: Chin-Tser Huang. University of South Carolina

CSCE 551: Chin-Tser Huang. University of South Carolina CSCE 551: Theory of Computation Chin-Tser Huang huangct@cse.sc.edu University of South Carolina Church-Turing Thesis The definition of the algorithm came in the 1936 papers of Alonzo Church h and Alan

More information

Turing machines and linear bounded automata

Turing machines and linear bounded automata and linear bounded automata Informatics 2A: Lecture 29 John Longley School of Informatics University of Edinburgh jrl@inf.ed.ac.uk 25 November, 2011 1 / 13 1 The Chomsky hierarchy: summary 2 3 4 2 / 13

More information

Announcements. Final exam review session tomorrow in Gates 104 from 2:15PM 4:15PM Final Friday Four Square of the quarter!

Announcements. Final exam review session tomorrow in Gates 104 from 2:15PM 4:15PM Final Friday Four Square of the quarter! The Big Picture Problem Problem Set Set 99 due due in in the the box box up up front. front. Congrats Congrats on on finishing finishing the the last last problem problem set set of of the the quarter!

More information

UNIT-I. Strings, Alphabets, Language and Operations

UNIT-I. Strings, Alphabets, Language and Operations UNIT-I Strings, Alphabets, Language and Operations Strings of characters are fundamental building blocks in computer science. Alphabet is defined as a non empty finite set or nonempty set of symbols. The

More information

Discrete Structures Proofwriting Checklist

Discrete Structures Proofwriting Checklist CS103 Winter 2019 Discrete Structures Proofwriting Checklist Cynthia Lee Keith Schwarz Now that we re transitioning to writing proofs about discrete structures like binary relations, functions, and graphs,

More information

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska LECTURE 5 CHAPTER 2 FINITE AUTOMATA 1. Deterministic Finite Automata DFA 2. Nondeterministic Finite Automata NDFA 3. Finite Automata

More information

CMPSCI 250: Introduction to Computation. Lecture #22: From λ-nfa s to NFA s to DFA s David Mix Barrington 22 April 2013

CMPSCI 250: Introduction to Computation. Lecture #22: From λ-nfa s to NFA s to DFA s David Mix Barrington 22 April 2013 CMPSCI 250: Introduction to Computation Lecture #22: From λ-nfa s to NFA s to DFA s David Mix Barrington 22 April 2013 λ-nfa s to NFA s to DFA s Reviewing the Three Models and Kleene s Theorem The Subset

More information

Theory of computation: initial remarks (Chapter 11)

Theory of computation: initial remarks (Chapter 11) Theory of computation: initial remarks (Chapter 11) For many purposes, computation is elegantly modeled with simple mathematical objects: Turing machines, finite automata, pushdown automata, and such.

More information

Automata & languages. A primer on the Theory of Computation. Laurent Vanbever. ETH Zürich (D-ITET) September,

Automata & languages. A primer on the Theory of Computation. Laurent Vanbever.  ETH Zürich (D-ITET) September, Automata & languages A primer on the Theory of Computation Laurent Vanbever www.vanbever.eu ETH Zürich (D-ITET) September, 24 2015 Last week was all about Deterministic Finite Automaton We saw three main

More information

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

Deterministic Finite Automata. Non deterministic finite automata. Non-Deterministic Finite Automata (NFA) Non-Deterministic Finite Automata (NFA) Deterministic Finite Automata Non deterministic finite automata Automata we ve been dealing with have been deterministic For every state and every alphabet symbol there is exactly one move that the machine

More information

Fooling Sets and. Lecture 5

Fooling Sets and. Lecture 5 Fooling Sets and Introduction to Nondeterministic Finite Automata Lecture 5 Proving that a language is not regular Given a language, we saw how to prove it is regular (union, intersection, concatenation,

More information

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,

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, Recall A deterministic finite automaton is a five-tuple where S is a finite set of states, M = (S, Σ, T, s 0, F ) Σ is an alphabet the input alphabet, T : S Σ S is the transition function, s 0 S is the

More information

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

Clarifications from last time. This Lecture. Last Lecture. CMSC 330: Organization of Programming Languages. Finite Automata. CMSC 330: Organization of Programming Languages Last Lecture Languages Sets of strings Operations on languages Finite Automata Regular expressions Constants Operators Precedence CMSC 330 2 Clarifications

More information

Let us first give some intuitive idea about a state of a system and state transitions before describing finite automata.

Let us first give some intuitive idea about a state of a system and state transitions before describing finite automata. Finite Automata Automata (singular: automation) are a particularly simple, but useful, model of computation. They were initially proposed as a simple model for the behavior of neurons. The concept of a

More information

Theory of Computation p.1/?? Theory of Computation p.2/?? Unknown: Implicitly a Boolean variable: true if a word is

Theory of Computation p.1/?? Theory of Computation p.2/?? Unknown: Implicitly a Boolean variable: true if a word is Abstraction of Problems Data: abstracted as a word in a given alphabet. Σ: alphabet, a finite, non-empty set of symbols. Σ : all the words of finite length built up using Σ: Conditions: abstracted as a

More information

Part 4 out of 5 DFA NFA REX. Automata & languages. A primer on the Theory of Computation. Last week, we showed the equivalence of DFA, NFA and REX

Part 4 out of 5 DFA NFA REX. Automata & languages. A primer on the Theory of Computation. Last week, we showed the equivalence of DFA, NFA and REX Automata & languages A primer on the Theory of Computation Laurent Vanbever www.vanbever.eu Part 4 out of 5 ETH Zürich (D-ITET) October, 12 2017 Last week, we showed the equivalence of DFA, NFA and REX

More information

Computer Sciences Department

Computer Sciences Department 1 Reference Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER 3 objectives Finite automaton Infinite automaton Formal definition State diagram Regular and Non-regular

More information

CSE 311: Foundations of Computing. Lecture 26: More on Limits of FSMs, Cardinality

CSE 311: Foundations of Computing. Lecture 26: More on Limits of FSMs, Cardinality CSE 311: Foundations of Computing Lecture 26: More on Limits of FSMs, Cardinality Last time: Languages and Representations All Context-Free??? Prove there is Regular a context-free DFA language 0* NFA

More information

PS2 - Comments. University of Virginia - cs3102: Theory of Computation Spring 2010

PS2 - Comments. University of Virginia - cs3102: Theory of Computation Spring 2010 University of Virginia - cs3102: Theory of Computation Spring 2010 PS2 - Comments Average: 77.4 (full credit for each question is 100 points) Distribution (of 54 submissions): 90, 12; 80 89, 11; 70-79,

More information

Midterm Exam 2 CS 341: Foundations of Computer Science II Fall 2018, face-to-face day section Prof. Marvin K. Nakayama

Midterm Exam 2 CS 341: Foundations of Computer Science II Fall 2018, face-to-face day section Prof. Marvin K. Nakayama Midterm Exam 2 CS 341: Foundations of Computer Science II Fall 2018, face-to-face day section Prof. Marvin K. Nakayama Print family (or last) name: Print given (or first) name: I have read and understand

More information

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

Lecture 23 : Nondeterministic Finite Automata DRAFT Connection between Regular Expressions and Finite Automata CS/Math 24: Introduction to Discrete Mathematics 4/2/2 Lecture 23 : Nondeterministic Finite Automata Instructor: Dieter van Melkebeek Scribe: Dalibor Zelený DRAFT Last time we designed finite state automata

More information

Context-free grammars and languages

Context-free grammars and languages Context-free grammars and languages The next class of languages we will study in the course is the class of context-free languages. They are defined by the notion of a context-free grammar, or a CFG for

More information

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

Proofs, Strings, and Finite Automata. CS154 Chris Pollett Feb 5, 2007. Proofs, Strings, and Finite Automata CS154 Chris Pollett Feb 5, 2007. Outline Proofs and Proof Strategies Strings Finding proofs Example: For every graph G, the sum of the degrees of all the nodes in G

More information

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

Automata Theory. Lecture on Discussion Course of CS120. Runzhe SJTU ACM CLASS Automata Theory Lecture on Discussion Course of CS2 This Lecture is about Mathematical Models of Computation. Why Should I Care? - Ways of thinking. - Theory can drive practice. - Don t be an Instrumentalist.

More information

Notes on State Minimization

Notes on State Minimization U.C. Berkeley CS172: Automata, Computability and Complexity Handout 1 Professor Luca Trevisan 2/3/2015 Notes on State Minimization These notes present a technique to prove a lower bound on the number of

More information

Lecture Notes On THEORY OF COMPUTATION MODULE -1 UNIT - 2

Lecture Notes On THEORY OF COMPUTATION MODULE -1 UNIT - 2 BIJU PATNAIK UNIVERSITY OF TECHNOLOGY, ODISHA Lecture Notes On THEORY OF COMPUTATION MODULE -1 UNIT - 2 Prepared by, Dr. Subhendu Kumar Rath, BPUT, Odisha. UNIT 2 Structure NON-DETERMINISTIC FINITE AUTOMATA

More information

Introduction to the Theory of Computing

Introduction to the Theory of Computing Introduction to the Theory of Computing Lecture notes for CS 360 John Watrous School of Computer Science and Institute for Quantum Computing University of Waterloo June 27, 2017 This work is licensed under

More information

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

HKN CS/ECE 374 Midterm 1 Review. Nathan Bleier and Mahir Morshed HKN CS/ECE 374 Midterm 1 Review Nathan Bleier and Mahir Morshed For the most part, all about strings! String induction (to some extent) Regular languages Regular expressions (regexps) Deterministic finite

More information

Deterministic Finite Automata

Deterministic Finite Automata Deterministic Finite Automata COMP2600 Formal Methods for Software Engineering Ranald Clouston Australian National University Semester 2, 2013 COMP 2600 Deterministic Finite Automata 1 Pop quiz What is

More information

Finite Automata. Finite Automata

Finite Automata. Finite Automata Finite Automata Finite Automata Formal Specification of Languages Generators Grammars Context-free Regular Regular Expressions Recognizers Parsers, Push-down Automata Context Free Grammar Finite State

More information

False. They are the same language.

False. They are the same language. CS 3100 Models of Computation Fall 2010 Notes 8, Posted online: September 16, 2010 These problems will be helpful for Midterm-1. More solutions will be worked out. The midterm exam itself won t be this

More information

Finite-state machines (FSMs)

Finite-state machines (FSMs) Finite-state machines (FSMs) Dr. C. Constantinides Department of Computer Science and Software Engineering Concordia University Montreal, Canada January 10, 2017 1/19 Finite-state machines (FSMs) and state

More information

Deterministic Finite Automata (DFAs)

Deterministic Finite Automata (DFAs) Algorithms & Models of Computation CS/ECE 374, Fall 27 Deterministic Finite Automata (DFAs) Lecture 3 Tuesday, September 5, 27 Sariel Har-Peled (UIUC) CS374 Fall 27 / 36 Part I DFA Introduction Sariel

More information

Announcements. Problem Set 6 due next Monday, February 25, at 12:50PM. Midterm graded, will be returned at end of lecture.

Announcements. Problem Set 6 due next Monday, February 25, at 12:50PM. Midterm graded, will be returned at end of lecture. Turing Machines Hello Hello Condensed Slide Slide Readers! Readers! This This lecture lecture is is almost almost entirely entirely animations that that show show how how each each Turing Turing machine

More information

Before we show how languages can be proven not regular, first, how would we show a language is regular?

Before we show how languages can be proven not regular, first, how would we show a language is regular? CS35 Proving Languages not to be Regular Before we show how languages can be proven not regular, first, how would we show a language is regular? Although regular languages and automata are quite powerful

More information

CPSC 421: Tutorial #1

CPSC 421: Tutorial #1 CPSC 421: Tutorial #1 October 14, 2016 Set Theory. 1. Let A be an arbitrary set, and let B = {x A : x / x}. That is, B contains all sets in A that do not contain themselves: For all y, ( ) y B if and only

More information

GEETANJALI INSTITUTE OF TECHNICAL STUDIES, UDAIPUR I

GEETANJALI INSTITUTE OF TECHNICAL STUDIES, UDAIPUR I GEETANJALI INSTITUTE OF TECHNICAL STUDIES, UDAIPUR I Internal Examination 2017-18 B.Tech III Year VI Semester Sub: Theory of Computation (6CS3A) Time: 1 Hour 30 min. Max Marks: 40 Note: Attempt all three

More information

Undecidability and Rice s Theorem. Lecture 26, December 3 CS 374, Fall 2015

Undecidability and Rice s Theorem. Lecture 26, December 3 CS 374, Fall 2015 Undecidability and Rice s Theorem Lecture 26, December 3 CS 374, Fall 2015 UNDECIDABLE EXP NP P R E RECURSIVE Recap: Universal TM U We saw a TM U such that L(U) = { (z,w) M z accepts w} Thus, U is a stored-program

More information

What we have done so far

What we have done so far What we have done so far DFAs and regular languages NFAs and their equivalence to DFAs Regular expressions. Regular expressions capture exactly regular languages: Construct a NFA from a regular expression.

More information

NP-Completeness Part II

NP-Completeness Part II NP-Completeness Part II Outline for Today Recap from Last Time What is NP-completeness again, anyway? 3SAT A simple, canonical NP-complete problem. Independent Sets Discovering a new NP-complete problem.

More information

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

CSE 105 Homework 1 Due: Monday October 9, Instructions. should be on each page of the submission. CSE 5 Homework Due: Monday October 9, 7 Instructions Upload a single file to Gradescope for each group. should be on each page of the submission. All group members names and PIDs Your assignments in this

More information

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

CSE 311: Foundations of Computing. Lecture 23: Finite State Machine Minimization & NFAs CSE : Foundations of Computing Lecture : Finite State Machine Minimization & NFAs State Minimization Many different FSMs (DFAs) for the same problem Take a given FSM and try to reduce its state set by

More information

Turing Machines Part Three

Turing Machines Part Three Turing Machines Part Three What problems can we solve with a computer? What kind of computer? Very Important Terminology Let M be a Turing machine. M accepts a string w if it enters an accept state when

More information

CSE 105 Theory of Computation Professor Jeanne Ferrante

CSE 105 Theory of Computation   Professor Jeanne Ferrante CSE 105 Theory of Computation http://www.jflap.org/jflaptmp/ Professor Jeanne Ferrante 1 Announcement & Reminders HW 2: Grades not available yet, will be soon Solutions posted, read even if you did well

More information

Nondeterministic Finite Automata

Nondeterministic Finite Automata Nondeterministic Finite Automata Not A DFA Does not have exactly one transition from every state on every symbol: Two transitions from q 0 on a No transition from q 1 (on either a or b) Though not a DFA,

More information

CS103 Handout 47 Spring 2018 Practice CS103 Final Exam V

CS103 Handout 47 Spring 2018 Practice CS103 Final Exam V CS103 Handout 47 Spring 2018 Practice CS103 Final Exam V We strongly recommend that you work through this exam under realistic conditions rather than just flipping through the problems and seeing what

More information

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska LECTURE 6 CHAPTER 2 FINITE AUTOMATA 2. Nondeterministic Finite Automata NFA 3. Finite Automata and Regular Expressions 4. Languages

More information