Worksheet I: Alphabets, Strings, Languages, and Proofs
Date: August 27, 2013.
Problem 1. For each of the statements below indicate whether they are necessarily true, or not necessarily
true (i.e., false).
1. No matter what the alphabet is,
is the only str
Quiz 5
1. Which of the following statements is true?
(A) There are languages that can be recognized by an NFA which cannot be recognized by a DFA.
(B) Languages recognized by NFAs cannot be recognized by DFAs because they can have innitely
many active thr
Quiz 1
1. Let A = cfw_1, 2, 3 and B = cfw_, cfw_1, cfw_2, cfw_3, cfw_1, 2, 3. Which of the following statements is true?
(A) A B
(B) A B
(C) A B =
(D) A B = B
Correct answer is (B).
(A): A B since 1 B.
(B): Obvious.
(C): Their intersection is empty since
Problem Set 4 Solutions
CS373 - Spring 2011 Due: Thursday April 7 at 2:00 PM in class (151 Everitt Lab)
Please follow the homework format guidelines posted on the class web page:
http:/www.cs.uiuc.edu/class/sp11/cs373/
1. Pumping Lemma / Ogden's Lemma [Ca
Problem Set 4
CS 373: Theory of Computation
Assigned: September 19, 2013
Due on: September 26, 2013
Instructions: This homework has 3 problems that can be solved in groups of size at most 3. Please follow
the homework guidelines given on the class website
Midterm 1
CS 373: Theory of Computation
Date: Thursday, October 3, 2013.
Instructions:
This is a closed book exam. No notes, cheat sheets, textbook, or printed material allowed.
You have 90 minutes to solve this exam.
This exam has 4 problems. Problems
Solutions to Problem Set 3
CS 373: Theory of Computation
Problem 1. [Category: Design+Proof] For a string w , let wR denote the reverse of w, i.e., if
w = w1 w2 wn , where wi then wR = wn wn1 w1 . For a language L, let LR = cfw_wR | w L. Let
M = (Q, , , q
1
Equivalence of Finite Automata and Regular Expressions
Finite Automata Recognize Regular Languages
Theorem 1. L is a regular language i there is a regular expression R such that L(R) = L i
there is a DFA M such that L(M ) = L i there is a NFA N such tha
Solutions for Problem Set 1
CS 373: Theory of Computation
Assigned: August 30, 2012
Due on: September 6, 2012
Problem 1. [Category: Comprehension+Proof]
1. Let A = cfw_1, 2, 3, B = cfw_, cfw_1, cfw_2, and C = cfw_1, 2, cfw_1, 2. Compute A B , A B , B C ,
Problem Set 1
CS 373: Theory of Computation
Assigned: August 30, 2012
Due on: September 6, 2012
Instructions: This homework has 3 problems that can be solved in groups of size at most 3. Please follow
the homework guidelines given on the class website; su
Quiz 4
0, 1
q0
0, 1
1
q1
0
q2
0
q3
Figure 1: NFA N for problem 1
1. Consider the NFA N shown in Figure ?. Which of the following strings is not accepted by N ?
(A) 001
(B) 001100
(C) 10011001
(D) 1001
The correct answer is (A). Observe that any string acc
Quiz 10
1. In the notes for lecture 10 posted on the website, it is shown that the language L0n1n = cfw_0n 1n | n 0
is not regular. Consider the homomorphism h : cfw_a cfw_0, 1 dened as: h(a) = 01. What can we
conclude on the basis of the languages L0n1n
Midterm 1
CS 373: Theory of Computation
Date: Thursday, October 4, 2012.
Instructions:
This is a closed book exam. No notes, cheat sheets, textbook, or printed material allowed.
You have 90 minutes to solve this exam.
This exam has 5 problems each wort
Quiz 6
1. Let L cfw_0, 1 . Which of the following statements is necessarily true about L ?
(A) L is an innite set.
(B) L is a nite set.
(C) L is non-empty.
(D) None of the above.
Correct answer is (C).
(A) Counterexample: L = .
(B) Counterexample: L = cfw
Quiz 2
1. Let L = cfw_010, 101, 001, 011, and K = cfw_w | 0w L. Which of the following strings is a member of K?
(A) 0101
(B) 01
(C) 011
(D) 0110
The correct answer is (B). K is the set of strings formed by removing the leading 0 from a string in L.
Thus,
Solutions to Problem Set 3
CS 373: Theory of Computation
Problem 1. [Category: Design+Proof] For a string w , let wR denote the reverse of w, i.e., if
w = w1 w2 wn , where wi then wR = wn wn1 w1 . For a language L, let LR = cfw_wR | w L. Let
M = (Q, , , q
Quiz 1
CS 373: Theory of Computation
Date: September 9, 2010.
Name
netid
Discussion
Tu 2-2:50
Lecture Section AL1.
Tu 3-3:50
Time limit: 15 minutes.
Tu 4-4:50
W 4-4:50
W 5-5:50
Pick the correct alternative from among the choices (A), (B), and (C) provided
1
Computing Using a Stack
Beyond Finite Memory: The Stack
So far we considered automata with nite memory
Today: automata with access to an innite stack
The stack can contain an unlimited number of characters. But
can read/erase only the top of the sta
CS 373 Fall 2010
Quiz 6 Solutions
Lecture 1 Mahesh
1. C. For a grammar in Chomsky Normal Form, the number of steps in any derivation of a string w is
2|w| 1 (see problem 2.26 assigned as practice problem).
2. A. When proving that a language does not satis
Quiz 4
1. Which of the following statements is true?
(A) There are languages that can be recognized by an NFA which cannot be recognized by a DFA.
(B) Languages recognized by NFAs cannot be recognized by DFAs because they can have innitely
many active thr
Problem Set 1
CS373 - Spring 2011
Due: Thursday Feb 10 at 2:00 PM in class (151 Everitt Lab)
Please follow the homework format guidelines posted on the class web page:
http:/www.cs.uiuc.edu/class/sp11/cs373/
1. Encoding input and building a DFA
[Category:
Quiz 1
1. Consider the set X dened inductively as follows: (1) (3, 5) X , (2) if (x, y ) X then (x + 2, y ) X ,
and (3) if (x, y ) X then (y, x) X . Which of the following pairs is a member of X ?
(A) (222, 402)
(B) (1, 7)
(C) (151, 1171) correct
(D) (6,
Quiz 11
1. Let be an equivalence relation and let E be an equivalence class of . Which of the following is the
strongest statement that is necessarily true about E?
(A) There are a, b E such that a b.
(B) For every a, b E, a b.
(C) There are a, b E and c
Midterm 2
CS 373: Theory of Computation
Date: Thursday, November 4, 2010.
Instructions:
This is a closed book exam. No notes, cheat sheets, textbook, or printed material allowed.
You have 120 minutes to solve this exam.
This exam has 5 problems each wo
Quiz 12
1. Consider the grammar G = (V = cfw_S, A, C, X, Y , = cfw_a, b, c, R, S) where the set of rules R is as
follows:
S AX|Y C
A aA|
C cC|
X bXc|
Y aY b|
Which of the following strings can be derived in one step from aaAbXc?
(A) aaaAbbXcc
(B) aaAbbXcc
1
Undecidability
Undecidability
Denition 1. A language L is undecidable if L is not decidable. Thus, there is no Turing machine
M that halts on every input and L(M ) = L.
This means that either L is not recursively enumerable. That is there is no turing
Problem Set 2
CS 373: Theory of Computation
Problem 1. [Category: Design+Proof] Let Ak cfw_a, b be the collection of strings w where there is a
position i in w such that the symbol at position i (in w) is a, and the symbol at position i + k is b. For
exam
Solutions for Problem Set 6
CS 373: Theory of Computation
Assigned: October 18, 2012
Due on: October 25, 2012
Problem 1. [Category: Comprehension] Consider the PDA P over the input alphabet cfw_0, 1, # shown in
the gure below; a, in the transitions below,
Solutions for Problem Set 2
CS 373: Theory of Computation
Assigned: September 7, 2010 Homework Problems Problem 1. [Category: Design] Design an NFA for the language D given in Problem 1.48. You need not formally prove the correctness of your construction,