Basic Algorithms (V22.0310); Fall 2005; Yap
MIDTERM (with SOLUTION)
Oct 17, 2005
Instructions
You are allowed one 8x11 sheet of notes.
Do all quesions. Start each question on its own page.
Read carefully, think deeply and write sparsely.
Only write on

Basic Algorithms (V22.0310); Fall 2005; Yap
HOMEWORK 2
Date Due: Oct 5
Question 1
(10 Points)
Do Problem 2, Chapter 2 (p.67). Finding the biggest input size you can solve within an hour, for various
running times.
Question 2
(10 Points)
Do Problem 4, Chap

Homework 2 Solutions
Chris Wu
The following solution were prepared by me (Chris), so if you nd a typos email me at
wu@cs.nyu.edu and not the professor. One comment is that these solutions are complete
and contain many steps that are written for explanator

Basic Algorithms (V22.0310); Fall 2005; Yap
HOMEWORK 1
Date Due: Sep 21
Instructions
Please read our homework policy under Course Information, in class homepage.
There are two ways to submit homeworks:
(1) Non-programs must be handed in as hardcopies. T

Basic Algorithms (V22.0310); Fall 2005; Yap
HOMEWORK 4
Date Due: Nov 7
Instructions
Please write CLEARLY. If you have bad handwriting, please consider printing your solutions.
Be concise, but not obscure.
Question 1
(20+5+5 Points)
Question 5, page 190.

Homework 4 Solutions
Chris Wu
The following solution were prepared by me (Chris), so if you nd a typos email me at
wu@cs.nyu.edu and not the professor. One comment is that these solutions are complete
and contain many steps that are written for explanator

rnlag ins
om CG-Ll: W J) EQ-S_
....._ . CL?
____m>%_e=;,____amv_kg¢ 5* _,: N am. .
at. L L -" L o LII-.5 X {in
Q. 12 .-.Jl .2. mm: cML Aunt L2 ' oi
(AL-Lu. LE L. use: £hI7
:..n.. manor Ls-u. [can't but. I.
r-u. nsr o Measaun',
HWA
S

Homework 5 Solutions
Chris Wu
The following solution were prepared by me (Chris), so if you nd a typos email me at
wu@cs.nyu.edu and not the professor. One comment is that these solutions are complete
and contain many steps that are written for explanator

Basic Algorithms (V22.0310); Fall 2005; Yap
HOMEWORK 5
Date Due: Wed Nov 23
Instructions
Please write clearly. If you have poor handwriting, please consider printing your solutions. WE
CANNOT GRADE WHAT WE CANT READ.
Please start early, especially since

Basic Algorithms (V22.0310); Fall 2005; Yap
HOMEWORK 1
Date Due: Sep 21
SOLUTIONS to HW1
1
Question 1
(5 points) Please do Exercise 1, page 23, chapter 1. True or false: In every
instance of the Stable Matching Problem, there is a stable matching containi

Chapter 0 Homework
Florence Lu
1.1 In each of the following situations, indicate whether
case
a)
f =O( g) or f =(g) , or both (in which
f =( g) ).
f (n)
g(n)
n100
n200
Solution
f =( g)
O(n)
f =O( g)
b)
c)
1 /2
n
100 n+log n
n
2 /3
1 2
<
2 3
f =( g)
n+ ( l

Homework 3 Solutions
Chris Wu
The following solution were prepared by me (Chris), so if you nd a typos email me at
wu@cs.nyu.edu and not the professor. One comment is that these solutions are complete
and contain many steps that are written for explanator

Basic Algorithms (V22.0310); Fall 2005; Yap
HOMEWORK 3
Date Due: Oct 12
Instructions
For Chapter 4, we want you to begin by reading sections 4.4 and 4.5 (these are about shortest paths
and minimum spanning trees, respectively).
Question 1
(10 Points)
(a)

Basic Algorithms, Sample Final, Spring 2014
Answer all questions on these sheets. The blue books are for scrap work, or if you run out
of space on the answer sheet.
Name
NYU ID
1. This question concerns 23 trees.
a. 2 pts. What are the guides at the root

@
AW
l . l
a => I. w»
_II
V "
wk; 53} a. maummuh. ,
H {as am. am kg:
1*W}()L5 1 sL-nm. u in EC
Dalsh Lad '- 'H-Mhu-I. : M
mnu 3: [watt .1 IM-s C'JJO
Nun'rk k 5cm hllmh 5 man}: {in mangg
non-é. lxk' Lu: ('k t- Cu-M.)
in ON- L. My. =

Basic Algorithms (V22.0310); Fall 2005; Yap
QUIZ TWO (with SOLUTION)
Dec 5, 2005
Instructions
Please read questions carefully. When in doubt, ask!
Answer all questions.
Write answers ONLY on the right-hand side of every double page.
Use the left-hand s

Basic Algorithms (V22.0310); Fall 2005; Yap
STUDY QUESTION (with SOLUTION)
Nov 30, 2005
Instructions
Please study these questions carefully.
They are designed to help you prepare for Quiz 2.
They will form the basis for some questions in Quiz 2 (but I

Basic Algorithms (V22.0310); Fall 2005; Yap
STUDY QUESTIONS for FINAL EXAM (with HINT)
Dec 14, 2005
Instructions
Please study these questions and hints carefully.
They are designed to help you prepare for the FINAL EXAM.
They will form the basis for so

Basic Algorithms, Sample Midterm, Spring 2014
Answer all questions on these sheets. The blue books are for scrap work, or if you run out
of space on the answer sheet.
Name
NYU ID
1. For each pair of functions, circle the one that grows to be the asymptoti

Basic Algorithms (V22.0310); Fall 2005; Yap
QUIZ ONE (with SOLUTION)
Oct 12, 2005
Instructions
Please questions carefully.
1
Question 1
Find the pairs of statements that are contra-positives of each other (recall that
contra-positive statements are equiv