Schedule

Week Tuesday Thursday
Week 1 (09/02-09/06) 1, 2 3
Week 2 (09/09-09/13) 4.1-4.3 4.4-4.5
Week 3 (09/16-09/20) 5.1 5.1
Week 4 (09/23-09/27) 5.2 5.3-5.7, Coding
Week 5 (09/30-10/04) Midterm 1 6.1, 6.2
Week 6 (10/07-10/11) 7 7
Week 7 (10/14-10/18) Break 7
Week 8 (10/21-10/25) 8 8
Week 9 (10/28-11/01) 9 9
Week 10 (11/04-11/08) 9 Midterm 2
Week 11 (11/11-11/15) CFGs CFGs
Week 12 (11/18-11/22) CFGs PDAs
Week 13 (11/23-11/29) PDAs Thanksgiving
Week 14 (12/02-12/06) Review Review

Week 1 (09/03-9/07)

Day 1

Goals
Chapter 1
Activity 1
Chapter 2
Activity 2
Activity 2b
Write a SISO program that will take as input a string that represents two integers (based on some convention you establish for how to do that) and will return the string that represents the sum of those integers.

Day 2

Goals
Chapter 3
Activity 3
HW 1 (Due 9/12 4pm in LYN 110)
3.2, 3.10, 3.11

Week 2 (09/10-09/14)

Day 1

Goals
Chapter 3 recap
Section 4.1
Activity 4

Day 2

Goals
Review
Sections 4.2-4.4
Practice
HW 2 (Due 9/19 4pm in LYN 110)
4.12, 4.19, 4.20, 4.25a,b, Bonus problems: 4.25c, 4.26

Week 3 (09/17-09/21)

Day 1

Goals
Section 4.5
Activity 5

Day 2

Goals
Section 5.1
Activity 6
Homework 3 (Due 9/28 4pm in LYN 110)

Week 4 (09/24-09/28)

Day 1

Goals
Section 5.2

Day 2

Goals
Section 5.2
Activity 7
Sections 5.3-5.7
Activity 8
Activity 8 writeup
Homework 4 (Due 10/05 4pm in LYN 110)

Week 5 (10/01-10/05)

Day 1

Day 2

Goals
Sections 6.1, 6.4, 6.5 (6.3 optional)
Activity 9
Homework 5
(Due 10/11 4pm in LYN 110) 6.3, 6.7, 6.9 (make sure to actually write a Python program for it)

Week 6 (10/08-10/12)

Day 1

Goals
Sections 7.1, 7.2, 7.3
Activity 10

Day 2

Sections 7.4, 7.5
Homework 6
(Due 10/24 11am in LYN 110) 7.3, 7.5b,c,e (using the “explicit Python program” technique 2 from p. 138), 7.7

Week 7 (10/15-10/19)

Day 1

Day 2

Section 7.5
Section 7.6

Week 8 (10/22-10/26)

Day 1

Sections 8.1, 8.2, 8.3

Day 2

Leftover
Sections 8.4, 8.5
Sections 8.6, 8.7, 8.8
Homework 7
(Due 10/30 4pm in LYN 110) 8.4, 8.7, 8.8, 8.9

Week 9 (10/29-11/02)

Day 1

Homework review
Chapter 8 wrap-up
Sections 9.1, 9.2
Section 9.3
Homework 8
(Due 11/06 4pm in LYN 110): 9.3, 9.7a, 9.8, 9.9

Day 2

Section 9.3 Wrap-up
Section 9.4

Week 10 (11/05-11/09)

Day 1

Sections 9.5-9.7

Day 2

Week 11 (11/12-11/16)

Day 1

Sections 9.6-9.7 wrap-up
CFG notes 5.1
Homework 9
(Due 11/20 4pm in LYN 110): 9.12, 9.13, 9.17a,b,f,g

Day 2

CFG notes 5.1, 5.2 (5.2.1-5.2.3)
Homework 10
(Due 11/28 4pm) CFG Notes (page 168) 5.1.1a,b,c, 5.1.2, 5.2.1

Week 12 (11/19-11/23)

Day 1

CFG wrap-up
Pushdown Automata (Notes)
Homework 11

(Due Tue 12/4 4pm in LYN110)

  1. Work out a PDA for the language that consists of all palindromes on the alphabet \(\{a,b,c\}\). Show the computation for accepting the string abcba.
  2. Work out a PDA for the language that consists of all strings of matched parentheses (e.g. (()(()()))).
  3. Write the PDA for the grammar on the alphabet { i, e } with rules S-> epsilon | SS | iS | iSe. Follow the standard algorithm for determining the PDA of a CFG, and not some other way. Write out the complete PDA diagram, including the expanded form of the “loops” corresponding to production rules.

Day 2

PDAs
The PDA(s) corresponding to a CFG
Parsing

Week 13 (11/26-11/30)

Day 1

Homework 12

(Not to turn in)

We define the language of “L-values” as follows:

Here is an example string that this grammar should be able to generate: v[v[i][v]].

  1. Write a CFG for this language, using the above descriptions to write the corresponding rules. Use L for the start variable, and I for the index variable. You will need 4 production rules.
  2. Compute the first sets for this grammar.
  3. Compute the item-sets for the LR(1) parser for this grammar, and show the rightmost derivation, stack and input progress and parse tree for the string v[v[i][v]].
  4. Explain clearly why this grammar cannot have a corresponding unambiguous LL(1) parser.
  5. Rewrite the grammar to eliminate the left-recursive rule. You will need one new variable, X, and 6 production rules total.
  6. Demonstrate the leftmost derivation of the string v[v[i][v]] in this grammar.
  7. Compute first and follow sets for this new grammar, and construct an LL(1) parser for it.
  8. Show the stack and input progress in the LL(1) parser for the string v[v[i][v]] and this new grammar.

Day 2

Week 14 (12/03-12/07)

Day 1

Day 2