Let M be a nondeterministic machine that always halts and runs in space ,S(n). Then, M runs in at most T : qngs(n) steps for q states and g svmbols in the tape alphabet. Now, if necessary,reprogram M
CSC544 Spring 2011
Midterm
Take-Home Exam
due in class Tuesday 3/29/11
Note: All work has to be your own, no team work allowed.
Part A, short answers, 40 points.
1. (5 points) Why do we think of decid
CSC544 Spring 2011
Midterm
Take-Home Exam
Version 1.1
due in class Tuesday 3/29/11
Note: All work has to be your own, no team work allowed.
Part A, short answers, 40 points.
1. (5 points) Why do we th
A Tutorial Introduction to the Lambda Calculus
Ral Rojas u FU Berlin, WS-97/98
Abstract This paper is a short and painless introduction to the calculus. Originally developed in order to study some mat
CSC544 Spring 2011
Final
Due Wednesday 5/11 @ noon in my oce
NAME:
Part I: short answers (40 points).
1. (5 points) What is the the Church-Turing thesis?
2. (5 points) True or false: if L is an NP-com
CSC544 Assignment #5
due Thursday 4/21 in class
version 1.0
Problems
1. Show that the complexity classes P and N P are closed under concatenation and union.
2. A triangle in an undirected graph is a 3
CSC544 Assignment #4
due Tuesday 4/5 in class
version 1.0
Problems
1. Let g (x, y, z ) be a primitive recursive function. Show that the following
functions are primitive recursive,
(a) f (x, y ) = g (
CSC544 Assignment #3
due Thursday 3/10 in class
version 1.0
Problems
1. A Turing machine with a doubly innite tape is similar to an ordinary
Turing machines, but its tape is innite to the left as well
CSC544 Assignment #2
due Tuesday 3/1 in class
Problems
Given the language
L = cfw_an bn (ab)n ,
do the following:
1. Prove that the language is not context-free.
2. Prove that the language is Turing-r
CSC544 Assignment #1
due Tuesday 2/15 in class
Problems
1. Give the state diagrams of FAs recognizing the following languages (assume = cfw_0, 1):
(a) cfw_w | w begins with a 1 and ends with a 0
(b) c
Approximations to
N P Solutions
If we are faced with an N P or N P -complete problem the best we can do on a
deterministic computer is a solution in exponential time.
Since exponential time solutions
Space Complexity
Time and space are two of the most important considerations when we seek
practical solutions to computational problems.
Space complexity shares many of the same features of time compl
Cook-Levin Theorem
In the 1970s Stephen Cook and Leonid Levin independently discovered that there are
problems in N P whose complexity are related to all other problems in N P these
problems are calle
P and N P
P is the class of languages that are decidable in polynomial
time on a deterministic Turing machine,
[
P=
T IM E (nk ), for k 0.
Denition:
k
Denition:
NP =
[
N T IM E (nk ), for k 0.
k
In or
Nondeterministic
Time Complexity
Let N be a nondeterministic Turing machine that is a decider.
The running time of N is the function f : N N, where f (n) is the
maximum number of steps that N uses on
Complexity Theory
Up to now we investigated whether a problem is in principle solvable algorithmically, that is, we asked the question whether a particular language is,
Decidable:
machine halts on all
Algorithmic
Information Theory
Consider the following Strings:
0101010101010101010101010101010101010101010101010101010101010101
1100100001100001110111101110110011111010010000100101011110010110
How muc
First Order Logic
A logic is a formal language with strings over the alphabet :
= cfw_, , , (, ), , , x, R1 , . . . , Rk
A well-formed formula (WFF) is a string over this alphabet and can be dened i
The Mathematics of
Functions
The -calculus is very low level. Here we investigate functions in a more abstract setting.
This is very similar to writing algorithms in English prose rather than writing
-Recursive
Functions
Here we investigate the relationship between Turing machines and computable functions.
For convenience we will restrict ourselves to only look at numeric computations, this does n
The Other Model: Calculus
So far we have only looked at Turing machines as our model.
Question:
Answer:
Where does the Church in the Church-Turing thesis come from?
Alonzo Church invented the calculus
Reducibility
We say that a problem Q reduces to problem P if we can use P to solve Q.
In the context of decidability we have the following templates:
If A reduces to B and B is decidable, then so is A
Another Proof
We just saw a proof that languages that are not Turing-recognizable exist based on the
fact that a decider for AT M cannot exist
Lets look at another proof that shows that some languages
Proofs using
Deciders
Let L1 and L2 be decidable languages, then the concatenation L = L1 L2
is also decidable.
Proposition:
We show decidability of L by constructing a decider for it. Let M1 and M2 b
Alternate Denition
A Turing-recognizable language is a formal language for which
there exists a Turing machine that will halt and accept when presented
with any string in the language as input but may
Turing Machines
A Turing machine is a FA with an innite tape as memory.
Initially, the tape contains the input to the Turing machine.
p. 1/1
Church-Turing Thesis
Why do we study Turing machines?
Intu
Context-Free
Languages
As pointed out before, the prototypical context-free language is
L = cfw_an bn | a, b and n 0
In order to accept strings in this language a machine has to remember how many as i
Generators vs.
Recognizers
Up to now we have only described languages in terms of machines that recognize a
particular language.
But we could also imagine describing a language by a system that is abl
Regular Languages
Denition:
A language is called a regular language if some nite automaton recognizes it
p. 1/2
Regular Operations
Denition:
Union:
Let A and B be regular languages, we dene the follo
Strings & Languages
Sequences or strings of symbols and characters are fundamental in computer science.
We use strings of symbols to represent data and most importantly we use them to
represent algori