ITEC 420 - Homework Assignments
Fall 2011
Homework 1
-
Due:
Friday 9/9/11, at the beginning of class.
Wednesday 9/7/11, at the beginning of class.
Late assignments not accepted.
- Please put your solutions in
order and clearly label each with the problem number.
-
The problems are:
- Complete the following:
- {a, b, c} x {0, 1} =
- P(P({0, 1})) =
- P({φ})
- Answer the following and justify your answer:
- The empty set is a language: true or false
- The empty string is a language: true or false
- An alphabet is a language: true or false
- Let S be the set { {0}, {2}, {4}, {6}, ...}. Give a definition
for S that does not use the elipses (ie "...") and that is
of the form S = {YOU_FILL_IN | n ∈ N} where N
denotes the natural numbers.
- Justify your answers to the following questions on the relationship between
P(A ∪ B) and P(A) ∪ P(B)?
-
Under what conditions are they equal?
-
Is either a subset of the other?
- Prove that every string of length 4 over alphabet {a, b} has
a substring xx for non-empty string x. Although simply listing
all 16 possible cases is a valid proof, please give a different proof.
You might want to break the proof down into a smaller number of cases.
- Prove by induction (Hint: use induction on the length of the string) that every string over {a, b} that begins with a and ends with b
contains the string ab.
- In class I said that you should try to prove (by contradiction) that there is
no largest prime. I changed my mind, and you do not have to do that proof.
Homework 2
- Due Date: Monday 9/19/11, in class
- Please make sure that you number all problems (eg 1.1, 1.2) and put them in
order.
- Draw FSM for the following languages, over the alphabet {a, b}
- All strings containing exactly 2 a's
- All strings containing at least 2 a's
- All strings that do not end with ab
- All strings in which the number of a's is even (remember that 0 is even).
- Give the formal definition for the machine in Figure 1.12, page 38 of your text.
Represent δ with a table.
Your answer should look start this:
M4 = (Q, Σ δ, q0, F)
where Q = ...
- Let machine M=(Q, Σ, δ, qi, F) where
- Q = {1, 2, 3}
- Σ = {a, b}
- δ =
- qi = 1
- F = {1, 2}
Do the following:
- Draw M.
- Give all strings accepted and and all not accepted, of length 0, 1, 2, 3
- Describe in words the language accepted by this machine.
- Do or answer the following:
- Draw a FSM for a machine that accepts aba and no
other strings (over {a,b}).
- How many states in your machine?
- How many states in a machine that accepts aaba and no other strings?
- For any string x over {a, b},
how many states are required for a FSM that accepts x and no other strings
- Do not hand these in; do them on your own and check your own answers:
Homework 3
- Due Date:
Friday 9/30/11
- at the beginning of class.
No late assignments accepted.
Please make sure that your answers are in order and that you
number your answers using the problem number from the text.
The assignment is from the Exercises and Problems
at the end of Chapter 1 of the Second Edition of the
text (pages 83-88):
- 1.6.j (This must be a DFA)
- 1.6.k (This must be a DFA)
- 1.6.m (This must be a DFA)
- 1.6.n (This must be a DFA)
- 1.7.e (Make sure that you use the correct number of states)
- 1.7.g (Make sure that you use the correct number of states)
- 1.10.a (Make sure that you follow the construction of the proof)
- 1.16.b (Make sure that you follow the construction of the
Theorem; do not simplify your machine)
- 1.31 (In other words, show how to build a machine for
AR, given a machine for A.
Homework 4
- Due: Monday 10/10/11, at the beginning of class.
- 1.18.c
- 1.18.d
- 1.18.f
- 1.18.n
- 1.19.b (Make sure that you follow the construction of Lemma 1.55 and as illustrated in
figures 1.57 and 1.59. You do not need to show all of the steps show in the Figures, but you do
need to follow the process that is shown.)
- 1.20.a
- 1.20.c
- 1.20.f
- 1.20.h
- 1.21.b (make sure that you use the procedure from the Lemma)
-
For the International Edition:
| U.S. Edition | International Edition |
| 1.18 | 1.20 |
| 1.19 | 1.18 |
| 1.20 | 1.19 |
| 1.21 | 1.21 |
- Please make sure that you number and order your problems
consistent with the U.S. Edition
Homework 5
- Due: Wednesday 10/19/11, at the beginning of class.
No late assignments accepted.
The first 2 problems are from the Exercises at the
end of Chapter 1 of the Second Edition of the
text (pages 83-88):
- 1.29.b
- 1.46.c (Hint: Consider the complement)
- Use the pumping lemma to prove that this language is not regular:
L = { aibj | j = i or j = 2i }
- U.S. and International Editions are identical for these
problems.
Homework 6
- Due: Wednesday 10/26/11 at the beginning of class.
No late assignments accepted. Some of the problems are from the
Exercises at the end of Chapter 2 of the Second Edition
of the text (pages 128-131):
- Using the grammar of problem 2.1, along with
productions
F → b|c|d|e,
give a parse tree and a leftmost derivation of these strings:
- a + b * c
- ((a))
- a * b * (c * d + e)
- Describe the language generated by each of the following
grammars. Assume S, T, A are the variables and that
S is the start symbol.
All of the languages are subsets of Σ*.
Make your answers concise and precise, using regular expressions, if
appropriate.
- S → aS | bS | ε
- S → SS | bS | a
- S → SaS | b
- S → SaS | b | ε
- Find a context free grammar generating the following
languages.
You don't have to formally list all 4 parts of the
grammar; you can simply list the rules. Use S for the start
symbol.
- {aibj, i < j
- {aibj, i ≤ j
- {aibj, i = 2j
- Find grammars that generate the languages in the problems given.
You don't have to formally list all 4 parts of the
grammar; you can simply list the rules.
Use S for the start symbol.
The terminals are {0, 1}.
- 2.4.b (starts and ends with same symbol. Do NOT include
ε in this language, but do include 0 and 1.)
- 2.4.c (odd length)
- 2.4.e (palindromes)
- 2.4.f (empty set, that is, {}, the language containing no strings)
- {ε}
- 2.9
- 2.3.{a .. o}: Don't hand this one in!
Just make sure that you understand the answers in the text
Homework 7
- Due:
Friday 11/4/11
at the beginning of class
No late assignments accepted. The problems are from the Exercises at the
end of Chapter 2 of the Second Edition of the text (pages 128-131):
- 2.7.b
- 2.10
- 2.12
- 2.13.a
- 2.14: Use the algorithm in the text
Homework 8
- Due: FOR DISCUSSION ONLY - DO NOT TURN IN THIS ASSIGNMENT.
We will go over them in class on Monday 11/14/11.
The problems are from the Exercises at the
end of Chapter 2 of the Second Edition of the
text (pages 128-131):
- 2.15 Hints:
What string in A* is G' NOT guaranteed to generate?
How could G' generate strings that are not in A*?
- 2.16 Hint: How would you fix the solution to 2.15?
- 2.17 Do NOT use machines in your proof. Only use grammars. Hint:
The definition of Regular Expressions has six parts.
Construct a grammar for each part.
Homework 9
- Due: Wednesday after break (ie 11/30/11), at the beginning of class.
No late assignments accepted.
The problems are from the Exercises at the
end of Chapter 3 of the Second Edition of the
text:
Homework 10
- Due: Friday 12/02/2011
The problems are from the Exercises at the
end of Chapter 3 of the Second Edition of the
text:
Homework 11
- Due: Monday 12/5/2011
The problems are from the Exercises at the
end of Chapter 4 of the Second Edition of the
text:
Homework 12
Last modified on
|