r2 From999
r2 From999
Welcome
Answer all 5 questions. Repeated attempts are permitted.
Week 1: Finite 5/5 points (graded)
Automata Question 1: Which of the following strings is NOT in the Kleene closure of the
language {011, 10, 110}?
Week 2: Regular
Expressions and 01111010
Properties of
Regular 11001110
Languages
5. Regular
expressions (38 10110011
min.)
6. Regular
expressions in the
real world (17 min.)
The next two questions are based on the following finite automaton:
Regular-Expression
Homework
RE-Homework
7. Decision
algorithms for
regular languages
(41 min.)
8. Closure
properties of regular Question 2: This DFA accepts a certain language L. In this problem we shall
languages (20 min.) consider certain other languages that are defined by their tails, that is, languages
of the form (0+1)*w, for some particular string w of 0's and 1's. Call this language
Properties-of-
Regular-Languages L(w). Depending on w, L(w) may be contained in L, disjoint from L, or neither
Homework contained nor disjoint from L (i.e., some strings of the form xw are in L and others
RL-Homework are not).
Challenge Problems
2 Your problem is to find a way to classify w into one of these three cases. Then, use
your knowledge to classify the following languages:
Problem Session 2
(Video)
1. L(1111001), i.e., the language of regular expression (0+1)*1111001.
https://lagunita.stanford.edu/courses/course-v1:ComputerScience+Automata+SelfPaced/courseware/b9162be11c7b4c61a573a… 1/3
27/10/2018 The Homework | Regular-Expression Homework | Automata - SELF PACED Courseware | Stanford Lagunita
4. LBB = the set of path labels that go from B to B without passing through C
or D.
Then, identify a correct regular expression from the list below. Note: there are
several di erent regular expressions possible for each of these languages.
However, each of the correct answers can be thought of as built from more
limited components. For example, the regular expression 1 is the set of path
labels that go from A to B without passing through any of the four states.
LAA = (0+1(10)*0)*
LAB = 0*1(01+10)*
LBB = (00*1)*
LAB = (0+10+01)*1
https://lagunita.stanford.edu/courses/course-v1:ComputerScience+Automata+SelfPaced/courseware/b9162be11c7b4c61a573a… 2/3
27/10/2018 The Homework | Regular-Expression Homework | Automata - SELF PACED Courseware | Stanford Lagunita
Question 4: Identify from the list below the regular expression that generates all
and only the strings over alphabet {0,1} that end in 1.
(0*1+)+
(0+1)+1
1*0*1
(0*+1)*
Answer
Correct:
This choice is correct. 0*1+ generates strings of one or more 1's preceded by zero
or more 0's. Any string that ends in 1 can be broken into one or more groups of
that type.
Question 5: Apply the construction given in the video lectures to convert the
regular expression (0+1)*(0+ε) to an epsilon-NFA. Then, identify the true
statement about your epsilon-NFA from the list below:
https://lagunita.stanford.edu/courses/course-v1:ComputerScience+Automata+SelfPaced/courseware/b9162be11c7b4c61a573a… 3/3