CSL 356, Problem Sheet 4
1. If S (n) is the space bound of skip list of n elements, prove that P rob[S (n) cn] 1 1/2n for some
constant c.
2. A dart game Imagine that an observer is standing at the origin of a real line and throwing n darts
at random loca
Solutions for Tutorial Sheet 3
Arindam Pal ([email protected])
September 22, 2007
Problem 1
Consider a single phase where n UNION operations are followed by m
FIND operations. UNION operations cost O(1), so after the rst phase
we have some trees
Solutions for Tutorial Sheet 1
Arindam Pal ([email protected])
August 28, 2007
1
Problem 3
A k-way merge can be done in the following ways.
A. Merge the k sequences pairwise in a binary tree structure. Time
complexity is O(n log k), since at ever
CMPUT 204 Tutorial #11
Question
Second-best minimum spanning tree
Let G = (V, E ) be an undirected, connected graph with weight function w, and suppose
that |E | |V | and all edge weights are distinct.
A second-best minimum spanning tree is dened as follo
CSC373
Algorithm Design and Analysis, Fall 2010
Cell Phone Tower Placement Problem
Example for Greedy Algorithm Design and Correctness Proof
Placing Cell Phone Towers. Suppose there is a long straight country road, with n houses sparsely scattered
along t
A quick refresher for Counting techniques and
Probability1
Sandeep Sen2
August 1, 2007
1
2 Department
of Computer Science and Engineering, IIT Delhi, New Delhi 110016, India.
E-mail:[email protected]
Contents
1 Preliminaries
1.1 Relations and Functio
CSL 356 Analysis and Design of Algorithms
Practice problems with solutions
Try to solve on your own before you consult the solutions.
1. We are given a function yi = f (xi ) such that the function monotonically decreases between x1 to xk for k n
and then
CSL 356 Algorithm Design and Analysis
Major, Sem I 2007-08, Max 90, Time 2 hrs
Entry No.
Name
Group
Note Every algorithm must be accompanied by proof of correctness, time and space complexity.
You can however quote any result covered in the lectures witho
Solutions for Tutorial Sheet 5
November 24, 2007
Problem 1
You are required to output the coecient representation of the polynomial,
not just a product of factors. Therefore, you must explicitly compute the
numerators of each term in the Lagranges interpo
Solutions for Tutorial Sheet 4
Arindam Pal ([email protected])
October 4, 2007
Problem 2
(i) Since the darts are thrown at random among the rst i + 1 darts, any of
them can be the closest one. The probability that the i + 1th is the closest
1
is
CSL 356, Tutorial Sheet 5
1. Show how to implement Lagranges interpolation formula in O(n2 ) operations.
2. Describe an ecient algorithm to evaluate a degree n univariate polynomial P (x) at n arbitrary
points x1 , x2 . . . xn (not necessarily roots of un
Name
CSL 630 Data Structures and Algorithms
Minor 2, Sem I 2012-13, Max 40, Time 1 hr
Entry No.
Group
Note Write in the space provided below the question including back of the page.
Every algorithm must be accompanied by a proof of correctness, time and s