15-451 Midterm Practice Exam
Page 1 of 9
15-451 Algorithms
Name:
Andrew ID:
Recitation:
Instructions
Fill in the box above with your name, your Andrew ID, and your section.
You are allowed to use one page of (written by hand) notes.
Clearly mark your a

15-451 Midterm Practice Exam
Page 1 of 9
15-451 Algorithms
Name:
Andrew ID:
Recitation:
Instructions
Fill in the box above with your name, your Andrew ID, and your section.
You are allowed to use one page of (written by hand) notes.
Clearly mark your a

15-451 Midterm Practice Exam
Page 1 of 6
15-451 Algorithms
Name:
Andrew ID:
Recitation:
Instructions
Fill in the box above with your name, your Andrew ID, and your section.
You are allowed to use one page of (written by hand) notes.
Clearly mark your a

15-451 Midterm Practice Exam
Page 1 of 6
15-451 Algorithms
Name:
Andrew ID:
Recitation:
Instructions
Fill in the box above with your name, your Andrew ID, and your section.
You are allowed to use one page of (written by hand) notes.
Clearly mark your a

Algorithm Design and Analysis
Victor Adamchik
Lecture 8
CS 15-451
Feb 09, 2015
Spring 2015
Carnegie Mellon University
Graph Algorithms
DFS
Topological Sorting
Classification of Edges
Biconnected Components
Strongly Connected Components
Graphs Traversal
Gr

Algorithm Design and Analysis
Victor Adamchik
CS 15-451
Lecture 12
Feb 25, 2015
Spring 2015
Carnegie Mellon University
The MAX Flow Problem
Plan:
The Ford-Fulkerson algorithm
The Edmonds-Karp algorithm
The Flow Problem
2
s
2
1
1
1
1
3
5
3
1
t
2
Goal: Find

15-451 Algorithms, Spring 2015
Homework # 8
Due: Apr. 9 11:59pm
Your homework should be submitted as a single PDF le using autolab. You are allowed
to work in groups of 2-3, but you must not share written work, and must write your solutions
yourself. Plea

15-451 Algorithms, Spring 2015
Homework # 4
Due: Feb. 12 11:59pm
Your homework should be submitted as a single PDF le using autolab. You are allowed
to work in groups of 2-3, but you must not share written work, and must write your solutions
yourself. Ple

15-451 Algorithms, Spring 2015
Homework # 4
Due: Mar. 5 11:59pm
Your homework should be submitted as a single PDF le using autolab. You are allowed
to work in groups of 2-3, but you must not share written work, and must write your solutions
yourself. Plea

15-451 Algorithms, Spring 2015
Homework 7 (100 pts)
Due: March 26 - 29
oral presentation
Ground rules:
This is an oral presentation assignment. You should work in groups of two or three.
At some point your group should sign up for a 1-hour time slot on t

15-451 Algorithms, Spring 2015
Homework # 1
Due: Jan. 22 11:59pm
Your homework should be submitted as a single PDF le using autolab. You are allowed
to work in groups of 2-3, but you must not share written work, and must write your solutions
yourself. Ple

15-451 Algorithms, Spring 2015
Recitation # 3
Jan. 27, 2015
1. Independent Set on a Tree
Recall the problem statement for independent set: Given an undirected graph, G, nd
the largest set of vertices, I V , such that no edges go between two vertices in I.

Splay Trees
Whats a splay tree?
A splay tree is a binary search tree where we adjust the tree structure after every access in order to
move the accessed element to the top. This is done by repeatedly performing a series of rotations to the
element and its

15-451 Algorithms, Spring 2015
Homework # 5
Oral Presentations: Feb. 19-22
This is an oral presentation assignment. You should work in groups of three. Soon
we will post a signup sheet linked o the course web page. At some point your group
should sign up

Algorithm Design and Analysis
Victor Adamchik
CS 15-451
Lecture 2
Jan 14, 2015
Outline
Spring 2015
Carnegie Mellon University
Strassens Algorithm
Polynomial Multiplication
1) Strassens Algorithm
2) Karatsuba for Polynomials
3) Legendres Interpolation
2) V

15-451/651: Design & Analysis of Algorithms
Dynamic Programming I
January 26, 2015
last changed: January 28, 2015
Dynamic Programming is a powerful technique that allows one to solve many dierent types of
problems in time O(n2 ) or O(n3 ) for which a naiv

15-251: Great Theoretical Ideas in Computer Science
Lecture 29
Why Max-Cut is my
favorite problem
Have 2 cupcakes.
(a TCS tale)
Faculty Course Evaluations
Unlike in other lectures,
I dont necessarily expect you
to understand everything today.
https:/cmu.s

15-251: Great Theoretical Ideas in Computer Science
Lecture 25
Quantum Computation
!
WARNING
I DO NOT KNOW ANYTHING ABOUT PHYSICS.
Image: Centre for Quantum Photonics
Let me tell you about a certain scientific theory.
SERIOUSLY.
Its a bit hard to do direc

15-251: Great Theoretical Ideas in Computer Science
Lecture 11
Graph Algorithms
L.F.O.A.
Lecture Full Of Acronyms
The most basic graph algorithms:
Graph Search Algorithms
Given a graph G = (V,E)
BFS:
Breadth-first search
DFS:
Depth-first search
AFS:
Arbit

15-251
Great Theoretical Ideas in
Computer Science
Introduction to Computational Complexity III:
Space Complexity and Circuit Complexity
February 10th, 2015
Todays Menu
Space complexity
Circuit complexity
Space Complexity
How should we define space comple

15-251: Great Theoretical Ideas in Computer Science
Lecture 5
Turings Legacy
What is computation?
What is an algorithm?
How can we mathematically define them?
How does the definition affect which
computational problems are solvable?
Problem: A mapping of

15-251
Great Theoretical Ideas in
Computer Science
Proofs: A computational lens
April 23, 2015
First there was GORM
Pythagorass Theorem:
2
2
a +b =c
Proof:
2
2
(a + b) = a + 2ab + b
Looks legit.
2
2
Then there was Russell
Principia Mathematica
Volume 2
Ru

15-251
Great Theoretical Ideas in
Computer Science
Life After 15-251
April 28, 2015
Goals (from lecture 1)
1. Learn about the theoretical foundations of computation
2. Learn the basic math topics, i.e. the language
3. Become better at reasoning abstractly

15-251
Great Theoretical Ideas in
Computer Science
Markov Chains
April 9, 2015
A day in the life of me
9:00am
Work
f (x) =
X
S[n]
fb(S)
S (x)
A day in the life of me
9:01am
Work
f (x) =
X
S[n]
fb(S)
S (x)
60%
Surf
40%
A day in the life of me
9:02am
Work
f

15-251
Great Theoretical Ideas in
Computer Science
Introduction to Computational Complexity II
February 5th, 2015
Kurt Friedrich Gdel (1906-1978)
Logician, mathematician, philosopher.
Considered to be one of the most
important logicians in history.
Great

15-251
Great Theoretical Ideas in
Computer Science
Uncountability and Uncomputability
January 29th, 2015
Our heros for this lecture
father of set theory
1845-1918
Uncountability
father of computer science
1912-1954
Uncomputability
Our heros for this lectu

15-251
Great Theoretical Ideas in
Computer Science
Introduction to Computational Complexity I
February 3rd, 2015
Reminder
Midterm 1
February 11th, 18:30 - 21:30
Covers Lectures 1-6 (first 3 homeworks)
What have we done so far?
> Introduction to the course

Great Theoretical Ideas in
Computer Science
Communication Complexity
April 21, 2015
What are the limitat ions to what com puters can learn?
Do certain m a thematical theorems have short proofs?
C an quantum mechanics be exploited to spe e d up c om putati

15-251: Great Theoretical Ideas in Computer Science
Lecture 23
Linear algebra is about vectors.
Linear Algebra
Concretely, vectors look like this:
They are arrays of numbers.
fig. by Peter Dodds
# of numbers, n, is called the dimension.
In linear algebra,