Introduction to Algorithms
Massachusetts Institute of Technology
Professors Erik D. Demaine and Charles E. Leiserson
October 10, 2005
6.046J/18.410J
Handout 13
Problem Set 3 Solutions
Problem 3-1. Pattern Matching
Principal Skinner has a problem: he is ab
MASSACHUSETTS INSTITUTE OF TECHNOLOGY
2.111J/18.435J/ESD.79
Quantum Computation
Problem 1. For the state =
1
n /2
2
2n 1
(1)f (x )
x
1
x =0
g(x ) 2 , where g(x ) is a 1-1
function, find the partial trace 1 tr2 ( ) and calculate
n
+ 1 +
n
.
Solution:
1
=
6.867 Machine learning
Final exam
December 5, 2002
(2 points) Your name and MIT ID:
J Doe, #000
(4 points) The grade you would give to yourself + a brief justi cation:
A or perhaps A- if there are any typos or other errors in the solutions.
Problem 1
We w
6.867 Machine learning
Mid-term exam
October 8, 2003
2 points) Your name and MIT ID:
J. J. Doe, MIT ID# 000000000
Problem 1
In this problem we use sequential active learning to estimate a linear model
y = w1 x + w +
where the input space (x values) are re
Introduction to Algorithms
Massachusetts Institute of Technology
Professors Erik D. Demaine and Charles E. Leiserson
October 7, 2005
6.046J/18.410J
Handout 12
Problem Set 2 Solutions
Problem 2-1. Is this (almost) sorted?
Harry Potter, the child wizard of
Lecture 7
ll-Pairs Shortest Paths II
Supplemental reading in CLRS: Section 25.3
7.1
Johnsons
lgorithm
The FloydWarshall algorithm runs in V 3 time. Recall that, if all edge weights are nonnegative,
then repeated application of Dijkstras algorithm using
Lecture 8
Randomized
lgorithms I
Supplemental reading in CLRS: Chapter 5; Section 9.2
Should we be allowed to write an algorithm whose behavior depends on the outcome of a coin ip?
It turns out that allowing random choices can yield a tremendous improveme
Lecture 6
ll-Pairs Shortest Paths I
Supplemental reading in CLRS: Chapter 25 intro; Section 25.2
6.1
Dynamic Programming
Like the greedy and divide-and-conquer paradigms, dynamic programming is an algorithmic
paradigm in which one solves a problem by comb
Lecture 10
Hashing and
mortization
Supplemental reading in CLRS: Chapter 11; Chapter 17 intro; Section 17.1
10.1
rrays and Hashing
Arrays are very useful. The items in an array are statically addressed, so that inserting, deleting,
and looking up an eleme
Lecture 9
Randomized
lgorithms II
Supplemental reading in CLRS: ppendix C; Section 7.3
After Lecture 8, several students asked whether it was fair to compare randomized algorithms to
deterministic algorithms.
Determistic algorithm:
always outputs the rig
Information Systems in
Organization
STRATEGIC
EXECUTIVE INFORMATION SYSTEMS
TACTICAL
MANAGEMENT INFORMATION SYSTEMS
TRANSACTION PROCESSING SYSTEMS
OPERATIONAL
A
C
C
O
U
N
T
I
N
G
F
I
N
A
N
C
E
H
U
M
A
N
R
E
S
P
R
O
D
U
C
T
I
O
N
S
A
L
E
S
O
T
H
E
R
S
VALU
6.890: Algorithmic Lower Bounds
Fall 2014
Prof. Erik Demaine
Problem Set 2
Due: Wednesday, October 8th, 2014
input 2
Problem 1. The R&D department of IncompeTech, Inc. has been looking into light-based circuits.
In their years of research, theyve develope
Introduction to Algorithms
Massachusetts Institute of Technology
Professors Erik D. Demaine and Charles E. Leiserson
September 30, 2005
6.046J/18.410J
Handout 8
Problem Set 1 Solutions
Problem 1-1. Asymptotic Notation
For each of the following statements,
MASSACHUSETTS INSTITUTE OF TECHNOLOGY
2.111J/18.435J/ESD.79
Quantum Computation
Problem 1. Find a circuit with cn log n gates that gives a good approximation to QFT on n
qubits. (c is a constant.)
Solution:
The circuit in Fig. 5.1 consists of n(n + 1)/ 2
Introduction to Algorithms
Massachusetts Institute of Technology
Professors Erik D. Demaine and Charles E. Leiserson
October 6,2005
6.046J/18.410J
Handout 11
Practice Quiz 1 Solutions
Problem -1. Recurrences
Solve the following recurrences by giving tight
MASSACHUSETTS INSTITUTE OF TECHNOLOGY
2.111J/18.435J/ESD.79
Quantum Computation
Problem 1. Single-qubit X errors can project the codeword 000 + 111 onto one
of the following subspaces: cfw_ 000 , 111 , cfw_ 100 , 011 , cfw_ 010 , 101 , and
cfw_ 001 , 1
Handout 36: Final Exam Solutions
2
Problem 1. Recurrences [15 points] (3 parts)
Give a tight asymptotic upper bound (O notation) on the solution to each of the following recurrences. You need not justify your answers.
(a) T (n) = 2T (n/8) +
Solution:
3
n.