15-251 Assignment 1
Page 1 of 10
15-251 : Great Theoretical Ideas In Computer Science
Fall 2013
Assignment 1
SOLUTIONS
15-251 Assignment 1
Page 2 of 10
1. Pancakes with Problems
(20)
(a) Suppose we have a special spatula which only lets us ip an even numb
15-251
Great Theoretical Ideas in Computer Science
Lecture 4:
Turings Legacy
September 10th, 2015
This Week
input
data
computing
device
output
data
What is computation?
What is an algorithm?
How can we mathematically define them?
Lets assume two things ab
15-251: Great Theoretical Ideas In Computer Science
Recitation 9 Solutions
Conditions permitting
(a) Mary flips a fair coin. If it lands heads, she rolls a 3-sided die; otherwise she rolls a 4-sided die.
What is the probability that she rolls at least a 3
15-251: Great Theoretical Ideas In Computer Science
Recitation 1 Solutions
As you prepare to do the writeups next week, remember the 10 styles of proof that you should avoid
(adapted from Luis Von Ahns lecture notes):
Proof by Stating Every Theorem in th
15-251
Great Theoretical Ideas in Computer Science
Lecture 3:
Deterministic Finite Automata (DFA)
September 8th, 2015
This Week
input
data
computing
device
output
data
What is computation?
What is an algorithm?
How can we mathematically define them?
Lets
15-251
Great Theoretical Ideas in Computer Science
Lecture 6:
Turings Legacy Continues - Undecidability
September 17th, 2015
All languages
?
Decidable languages
Factoring
Regular languages
EvenLength
.
.
0n1n
Primality
.
.
3-Slide Review of Last Lecture
C
15-251
Great Theoretical Ideas in Computer Science
Lecture 2:
On Proofs and Pancakes
September 3rd, 2015
1. What is a proof ?
2. How do you find a proof ?
3. How do you write a proof ?
1. What is a proof ?
2. How do you find a proof ?
3. How do you write
15-251
Great Theoretical Ideas in Computer Science
Lecture 5:
Cantors Legacy
September 15th, 2015
Poll
Select the ones that apply to you:
- I know what an uncountable set means.
- I know Cantors diagonalization argument.
- I used to know what uncountable
15-251
Great Theoretical Ideas in Computer Science
Lecture 1:
Introduction to the course
Instructors:
Ariel Procaccia
Anil Ada
September 1st, 2015
What is theoretical computer science?
What is computer science?
Writing computer programs
that do certain ta
15-251: Great Theoretical Ideas In Computer Science
Recitation 2 Solutions
Announcements
Be sure to start early on homeworks! It will be a smoother experience for all involved (less crowded
office hours are better for you and us!)
Please practice writin
15-251: Great Theoretical Ideas In Computer Science
Recitation 11 Solutions
Announcements
We have a midterm next Wednesday (November 18).
Number theory warm-up
(a) Why is Zn closed under multiplication? (Prove that x, y Zn = xy Zn .)
(b) Prove that for a
15-251: Great Theoretical Ideas In Computer Science
Recitation 3 Solutions
Announcements
Office hours and Piazza are valuable resources. If you arent sure what a question is asking, ask
on Piazza or come to OH. Dont wait until the writing session.
At th
Great Theoretical Ideas In Computer Science
R. ODonnell
D. Sleator
Lecture 6
CS 15-251
February 2, 2012
Spring 2012
Carnegie Mellon University
Mathematical Games II
Sums of Games
+
4 2=6
This is a Brunnian Link, which shows how one loop of
rope and five r
Lecture 14, March 1, Spring 2012
Danny Sleator*
Ryan ODonnell
15-251
Great Theoretical Ideas
in Computer Science
Computing Maximum Matchings
The Stable Marriage Problem
Bipartite Graph
Recall: A graph is bipartite if the nodes V
can be partitioned into tw
15-251: Great Theoretical Ideas in Computer Science
Random Variables
Lecture 11
Probability 2
Definition 1:
A random variable is a variable,
in some randomized code.
Of type real number.
(Better to say its the variables value at
the end of an execution.)
2/7/12
Great Theoretical Ideas In Computer Science
Ryan ODonnell
Danny Sleator *
Lecture 7
CS 15-251
February 7, 2012
Spring 2012
Carnegie Mellon University
Counting I: Choice Trees and
Correspondences
If I have 14 teeth on the top and
12 teeth on the bot
15-251
Great Theoretical Ideas
in Computer Science
Divisibility:
An integer a divides b (written a|b)
if and only if there exists an
Integer c such that c*a = b.
Primes:
A natural number p 2 such that
among all the numbers 1,2p
only 1 and p divide p.
Grea
2/28/12
Ryan ODonnell
Danny Sleator *
15-251
Great Theoretical Ideas in
Computer Science
Graphs II
Lecture 13, February 28, 2012
Cayleys Formula
Recap
A graph is planar if
it can be drawn in the
plane without
crossing edges
The number of labeled trees
on
2/23/12
Graph informal definitions
Graphs I:
Trees and Planar Graphs
Lecture 12 (February 23, 2012)
Danny Sleator
More terms
Cycles
Acyclic
Paths
Connected
The degree of a vertex
Directed: an edge is an ordered pair of vertices
Undirected: edge is unorder
15-251: Great Theoretical Ideas in Computer Science
Lecture 3
Axiomatic Systems
and
Logic
Know this cold.
Part 2: Propositional logic.
Know this cold.
Part 3: First order logic.
Part 1: Axiomatic systems.
Get the basics.
An ATM has $2 bills and $5 bills
W