CS 373, Spring 2009. Solutions to Mock midterm 1 (Based on rst midterm in CS 273, Fall 2008.)
Problem 1: Short Answer (8 points)
The answers to these problems should be short and not complicated. (a)
CS 341: Foundations of Computer Science II
Prof. Marvin Nakayama
Homework 4
1. Use the procedure described in Lemma 1.55 to convert the regular expression (00) (11)
01) into an NFA.
Answer:
0
0
1
1
00
CS 341: Foundations of Computer Science II
Prof. Marvin Nakayama
Homework 3 Solutions
1. Give NFAs with the specied number of states recognizing each of the following languages. In all cases, the alph
CS 341: Foundations of Computer Science II
Prof. Marvin Nakayama
Homework 2 Solutions
1. DFA M = (Q, , , q1 , F ), where
Q = cfw_q1 , q2 , q3
= cfw_a, b
transition function is given by
q1
q2
q3
ab
q
CS 341: Foundations of Computer Science II Prof. Marvin Nakayama
Homework 1 Solutions
1. We are given the sets C D E F (a) D C = cfw_, bb, aab, baa (b) C F = cfw_, aab, baa = C (c) C D = cfw_ (, bb),
CSC236H: Introduction to the Theory of Computation
Bonus Homework
Due on Tuesday April 6, 2010 (in review session, see announcements)
Note that this assignment is for extra credit. If you do not want
902 43500 HOMEWORK 2
due Tuesday, October 27, 2009
All problems are in the book: Michael Sipser, Introduction to the Theory of
Computation, 2nd Edition, PAWS Publishing Company, 2005.
Solution by Chen
902 43500 HOMEWORK 1
due Tuesday, October 13, 2009
All problems are in the book: Lewis and Papadimitriou, Elements of the Theory
of Computation, Prentice Hall, 1981.
Solution by Cheng-Chung Li
Problem
CSE 322 Spring 2010
Homework Assignment #4
Due Date: Friday, April 30 (at the beginning of class)
1. (30 points) Give regular expressions for the following languages over = cfw_0,1:
a. cfw_w | w has l
CSE 322 Spring 2010
Homework Assignment # 3
Due Date: Friday, April 23 (at the beginning of class)
1. (10 points) Draw the state diagram and write down the formal description (Q, ,
, q0, F) of an NFA
CSE 322 Spring 2010
Homework Assignment # 2
Due Date: Friday, April 16 (at the beginning of class)
1. (20 points) Give examples of each of the following if possible. If not possible,
explain why.
a. T
CSE 322 Spring 2010
Homework Assignment # 1
Due Date: Friday, April 9 (at the beginning of class)
Note: N = set of natural numbers = cfw_1, 2, 3, , Z = set of integers = cfw_, -1, 0, 1,
1. (20 points
CS 341 Homework 8 Finite Automata, Regular Expressions, and Regular Grammars
1. We showed that the set of finite state machines is closed under complement. To do that, we presented a technique for con
CS 341 Homework 4 Deterministic Finite Automata 1. If M is a deterministic finite automaton. Under exactly what circumstances is L(M)? 2. Describe informally the languages accepted by each of the foll
CS 341 Homework 3 Languages and Regular Expressions 1. Describe in English, as briefly as possible, each of the following (in other words, describe the language defined by each regular expression): (a
CS 341 Homework 2 Strings and Languages 1. Let = cfw_a, b. Let L1 = cfw_x *: |x| < 4. Let L2 = cfw_aa, aaa, aaaa. List the elements in each of the following languages L: (a) L3 = L1 L2 (b) L4 = L1 L2
Name: _
Student ID: _
CSE 322 Spring 2010: Take-Home Final Exam
SOLUTIONS
Total: 150 points, 8 questions
Due: Before 4:30pm, Monday, June 7, 2010
Where: CSE Front Desk
Instructions:
1. Write your name
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 minute
CS5371 Theory of Computation
Homework 1
Due: 2:10 pm, October 16, 2007 (before class)
1. (20%) Give state diagrams of DFAs recognizing the following languages. In both parts,
the alphabet is cfw_0, 1.
CS5371 Theory of Computation
Homework 1 (Suggested Solution)
1. (a) Ans: The state diagram for cfw_w | w does not contain the substring 110 is as follows.
In the diagram, the states A, B , and C keep
CS5371 Theory of Computation
Homework 1 (Solution) 1. Assume that the alphabet is cfw_0, 1. Give the state diagram of a DFA that recognizes the language cfw_w | w ends with 00. Answer: The key idea is
Formal Languages and Automata Theory
902 43500 Midterm
Tuesday, November 23, 2010
There are 7 problems in this examination sheet.
Problem 1 (10 points)
Find the error in the following proof that all h
Formal Languages and Automata Theory
902 43500 Final Examination
Tuesday, 11 January, 2011
There are 7 problems and each of them is 15 points.
Problem 1
Which of the following problems about Turing Ma
Formal Languages and Automata Theory
902 43500 Midterm
Tuesday, 10 November, 2009
Solution by Cheng-Chung Li
Problem 1 (20 points)
What is wrong with the following alleged proofs:
We prove that 2 = 1
Formal Languages and Automata Theory
902 43500 Final Examination
Tuesday, 12 January, 2010
Solution by Cheng-Chung Li
Problem 1
Which of the following problems are decidable, and which are undecidable
ECS 120: Theory of Computation UC Davis Earl Barr and Phil Rogaway
Handout MT-Soln February 9, 2006
Midterm Solutions
1 Short Answer
(A) Carefully dene what it means if we say: the regular languages a