CSCI-GA.1170-001/002 Fundamental Algorithms
September 29, 2015
Problem Set 4
Lecturer: Yevgeniy Dodis
Due: Tuesday, October 6
Problem 4-1 (Fast k-way Merging)
10 points
Using a min-heap in a clever way, give O(n log k)-time algorithm to merge k sorted arr
Problem Set 7
Assigned: Mar. 26
Due: Apr. 2
Homeworks submitted electronically should be emailed to Rameez Loladia [email protected]
Problem 1.
Consider a B-tree with a branching factor of B implementing a set of size N . Suppose that, at a
particular time w
For Section 3, taught by Prof. Davis
Problem Set 4
Monday, Feb. 20 is Presidents Day, so class will not meet.
Assigned: Feb. 13
Due: Feb. 27
Homeworks submitted electronically should be emailed to Changle Wang [email protected]
Problem 1.
Suppose that you a
CSCI-GA.1170-001/002 Fundamental Algorithms
September 22, 2015
Problem Set 3
Lecturer: Yevgeniy Dodis
Due: Tuesday, September 29
Problem 3-1 (Stock Prot)
10 (+5) Points
Sometimes, computing extra information can lead to more ecient divide-and-conquer algo
CSCI-GA.1170-001/002 Fundamental Algorithms
October 21, 2015
Problem Set 6
Lecturer: Yevgeniy Dodis
Due: Thursday, October 29
Problem 6-1 (Dealing with Repetitions)
15 points
Assume you are given a data structure D which supports the following two operati
CSCI-GA.1170-001/002 Fundamental Algorithms
October 6, 2015
Problem Set 5
Lecturer: Yevgeniy Dodis
Due: Tuesday, October 13
Problem 5-1 (Comparisons)
8 points
Consider a sorted array A of n elements and two integers x and y not in the array, with x y. A
c
Fundamental Algorithms
Sample Final Exam Solutions
Spring 2012
In any of the problems below, you may need not explain any of the standard algorithms or data
structures discussed in class. For example, if you wish to use a 2-3 tree for some problem, you ma
Fundamental Algorithms
Sample Final Exam
Summer 2011
In any of the problems below, you may need not explain any of the standard algorithms or data
structures discussed in class. For example, if you wish to use a 2-3 tree for some problem, you may
simply s
Final Exam: Notes
The nal exam will be Monday May 14, 7:00-9:00, WWH 102. It will be closed book and closed
notes. No electronic devices permitted.
The exam will be cumulative, covering both halves of the course; however, material from the
second half wil
Sample problems for midterm exam
Fundamental Algorithms
March 5, 2012
Problem
Order the following functions in increasing order of order-of-magnitude growth. If two functions
have the same o.m, growth, indicate that.
2n , 2 n , 2n/2 , 2n , n, n3 , (n/2)3
CORE EXAM: ALGORITHMS PART
Department of Computer Science
New York University
May 12, 2000
This is a one and one-half hour examination. It is the Algorithms
part of the Core Exam for the M.S. program in Computer Science.
Write your name on the front of
s
's gu gvv gn y bu Ti h p v y vvn
p y q y p g
g y ) pvgt i u p p! f)h p ge !s y r Bh e ' qe 5'u f8p g's x 'u 5p 58t
q u
y pn
f i fe e y p y f v
p qu p p p vv gn y qwgu Ti g h p y vv gn y q
g
y
p g
pvgu i u p pg gkh p e !nQs y r th ge qe e5u p !'s x
Problem Set 2
Assigned: Jan. 30
Due: Feb. 6
Please email solutions to Changle Wang <[email protected]>.
Problem 1
(This problem was postponed from problem set 1 and has been slightly modied.) Consider the
following problem. You are given an array A of disti
Problem Set 3
Assigned: Feb. 6
Due: Feb. 13
Problem 1.
Suppose that you are given the problem of returning in sorted order the k smallest elements in an
array of size n, where k is much smaller than log(n), but much larger than 1.
a. Describe how selectio
Problem Set 5
Assigned: Feb. 27
Due: Mar. 5
Homeworks submitted electronically should be emailed to Rameez Loladia [email protected]
Problem 1.
(Siegel 5.23) Consider the following sorting problem. The input is a sequence of n integers with
many duplications
Problem Set 8
Assigned: Apr. 2
Due: Apr. 9
Homeworks submitted electronically should be emailed to Changle Wang [email protected]
Problem 1.
Let G be a DAG. A vertex in G is a sink if it has no outarcs. A forward path from vertex U is a
path that ends in a
Problem Set 8
Assigned: April 9
Due: April 16
Problem 1
Trace the execution of Dijkstras algorithm on the following graph, taking A as the starting vertex.
Show the successive states of the array D[i] and of the set of vertices whose distance has been
det
Problem Set 10
Assigned: April 16
Due: April 23
Problem 1
A. Trace the execution of Prims algorithm in nding the minimum spannning tree for the graph
below. Show the sequence in which edges are added to the tree, and the successive values of
the array D[v
Problem Set 11
Assigned: April 23
Due: April 30
Problem 1
(Siegel Ex. 11.39). Let A[1 . . . n, 1 . . . n] be an n n array of signed numbers. Find the rectangular
subarray with the largest sum of elements. A trivial solution is just to consider all (n4 ) r
` fT w U u U W ` fY Y` Y f r U r i ` w Y UT fT a hT Y f U T` wT S a f a h
sYVa4XTwVXTIgRVTeqa7srbX7kRoXVqYXbV7srvXT7VYV7s`vXbVT
YY` q z ` w fTY edY` a Y SY T h n Y u f YY` f W Sa T h nx Y u f T` wT Sa f a hT x T e r
7srfkvRV7h~7b ~vsa~7sr7bx ~vsaYV7s`iqVh
CORE EXAMINATION
Department of Computer Science
New York University
January 22, 1999
This is the common examination for the M.S. program in CS. It covers
core computer science topics: Languages and Compilers, Operating Systems,
and Algorithms. The exam ha
Homework 1
Fundamental Algorithms, Spring 2012, Professor Davis
Assigned: Jan. 23
Due: Jan 30, in class.
INSTRUCTIONS:
Remember that we have a no late homework policy. Special permission must be obtained
in advance if you have a valid reason.
Please rea