CSC 341  Grinnell College  Spring, 2009 
Automata, Formal Languages, and Computational Complexity  
Quick Links: January February March April May 
The accompanying table indicates assignments and due dates for Computer Science 341 and are subject to the following notes.
Unless otherwise indicated, textbook references are to Michael Sipser, Introduction to the Theory of Computation, Second Edition, Thomson/Course Technology, 2006, ISBN: 13: 9760534950972 and 10: 0534950973.
Supplemental problems are stated later on this page.
Unless otherwise stated, collaboration IS allowed on problems from the text, but collaboration IS NOT allowed on assignments from the supplemental problems.
Due Date  Collaboration  Chapter  Problems 

Mon., Jan. 26  0.4, 0.7, 0.9, 0.11  
Supp. Prob. 1, 2  
Mon., Feb. 2  1.4ceg, 1,6degm 1,6bil, 1.7bc  
Supp. Prob. 3  
Mon, Feb. 9  Hour Test 1  Covers Chapters 0, 1  
Wed., Feb. 18  1.21 ab, 1.30, 1.53  
Fri., Feb. 20  2.4bc, 2.14, 2.26, 2.31  
Supp. Prob. 4  
Fri., Feb. 27  3.6, 3.8b 3.13 (give brief justification)  
Supp. Prob. 5, 6  
Wed, Mar. 4  Hour Test 2  Covers pp. 1159 (Sections 0.14.1)  
Fri., Apr. 3  encouraged)  Choose any 3 problems from 4.10, 4.12, 4.15, 4.16, 4.19, 4.26  
Fri., Apr. 17  encouraged)  5.3, do two of 5.125.15  
Mon., Apr. 20  encouraged)  Choose any 4 problems from 4.10, 4.12, 4.15, 4.16, 4.19, 4.26  
Wed., Apr. 22  5.4, 5.9, 5.17  
Fri., Apr. 24  encouraged)  5.19, do three of 5.215.24, 5.29, 5.34  
Mon, Apr. 27  Hour Test 3  Covers Chapters 15, 7  
May  
Due Date  Collaboration  Chapter  Problems 
Definition: The height of a nonempty tree is defined as the number of nodes on the longest path from a leaf of a tree to its root, the height of an empty tree is defined to be 0.
Nodes in a Binary Tree: Suppose a binary tree T has height h. Prove that T contains at least h nodes and at most 2^{h}  1 nodes.
Comments in Java: Java allows two types of comments:
For the purposes of this problem, suppose all characters within a Java program are from the set {/, *, a, b, N}, where N represents the endofline character. (In a real Java program, of course, the characters a, b would be extended to all letters, digits, punctuation, etc., but that seems too extensive for this exercise.)
Balanced Parentheses: Let B be the set of strings over the alphabet {a, b, (, ), [, ]}, in which the parentheses and brackets are balanced and appropriately nested. For example, (([ab])) is in B, since there are the same number of left and right parentheses, the same number of left and right brackets, and each left parenthesis or bracket is closed by the corresponding type of parenthesis or bracket. As another example, ([][]()) is in B. However, neither ][ nor (([))] are in B. Note that adding characters a or b anywhere within a string would not affect the balance.
Turing Machine for 2 a's: Design a Turing machine that accepts exactly those strings that contain two consecutive a's. Write out your machine in full, both using a complete transition table and using a state diagram.
Consider the input alphabet for this problem to be {a, b}.
Turing Machine for Palindromes: Design a Turing machine that reads a string s and returns the string ss^{R}, where s^{R} is the reverse of the string s. For example, given the string "abbaa", the Turing machine should halt after "abbaaaabba" is printed on the tape. As in Supplemental Problem 5, write out your machine in full, both using a complete transition table and using a state diagram, and consider the input alphabet to be {a, b}.
This document is available on the World Wide Web as
http://www.walker.cs.grinnell.edu/courses/341.sp09/assignments.shtml
created 5 January 1999 last revised 13 April 2009 

For more information, please contact Henry M. Walker at walker@cs.grinnell.edu. 