4003-380-03: Homework, Reading and Slides
Week 1
-
Tuesday, Sep 8
- Covered in class: Course logistics.
- Covered in class: Section 1.5.
- Slides for this week: pdf, ppt
- Next class: Discrete math quiz, September 10, 10-10:30am. There will be two problems. First, a basic discrete math reading,
writing, reasoning question. Second, a proof by mathematical induction (the simplest form of mathematical induction,
there will be no structural induction (Section 2.5) on the discrete math quiz). Feel free to download a
sample quiz. I recommend to use our
tutoring center for help.
-
Thursday, Sep 10
- In class: Discrete math quiz (30 min).
- Covered in class: Section 2.4, updated slides are uploaded (see link above).
- A note for students with disabilities:
RIT is committed to providing reasonable accommodations to students with disabilities.
If you would like to request accommodations such as special seating, testing modifications,
or note taking services due to a disability, please contact the Disability Services Office.
It is located in the Eastman Building, Room 2342; the Web site is www.rit.edu/dso.
After you receive accommodation approval, it is imperative that you see me during office hours
so that we can work out whatever arrangement is necessary.
Homework 1, due 9/18 4pm: (Note: you only have to explain your answer if this is stated in the question.)
- Exercise 1.47. For each of the four parts, do the following:
- State whether or not the first language is always a subset of the second language.
- State whether or not the second language is always a subset of the first language.
- For every "no" answer, give a counterexample. You do not have to give reasons for your "yes" answers.
- Exercise 1.62(d). Simplify your answer as much as possible.
- Exercise 2.39(a) and (e). Your non-recursive definitions should be as simple as possible.
Regular expressions as answers are not allowed.
- Exercise 2.40(e).
- Let &Sigma = {a,b}. Give a recursive definition of function f on &Sigma* such that for all strings x over &Sigma,
f(x) is the number of a's in x minus the number of b's in x. (Look at Example 2.24 to see how
to recursively define such functions.)
- Let L be the language defined in Exercise 2.39 (b). Prove,
using structural induction on L, that every string in L contains exactly one a.
Before you start working on the homework, please read the rules on collaboration in the
syllabus.
Also keep in mind that, as stated in the syllabus, I will stop answering homework questions at 10am the day it is due.
Week 2
-
Tuesday, Sep 15
- Covered in class: Section 2.5, started Section 3.1.
- Slides for week 2 are available: pdf,
ppt
-
Thursday, Sep 17
- Covered in class: Section 3.1
- Note: I intended to start Section 3.2 but we did not get that far. To speed things up a little,
I am assigning some finite-automata-drawing questions in the homework. Please read Section 3.2,
it contains several examples of finite automata (see Figure 3.1), along with explanations of
how the automata work.
- Homework 2, due 9/25 4:00pm: Download the pdf.
(Note: you only have to explain your answer if this is stated in the question.)
Week 3
- Slides for this week: pdf,
ppt
-
Tuesday, Sep 22
- Covered in class: Sections 3.2, 3.3, and 3.5 (slides above have been updated).
- Think about the problem on slide 15 (give an FA for the union of two languages accepted by FA's).
-
Thursday, Sep 24
- Covered in class: Section 4.1. Think about a formal description
of the NFA to DFA construction.
- Homework 3, due 10/02 4:00pm. (Note: you only have to explain your answer if this is stated
in the question.)
- Exercise 3.8(c).
- Exercise 3.33(e). You must use the cartesian product construction (see Section 3.5).
You have to draw only the states reachable from the initial state,
but do not otherwise simplify your FA. Label each state with the
pair of states it corresponds to.
- Use the closure properties of regular languages to show that { aibj | i≠j } is not regular.
Hint: Recall that in class we stated that a certain language is not regular. Using non-regularity of that language
(you do not need to prove that the language from class is non-regular), show that the above language must be non-regular as well.
- Exercise 4.10(g). You have to draw only states that are reachable from the initial state (as in Example 4.3).
- Exercise 4.11.
- Exercise 4.44(a).
- Exercise 3.47. For the second part, you should give the formal
(quintuple) definition of machine Mn that accepts Ln.
Week 4
- Slides for this week: pdf,
ppt
-
Tuesday, Sep 29
- Covered in class: formal statement of the subset construction (end of Section 4.1), NFA-Lambdas (Section 4.2).
- Covered in class: solutions of hw1, we will continue discussing homework solutions on Thursday.
-
Thursday, Oct 1
- Covered in class: solutions of remaining Hw 1 problems, and Problem 1 on Hw2. I e-mailed you
the solution of Problem 3 on Hw 2, as well as a hint for Problem 3 on Hw3.
- Covered in class: Pumping Lemma (Section 5.3), we will come back to Sections 5.1 and 5.2 next week or in week 6.
- Next week: midterm. All relevant information can be found at the midterm website.
- No homework due next week.
Week 5
-
Tuesday, Oct 6
- Covered in class: more pumping lemma examples, Kleene's Theorem (Section 4.3) - I've updated the slides with the
construction we had on the whiteboard
- Handouts: solutions of quizzes 2 and 3 (I handed out the empty quizzes last Thursday). Quiz 4 was not xeroxed properly, imagine a picture of a three state NFA in the first part of the quiz.
Ask during the office hours or in the tutoring center if you have problems with the solutions of quiz 4.
- Covered in class: solution of Hw3, problem 3. Most likely we will not have the time to go over the solutions
of other problems in class, come to the office hours or the tutoring center to discuss them.
- Check your mailfolders for graded materials from earlier weeks, graded Hw3 should appear there on Wednesday.
- Next class: midterm. Curtis will hold review sessions on Tue Oct 6, 2pm, in 07-1440 (notice, this is 07, not 70!!!),
and on Wed Oct 7, 8pm, in the tutoring center (or possibly in one of the lecture rooms on the third floor in
building 70, if the tutoring center is empty, follow the directions on the whiteboard).
-
Thursday, Oct 8
- Homework 4, due 10/16 4:00pm:
(Note: you only have to explain your answer if this is stated
in the question.)
- Exercise 4.17.
You do not have to show your calculations.
-
Use the construction from the proof of Kleene's Theorem
to construct an NFA-&Lambda for the following
regular expression: (01 + 101*)*(0 + (10)*).
It suffices to draw the transition diagram of the final
NFA-&Lambda . Apply the construction literally, and do not
simplify.
-
Exercise 4.28(d). It suffices to give the transition diagram
of the NFA. Apply the NFA-&Lambda to NFA construction
literally, and do not simplify.
-
Exercise 4.26 (b). As your answer, you should give the 5-tuple definition
of M2.
- Exercise 4.33. Remark: The exercise talks about the "radio box" construction we did in class, and the automaton
Mc refers to the NFA-&Lambda we get from applying the concatenation part of the construction. See Figure 4.13 on page 147.
- Use the pumping lemma to show that {aibk |
2k &le i &le 3k} is not regular.
-
Exercise 5.26. It suffices to state TRUE/FALSE, you do not have to explain your answers or provide counterexamples.
(Though constructing a counterexample for a FALSE answer is certainly a good idea.)
Week 6
-
Tuesday, Oct 13
- Covered in class: Kleene's Thm, started distinguishability
-
Thursday, Oct 15
- Covered in class: Myhill-Nerode Thm, minimization of FA
- Covered in class: midterm solutions
-
Homework 5, due 10/23 4pm:
(Note: you only have to explain your answer if this is stated
in the question.)
Go through the examples in Section 6.1 before you start working on the last three problems.
-
Minimize the FA from Exercise 5.16(h).
You must apply Algorithm 5.1. Your answer should be of the
form of Figure 5.4, i.e., both the table and the FA.
-
A long, but very beautiful question.
-
Give an example of a 2-state NFA M such that
the minimal FA for L(M) has four states.
For your answer, you should give the transition diagrams
of the NFA and the FA, and
you should briefly explain why your FA accepts L(M)
and why your FA is minimal.
- How many equivalence classes does IL(M) have?
Briefly explain your answer.
- Describe each equivalence class of IL(M).
-
Does there exist a 2-state NFA M such that
the minimal FA for L(M) has five states? If so, give an example
at the same level of detail as in part 1. If not, explain why not.
- Exercise 6.1 (g) and (h).
- Exercise 6.9 (b), (d), (e), and (h).
- Find a CFL for the syntax of a programming language of your choice.
It's ok to print it from the web or copy it from a book, as long as you give a
citation to the source. In addition, explain the notation used in "your" CFL.
Make sure it is clear which programming language you are doing.
Week 7
- Slides for this week: pdf,
ppt
- Slides for this week: pdf,
ppt
-
Tuesday, Oct 20
- Covered in class: Chapter 6 (the projector was not working so we were doing everything on the board -
I tried to copy the most important points on the slides but please realize that the slides might be incompelte;
check your notes to see all the covered material)
- Discussed solutions of the "radio-box" problem on the Hw.
-
Thursday, Oct 22
- Covered in class: finished Chapter 6, started Chapter 7
-
Homework, due 10/30 4pm:
(Note: you only have to explain your answer if this is stated
in the question.)
- Exercise 6.26 (b) and (d).
- Exercise 7.2. You only have to do this for input aabab.
Is aabab accepted by the PDA? Briefly explain your answer.
- Recall that a deterministic PDA (DPDA) is a PDA that, for any input, has at most one computation path. (In other words, for any state and any input symbol and top of the stack symbol, there is at most one state the automaton can move to.)
Draw the transition diagram of a DPDA for the language
{xcy | x, y in {a,b}*, |x| = |y| and x != yr}.
Add a brief explanation to help me understand how your DPDA works.
- Explain how you would change your DPDA from the previous question
to obtain a PDA for the language of all non-palindromes over {a,b}.
Explain why your PDA is not a DPDA. Explain briefly and informally
why the language of all non-palindromes over {a,b} is not a DCFL, i.e. why there is no DPDA for the language.
- Exercise 7.18 (a). Draw the transition diagram of
a deterministic counter automaton for this language.
Add a brief explanation to help me understand how your deterministic
counter automaton works.
- Exercise 8.5. You do not have to prove your answers; a
simple yes or no suffices.
Week 8
- Slides for this week: pdf,
ppt
- Slides for Thursday: pdf,
ppt
-
Tuesday, Oct 27
- Covered in class: finished Chapter 7, started Section 8.1
-
Thursday, Oct 29
- In class: handed out practice quiz 5.
- Covered in class: Sections 8.1 and 8.2
-
Homework, due 11/6 4pm:
(Note: you only have to explain your answer if this is stated
in the question. The last two problems are about Turing machines - feel free to read ahead in the book.)
- Prove that the language {ai | i is a square} is not a CFL.
- Give an explicit example that shows that the DCFLs are not
closed under intersection.
- Exercise 8.19 (e).
You may use the fact that DCFLs are closed under complement
(see page 310/311) and you may use the fact that DCFLs are not closed
under intersection (as you have shown in the previous question).
- For L a language, define Lr as follows:
Lr = {xr | x is in L}.
Show that if L is a CFL, then Lr is a CFL, by
doing one of the following (note: one is much easier
than the other!):
- For G a CFG (given as a 4-tuple),
give the 4-tuple definition of CFG Gr such that
L(G)r = L(Gr) and briefly explain why
L(G)r = L(Gr).
- For M a PDA (given as a 7-tuple),
give the 7-tuple definition of PDA Mr such that
L(M)r = L(Mr) and briefly explain why
L(M)r = L(Mr).
- Look at Exercise 5.26 on page 195. Replace every occurrence
of the word "regular" by "context-free" and replace every occurrence
of "nonregular" by "not context-free." Now answer questions
(a)-(i). You do not have to prove your answers; a simple "true"
or "false" suffices.
- Draw the simplified transition diagram of a Turing Machine
that accepts the language { ai | a is a power of 2}.
Your Turing machine should never go into an infinite
loop. Also give a short explanation of your TM, so that I can understand it.
- Exercise 9.35. The encoding can be found in Section 9.6.
Week 9
- Slides for this week: pdf,
ppt
-
Tuesday, Nov 3
- Covered in class: started Chapter 9
-
Thursday, Nov 5
- Covered in class: finished Chapter 9, briefly discussed closure properties of RE, Rec
- We will most probably not have much time to discuss in detail the Chomsky Hierarchy. Please read the slides.
- Covered in class: solutions of selected problems from Homework 7.
-
Homework 8, due 11/13 4pm:
(Note: you only have to explain your answer if this is stated
in the question.)
-
Exercise 9.51. Draw a transition diagram.
Explain the notation that you used for the transition diagram and
give an explanation of your Post machine, so that I can understand it.
Note: Post machines don't have a separate input tape, just a queue.
- What languages can be accepted by a Post machine that
halts on all inputs? (Read Exercise 9.52 to find out!)
-
Read through the slides on the Chomsky hierarchy, you might also find Professor Hemaspaandra's notes useful.
The following grammar generates
the language {ai | i is a power of 2 greater than 1}.
- S -> ACaB
- Ca -> aaC
- CB -> DB
- CB -> E
- aD -> Da
- AD -> AC
- aE -> Ea
- AE -> &Lambda
Give a derivation of aaaaaaaa.
-
Show that the following decision problem is decidable:
Given a CFG G, is L(G) a subset of 1*? In other words, give an algorithm that, for a given CFG G, returns YES if L(G) is a subset of 1*, otherwise it returns NO.
Note: You may use
the fact that the emtpyness problem for CFGs is decidable and
other constructions/results from the book.
-
Consider the following problem ALLCFG: Given a CFG G, is
L(G) = &Sigma*? This problem is undecidable (you don't
have to prove this).
- Is this problem in RE, in coRE (the class of all languages whose
complement is in RE), in both, or
in neither? Explain your answer.
-
Use the undecidability of ALLCFG to show that
the following problem is
also undecidable:
Given a PDA M1 and an FA M2,
is L(M1) = L(M2)?
Week 10
- Slides for this week: pdf,
ppt
- Slides for Thursday: pdf,
ppt
-
Tuesday, Nov 10
- Covered in class: Decidability (slides have been updated)
- The information about the final exam has been posted.
-
Thursday, Nov 12
- Covered in class: revisited Post's correspondence problem, Complexity
- Remark: my laptop's battery ran out shortly after our Thursday class and I lost the
annotations on the slides. I tried to reconstruct them best I could but there will likely be minor discrepancies
compared to what we wrote in class.
- Good luck with your finals!