0% found this document useful (0 votes)
22 views

r2 From999

Uploaded by

HRITHIK SAWHNEY
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views

r2 From999

Uploaded by

HRITHIK SAWHNEY
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

27/10/2018 The Homework | Regular-Expression Homework | Automata - SELF PACED Courseware | Stanford Lagunita

ComputerScience: Automata - SELF PACED Automata Theory

Week 2: Regular Expressions and Properties of Regular Languages > Regular-Expression


 Homework > The Homework
Bookmarks
 Bookmark this page

 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

Materials for Week 2 10111011 

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.

2. L(11011), i.e., the language of regular expression (0+1)*11011.


 Week 3: Context-
Free Grammars 3. L(110101), i.e., the language of regular expression (0+1)*110101.

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

and Pushdown 4. L(00011101), i.e., the language of regular expression (0+1)*00011101.


Automata

L(00011101) is disjoint from L.


 Week 4:
Pushdown
L(00011101) is neither disjoint from L nor contained in L.
Automata and
Properties of
Context-Free L(00011101) is contained in L. 
Languages
L(110101) is disjoint from L.
 Week 5: Turing
Machines and
Undecidability
Question 3: Converting a DFA such as the one above to a regular expression
requires us to develop regular expressions for limited sets of paths --- those that
 Week 6: take the automaton from one particular state to another particular state, without
Intractable passing through some set of states. For the automaton above, determine the
Problems and languages for the following limitations:
NP-
completeness 1. LAA = the set of path labels that go from A to A without passing through C
or D.
 The Final Exam 2. LAB = the set of path labels that go from A to B without passing through C
or D.
 Finishing Up 3. LBA = the set of path labels that go from B to A without passing through C
or D.

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:

There are 17 arcs labeled ε.

There are 7 states.

There are 14 arcs labeled ε. 

There are 16 states.

Submit You have used 1 of 5 attempts

© All Rights Reserved

https://lagunita.stanford.edu/courses/course-v1:ComputerScience+Automata+SelfPaced/courseware/b9162be11c7b4c61a573a… 3/3

You might also like