Computer Science 423/523
Finite Automata
Fall 2005
Weizhen Mao
Department of Computer Science
College of William and Mary
General Information |
Schedules |
Announcements |
Lectures |
Assignments |
Exams
Assignments
Homework 11 (Out 11/18 and due 12/02):
- (10 points) Exercise 5.1 on page 211.
- (10 points) Problem 5.12 on page 211. (Hint: Reduction from $A_{TM}$.)
- (10 points) Prove that $ES_{TM}=\{|TM M accepts the empty string\}$ is
undecidable.
- (10 points) Problem 5.17 on page 212.
Homework 10 (Out 11/11 and due 11/18):
- (10 points) Exercise 4.7 on page 183.
- (10 points) Problem 4.19 on page 184.
- (10 points) Prove that $A=\{w_{2i}|w_{2i}\not\in L(M_i)\}$ is not
Turing-recognizable, where $w_{2i}$ is the $2i$th string in the lexicographic
order of binary strings and $M_i$ is the TM whose binary code is $w_i$.
- (10 points) In class, we learned that $A_D$ is non-TR, $A_{TM}$ and
$HALT_{TM}$ are TR but non-TD. What can you say about their complements?
Are they non-TR, TR but non-TD, or TD? Justify your answers.
Homework 9 (Out 11/02 and due 11/11):
- (10 points) Problem 3.15 (b), (c) and (e) on page 161.
- (10 points) Problem 3.16 (b), (c) and (d) on page 161.
- (10 points) Exercise 4.3 on page 183.
- (10 points) Exercise 4.6 on page 183.
Homework 8 (Out 10/26 and due 11/02):
- (10 points) Problem 2.35 on page 131. (Hint: Use the result in
Problem 2.26 and the lemma used in the proof of the pumping lemma for CFLs.)
- (10 points) Problem 2.42 on page 131. (Hint: s=1^{p+1}#1^{p+2}#...#1^{3p}.)
- (10 points) Exercise 3.1 (d) on page 159.
- (10 points) Exercise 3.8 (b) on page 160.
Homework 7 (Out 10/19 and due 10/26):
- (10 points) Problem 2.24 on page 130.
- (20 points) Problem 2.30 (a) and (d) on page 131.
- (10 points) Problem 2.32 on page 131. (Hint: The following selection
of s won't work: s=1^p2^p3^p4^p. Try other block orders.)
Homework 6 (Out 10/12 and due 10/19):
- (10 points) Exercise 2.10 on page 129.
- (10 points) Exercise 2.11 on page 129.
- (6 point) Problem 2.19 on page 130.
- (6 points) Problem 2.21 on page 130. (No proof of correctness required)
- (8 points) Problem 2.26 on page 130.
- Read the handout "Applications of Context-Free Grammars" and then write a
one-page summary of what you have learned.
Homework 5 (Out 09/28 and due 10/05):
- (10 points) Exercise 2.6 (b) and (d) on page 129.
- (5 points) Exercise 2.9 on page 129.
- (10 points) Exercise 2.13 on page 129.
- (5 points) Exercise 2.14 on page 129.
- (10 points) Give CFGs for following languages:
A={a^i b^j c^k | i+j=k} and B={a^i b^j c^k | i+j\not=k}.
Homework 4 (Out 09/21 and due 09/28):
- (8 points) Prove that the language A of strings of 0s and 1s whose
length is a perfect square is not regular.
- (8 points) Problem 1.46 (c) on page 90.
- (16 points) Problem 1.49 (a) and (b) on page 90.
- (8 points) Problem 1.54 (a) on page 91.
- Read the handout "Applications of Regular Expressions" and then write a
one-page summary of what you have learned.
Homework 3 (Out 09/14 and due 09/21):
- (8 points) Exercise 1.12 on page 85.
- (4 points each) Exercise 1.18 (e) (f) (j) on page 86.
- (10 points) Exercise 1.21(b) on page 86.
- (5 points) Problem 1.37 on page 89.
- (5 points) Problem 1.48 on page 90.
Homework 2 (Out 09/07 and due 09/14):
- (5 points) Give the state diagram of a DFA that recognizes the set of
strings such that the number of 0s is divisible by 5 and the number of
1s is divisible by 3.
- (5 points) Give the state diagram of an NFA that recognizes the set of
strings such that there are two 0s separated by a number of positions that
is a multiple of 4. Note that 0 is a multiple of 4.
- (10 points) Exercise 1.7 (c) on page 84 and then convert the NFA to
an equivalent DFA.
- (10 points) Exercise 1.16 (b) on page 86 and then describe in a concise
sentence the language recognized by the FA.
- (10 points) Problem 1.32 on page 88.
- Read the handout "An Application: Text Search" and then write a one-page
summary of what you have learned. (No points for the summary but failure to
submit will affect your portfolio grades.)
Homework 1 (Out 08/31 and due 09/07):
- (5 points) Prove by induction that for all intergers $n \ge 4$
the inequality $2^n < n!$ holds.
- (5 points) Prove by contradiction that $2 - \sqrt{2}$ is not a
rational number.
- (5 points) Problem 0.11 on page 27 in Sipser.
- (5 points each) Exercise 1.6 (a), (e), (i) and (n) on page 84 in Sipser.
- (5 points) Quality presentation in LaTeX.
Things to know/do:
- Before you start, get an account on the CS departmental computer
system, create a directory called cs423 for undergraduate
students and cs523 for graduate students with the command of
"mkdir directory-name", and protect the directory with the command of
"chmod 700 directory-name". From now on, all files related to the
course should be stored in the directory created.
- All homework write-ups, which must contain for each problem, the
complete problem description as well as its solution, are required to
be produced by LaTeX, the standard
high-quality typesetting program in our field. Since I do not have
time to teach you LaTeX in class, you must learn LaTeX by yourself.
To make things a little easier for you, I have written a brief introduction,
called LaTeX summary,
that contains a minimum set of things you need to know to produce
a homework write-up in LaTeX.
- Remember each homework assignment is due at 10:00 (at the beginning
of our class) on its due date. You should hand in one hard copy printed
single-sided and stapled in the upper left corner. No late homework will
be accepted unless for medical conditions (with doctor's note) or family
emergencies.
- Always give yourself plenty of time to work on a problem set. Never
expect to be able to start and complete a problem set the night before
it is due.
- Although you are allowed to discuss homework problems with your
classmates, you must strickly follow the "empty hand policy": You cannot
leave a discussion meeting with any record of the discussion, which must
be erased or torn. This is because the actual writing of the detailed
homework answers must be an individual activity. In your homework write-ups,
you should also give credit to your collaborators for each problem.
- Since another goal of doing homework is to improve your technical
writing skills, it is important that you write in a comprehensive
and yet concise style. Points may be taken off for poorly written solutions.
Last modified: November 18, 2005