Introduction to Computer Science Theory 1. Teaching
CS 3261

Fall 2015
CS5371
Theory of
Computation
Lecture 15: Computability VI
(PostsProblem, Reducibility)
Objectives
In this lecture, we introduce Posts
correspondence problem (playing
with a special type of domino)
We also introduce computable
functions, which allows us to
Introduction to Computer Science Theory 1. Teaching
CS 3261

Fall 2015
Course Informa.on
Course website:
Course information may be found on courseworks at:
courseworks.columbia.edu
Please look there for answers to your questions
and make use of the Piazza discussion board.
Introduction to Computer Science Theory 1. Teaching
CS 3261

Fall 2015
Preliminary Deni.ons
Computer Science
Textbook Definition: The study of algorithms including
Their formal and mathematical properties
Their hardware realizations
Their linguistic realizations
Their applications
Introduction to Computer Science Theory 1. Teaching
CS 3261

Fall 2015
Your rst Algorithm
Here are the instructions for linear search written in
pseudocode:
found = "no";
i=1;
while (found = "no" and i <= n)
cfw_
if (A[i] = x)
cfw_
found = "yes";
location = i;
i+;
if (found = "no")
cfw_
print ("Sorry, " + x + " is not on
Introduction to Computer Science Theory 1. Teaching
CS 3261

Fall 2015
Pseudocode
A programming language is a nota.on for specifying
instruc.ons that a computer can execute
Every (programming) language has a syntax and a seman.cs
Syntax species how something is said (grammar)
Seman1cs species what it means
Pseudoc
Introduction to Computer Science Theory 1. Teaching
CS 3261

Fall 2015
Emerging Scholars Program
Learn about CS as a problem solving discipline.
See the Big Picture
1point class, no programming
Because it s where the cool kids hang out
hQp:/www.cs.columbia.edu/esp/
Introduction to Computer Science Theory 1. Teaching
CS 3261

Fall 2015
Preliminary Deni.ons
Algorithm:
Dictionary Definition: A procedure for solving a mathematical
problem in a finite number of steps that frequently involves
repetition of an operation; broadly: a stepbystep method of
accomplishing some task.
Introduction to Computer Science Theory 1. Teaching
CS 3261

Fall 2015
Your rst Algorithm
Linear Search: (also called sequential search)
Algorithm to determine whether a given name x appears
on a list.
Input: A list of n 1 names A[1], A[2], . , A[n],
and a given name x.
Output. The message "Sorry, x is not on the list" if x
Introduction to Computer Science Theory 1. Teaching
CS 3261

Fall 2015
Preliminary Deni.ons
Algorithm:
Textbook Definition: A wellordered collection of
unambiguous and effectively computable operations
that when executed produces a result and halts in a finite
amount of time.
Introduction to Computer Science Theory 1. Teaching
CS 3261

Fall 2015
COMS W3261 CS Theory: Problem Assignment 2
Assigned October 10, 2016; due on Courseworks October 18, 2016
Instructions
Problems 15 are each worth 20 points.
Submit your solutions in pdf format on Courseworks/COMSW3261/Assignments by
noon October 18, 20
Introduction to Computer Science Theory 1. Teaching
CS 3261

Fall 2015
COMS W3261 CS Theory: Problem Assignment 1
Assigned September 26, 2016; due on Courseworks October 4, 2016
Instructions
Problems 15 are each worth 20 points.
Submit your solutions in pdf format on Courseworks/COMSW3261/Assignments
by noon October 4, 2016
Introduction to Computer Science Theory 1. Teaching
CS 3261

Fall 2015
COMS W3261
Computer Science Theory
Lecture 14: October 24, 2016
Midterm Review
Section 001
The Midterm
The midterm will be held on Wednesday, October 26, 2016, 1:102:25
pm. Students whose last names begin AM should go to 833 Mudd.
Students whose last na
Introduction to Computer Science Theory 1. Teaching
CS 3261

Fall 2015
COMS W3261 CS Theory: Problem Assignment 2
Assigned October 10, 2016; due on Courseworks October 18, 2016
Instructions
Problems 15 are each worth 20 points.
Submit your solutions in pdf format on Courseworks/COMSW3261/Assignments
by noon October 18, 2016
Introduction to Computer Science Theory 1. Teaching
CS 3261

Fall 2015
COMS W3261 CS Theory: Solutions to Problem Assignment 2 October
18, 2016
Problems
1. Consider the CFG G with the three productions S ! aSjaSbSjc. This grammar
models ifthen and ifthenelse statements in programming languages where a
stands for if condi
Introduction to Computer Science Theory 1. Teaching
CS 3261

Fall 2015
COMS W3261
Computer Science Theory
Final Review
Section 002
The CS Theory Final
The nal will be held on Tuesday, December 20, 2016, 4:10cfw_7:00 pm.
The sample problems below are intended to help you prepare for the nal.
Answers to almost all of these que
Introduction to Computer Science Theory 1. Teaching
CS 3261

Fall 2015
1THE RISE OF CIVILIZATION
Anthropology V1008y
Prof. T. D'Altroy
Spring 2017
GUIDELINES FOR STUDYING FOR THE FINAL EXAM
In studying for the final, as for the midterm, remember that the course has concerned
both the general processes in the rise of ancient
Introduction to Computer Science Theory 1. Teaching
CS 3261

Fall 2015
COMS W3261
Computer Science Theory
Section 002
Sample Midterm Problem Solutions
Problems with Solutions
1. State whether each of the following languages is (1) regular, (ii) context free but
not regular, or (iii) not context free. Justify your answer in a
Introduction to Computer Science Theory 1. Teaching
CS 3261

Fall 2015
COMS W3261 CS Theory: Solutions to Problem Assignment 1
October 4, 2016
1. If R and S are regular languages, is R S always a regular language? ( is the set di erence operator.) Prove your answer.
R S is always a regular language since the regular language
Introduction to Computer Science Theory 1. Teaching
CS 3261

Fall 2015
COMS W3261 CS Theory: Problem Assignment 3
Assigned October 31, 2016; due on Courseworks Nov 10, 2016
Instructions
Problems 15 are each worth 20 points.
Submit your solutions in pdf format on Courseworks/COMSW3261/Assignments by noon
November 10, 2016. L
Introduction to Computer Science Theory 1. Teaching
CS 3261

Fall 2015
COMS W3261 CS Theory: Problem Assignment 5 (revised)
Assigned November 29, 2016; due on Courseworks December 12, 2016
Instructions
Problems 15 are each worth 20 points.
Submit your solutions in pdf format on Courseworks/COMSW3261/Assignments by noon
Dece
Introduction to Computer Science Theory 1. Teaching
CS 3261

Fall 2015
COMS W3261 CS Theory: Problem Assignment 3
Assigned October 31, 2016; due on Courseworks Nov 10, 2016
Solutions
k
1. (a) The language is f0(10) : k 0g. Note that since the TM always moves right, it is
behaving like a DFA.
k
(b) The language is f01 : k 0g.
Introduction to Computer Science Theory 1. Teaching
CS 3261

Fall 2015
COMS W3261 CS Theory: Problem Assignment 4
Assigned November 14, 2016; due on Courseworks Nov 22, 2016
Instructions
Problems 15 are each worth 20 points.
Submit your solutions in pdf format on Courseworks/COMSW3261/Assignments by noon
November 22, 2016.