COMS 3261: Computer Science Theory
Midterm Exam, Tuesday March 23, 2010
This exam ends at 12:15 PM. It contains 4 problems, each of them composed of several parts.
There are 100 points in all, and you have 75 minutes. Do not spend too much time on any
pro
COMSW3261
ComputerScienceTheory:Homework
#4
Submitsolutionsinpdfformaton
Courseworks/COMSW3261/Assignment
s
by3:00pm,November25,2015
Instructions
You can discuss these problems with others but your solutions must
be in your own words.
Problems (1)-(5) a
COMS W3261
Computer Science Theory
Solutions to Homework Assignment #4
November 12, 2014; due November 24, 2014
1. Classify each of the following languages as being (i) recursive, (ii) recursively
enumerable but not recursive, or (iii) not recursively enu
HW 2: Problem 1 solutions
Graded by: Luke Kowalczyk
(a)
(0 + 1) 1(0 + 1) 1(0 + 1) 1(0 + 1)
This regular expression (R.E.) species 3 literal ones, with any string in cfw_0, 1
possible on either side, so all strings x containing at least 3 ones will match
t
Columbia University
COMS W3261
Fall 2013
Solution to HW 5, Problem 1
Graded by Christian Moscardi
Q = cfw_q0 , q1 , q2 , q3 , qf
= cfw_0, 1, $
= cfw_0, 1, $,
is described below by the diagram.
q0 = q0
B=
F = cfw_qf
$/$, R
0/0, L
1/0, L
/, L
1/1, R
q
HW 3: Problem 1 solutions
Graded by: Luke Kowalczyk
(1a)
L = cfw_0i 1j |i 0, j 0
That is, the language generated consists of all strings of zero or more 0s followed
by zero or more 1s.
(From the start variable you can either end the generation of a string
HW 4: Problem 1 solutions
Graded by: Luke Kowalczyk
The Pumping Lemma for CFGs states:
If language L is context-free, then there exists some integer p 1 such that
every string s L can be written as s = uvxyz with substrings u, v, x, y, and z
such that:
1.
Department of Computer Science
Columbia University
Solutions to Final COMS W3261
Computer Science Theory
December 8, 2014
1:10-2:25pm
833 and 627 Mudd
Closed book, no aids. Do questions 1-10. Each question is worth 10 points.
True or false? Briefly justif
COMS 3261: Computer Science Theory
Problem Set 1, due Monday, 9/30/13, at the beginning of the class
Please follow the Homework Guidelines.
Try to make your answers as precise, succinct, and clear as you can.
Part A: [30 points] Do the problems posted at
COMS 3261: Computer Science Theory
Midterm Exam Solutions, Tuesday March 23, 2010
Problem 1. [24 points]
Answer the following questions. No explanations are needed.
1. [6 points] Give a regular expression that denotes the set of strings over the alphabet
COMS 3261: Computer Science Theory
Midterm Exam Solutions, Monday, October 21, 2013
Problems 1 and 2 graded by Arka, Problems 3 and 4 by Luke, Problem 5 by Karan, Problem
6 by Christian.
Problem 1. [18 points: 3 parts, 6 points per part]
Answer the follow
1
Department of Computer Science
Columbia University
Solutions Final Review COMS W3261 December 3, 2014
Computer Science Theory
Briefly explain your solution to each of the following questions.
1. Do the following pairs of classes of machines define the s
COMS 3261: Computer Science Theory
Problem Set 5, due Monday, 11/25/13, at the beginning of the class
Please follow the Homework Guidelines.
Try to make your answers as precise, succinct, and clear as you can.
Part A: [20 points] Do the problems posted at
COMS 3261: Computer Science Theory
Final Exam, Thursday April 29, 2010
This exam ends at 12:15 PM. It contains 5 problems, composed of several parts. There are 100
points in all, and you have 75 minutes. Do not spend too much time on any problem. Read the
COMS 3261: Computer Science Theory
Final Exam Solutions, Monday, December 9, 2013
Problem 1 [20 points]
For each of the following statements circle True or False. You do not need to justify your
answers.
1. If L is a non-regular language and M is a finite
COMS 3261: Computer Science Theory
Problem Set 4, due Wednesday, 11/13/13, at the beginning of the class
Please follow the Homework Guidelines.
Try to make your answers as precise, succinct, and clear as you can.
Part A: [30 points] Do the problems posted
COMS 3261: Computer Science Theory
Problem Set 2, due Monday, 10/14/13, at the beginning of the class
Please follow the Homework Guidelines.
Try to make your answers as precise, succinct, and clear as you can.
Part A: [30 points] Do the problems posted at
COMS 3261: Computer Science Theory
Problem Set 3, due Wednesday, 10/30/13, at the beginning of the class
Please follow the Homework Guidelines.
Try to make your answers as precise, succinct, and clear as you can.
Part A: [30 points] Do the problems posted
COMSW3261
ComputerScienceTheory:Homework
#2
Submityoursolutionsinpdfformaton
Courseworks/COMSW3261/Assignment
s
by6:00pm,October16,2015
Instructions
You can discuss these problems with others but your solutions must
be in your own words.
Problems 1-5 ar
COMS W3261
Computer Science Theory
Lecture 5: September 23, 2015
Properties of Regular Languages
Overview
Review
The pumping lemma for regular languages
Constructing an equivalent regular expression from a DFA
1. Review
Kleene regular expressions are
COMSW3261
ComputerScienceTheory
Lecture2:September14,2015
FiniteAutomataandRegularLanguages
Outline
The Chomsky hierarchy
Deterministic finite automata
Examples of DFAs
Nondeterministic finite automata
Equivalence of DFAs and NFAs: the subset constru
COMSW3261
ComputerScienceTheory
Lecture4:September21,2015
RegularExpressionsandFiniteAutomata
Overview
We say that two finite automata are equivalent if they define the
same language.
In the last two lectures we have shown the subset construction can
be
COMSW3261
ComputerScienceTheory
Lecture3:September16,2015
FiniteAutomataandRegularExpressions
Outline
Nondeterministic finite automata with epsilon transitions
Converting an -NFA to an equivalent DFA
Regular expressions
Examples of regular expressions
COMSW3261
ComputerScienceTheory
Lecture1:September9,2015
IntroductiontoComputerScienceTheory
1.TeachingStaff
Instructor
Professor Alfred V. Aho
http:/www.cs.columbia.edu/~aho
aho@cs.columbia.edu
513 Computer Science Building
Office hours: Mondays and Wedn
COMS W3261
Computer Science Theory
Lecture 5: September 23, 2015
Properties of Regular Languages
Overview
Review
The pumping lemma for regular languages
Constructing an equivalent regular expression from a DFA
1. Review
Kleene regular expressions are
COMSW3261
ComputerScienceTheory
Lecture7:September30,2015
ContextFreeGrammars
Outline
Review
Definition of a context-free grammar
Derivations
Leftmost and rightmost derivations
Parse trees
Ambiguity
1.Overview
We now begin the study of context-free
COMSW3261
ComputerScienceTheory
Lecture6:September28,2015
DecisionProblemsforRegularLanguages
Overview
In this lecture we show that there is an algorithm to determine
whether two states of a DFA recognize the same set of strings.
The same algorithm can
COMSW3261
ComputerScienceTheory
Lecture15:October28,2015
TheUniversalLanguage
Outline
1. Review: Countable and uncountable sets
2. The universal language Lu
3. Lu is recursively enumerable
4. Lu is not recursive
5. The halting problem
6. Midterm review
1.
COMSW3261
ComputerScienceTheory
Lecture13:October21,2015
VariantsofTuringMachinesandthe
ChurchTuringThesis
Outline
1. Review: recursive and recursively enumerable languages
2. Programming techniques for Turing machines
3. Extensions of the basic Turing ma
COMSW3261
ComputerScienceTheory
Lecture9:October7,2015
EquivalenceofCFG'sandPDA's
ChomskyNormalForm
Outline
From a CFG to a PDA
From a PDA to a CFG
Eliminating useless symbols from a CFG
Eliminating -productions
Eliminating unit productions
Chomsky
Timothy Sun
Homework 2 Solutions
COMS S3261
1. (Exercise 1.7e)
0
1
0
0
2. (Exercise 1.12) D can be expressed as b(bb) (aa) .
b
a
a
a
b
a, b
a
b
b
3. (Exercise 1.14b) Both NFAs below accept just the empty string . However, the class of languages
recognized
Timothy Sun
Homework 4 Solutions
COMS S3261
1. (Exercise 3.11)
A TM with a doubly infinite tape can simulate an ordinary TM. It marks the left-hand end of the input
to detect and prevent the head from moving off that end.
To simulate the doubly infinite t
CS3261Homework Assignment #5
Due: 5:30 p.m., Monday, August 8, 2016
Sipser (2nd/3rd Edition), Chapter 5:
5.1 (Use an obvious result from the LBA subsection);
5.3;
5.4 (The answer is no. See if you can come up with a simple example);
5.9 (Show that ATM red
CS3261Summer, 2016
Solutions to Homework #5
Chapter 5:
5.1 Show EQCFG is undecidable
Suppose EQCFG is decidable by a Turing Machine M.
Given a grammar G, execute M on <G,G*> where G* is a grammar that generates all possible
strings over the set of termina