Instructions:
The questions are divided into three groups. You have to answer all questions in Groups 1
and 2 and exactly two questions in Group 3. In the above table, put check marks in the
small boxes beside the ques
Dalhousie University
CSCI 3110 Design and Analysis of Algorithms I
Summer 2016
Solutions to Assignment 4
Please Note: These solutions are for students in the Summer 2016 version of
CSCI 3110 only. They may not be photocopied or distributed in any way, inc
Instructions:
The questions are divided into three groups. You have to answer all questions in Groups 1
and 2 and exactly two questions in Group 3. In the above table, put check marks in the
small boxes beside the ques
CSCI 3110 Assignment 8 Solutions
1. You are given a string of n characters s[1 . . . n], which you believe to be a corrupted
text document in which all punctuation has vanished (so that it looks something like
itwasthebestoftimes. . . ). You wish to recon
Ques. For the given dataset of e-commerce domain, you need to devise weighted ranking algorithm
for given products (defined by product_id) and come up with 5 top products based on assumption that
profit for company is primary objective. Please summarize y
Dalhousie University
CSCI 3110 Design and Analysis of Algorithms I
Fall 2017
Assignment 3
Distributed Thursday, September 28 2017.
Due 5:00PM, Thursday, October 5 2017.
Instructions:
1. Before starting to work on the assignment, make sure that you have re
Dalhousie University
CSCI 3110 Design and Analysis of Algorithms I
Fall 2017
Assignment 1
Distributed Thursday, September 14 2017.
Due 5:00PM, Thursday, September 21 2017.
Instructions:
1. Before starting to work on the assignment, make sure that you have
Assignment 5
CSCI 3110: Design and Analysis of Algorithms
Due Jun 15, 2015
Banner ID:
Name:
Banner ID:
Name:
Banner ID:
Name:
Assignments are due on the due date before class and have to include this cover page. Plagiarism in assignment answers will
not b
Assignment 6
CSCI 3110: Design and Analysis of Algorithms
Due June 22, 2015
Banner ID:
Name:
Banner ID:
Name:
Banner ID:
Name:
Assignments are due on the due date before class and have to include this cover page. Plagiarism in assignment answers will
not
Dalhousie University
CSCI 3110 Design and Analysis of Algorithms I
Fall 2017
Assignment 2
Distributed Thursday, September 21 2017.
Due 5:00PM, Thursday, September 28 2017.
Instructions:
1. Before starting to work on the assignment, make sure that you have
Assignment 10
Sample Solution
CSCI 3110 Fall 2015
Consider a point p = (x p , y p ) and a segment s = (x 1 , y)(x 2 , y). We say that segment s dominates point
p if y > y p and x 1 x p x 2 . Then our goal is to find for every point pi P, the segment s j S
Dalhousie University
CSCI 3110 Design and Analysis of Algorithms I
Summer 2016
Solutions to Assignment 1
Please Note: These solutions are for students in the Summer 2016 version of
CSCI 3110 only. They may not be photocopied or distributed in any way, inc
Dalhousie University
CSCI 3110 Design and Analysis of Algorithms I
Summer 2016
Assignment 3
Please Note: These solutions are for students in the Summer 2016 version of
CSCI 3110 only. They may not be photocopied or distributed in any way, including electr
Dalhousie University
CSCI 3110 Design and Analysis of Algorithms I
Summer 2016
Solutions to Assignment 5
Please Note: These solutions are for students in the Summer 2016 version of
CSCI 3110 only. They may not be photocopied or distributed in any way, inc
Dalhousie University
CSCI 3110 Design and Analysis of Algorithms I
Summer 2016
Solutions to Assignment 6
Please Note: These solutions are for students in the Summer 2016 version of
CSCI 3110 only. They may not be photocopied or distributed in any way, inc
Dalhousie University
CSCI 3110 Design and Analysis of Algorithms I
Summer 2016
Solutions to Assignment 2
Please Note: These solutions are for students in the Summer 2016 version of
CSCI 3110 only. They may not be photocopied or distributed in any way, inc
Dalhousie University
CSCI 3110 Design and Analysis of Algorithms I
Summer 2016
Solutions to Assignment 7
Please Note: These solutions are for students in the Summer 2016 version of
CSCI 3110 only. They may not be photocopied or distributed in any way, inc
Banner number:
Name:
Midterm Exam
CSCI 3110: Design and Analysis of Algorithms
October 30, 2015
Group 1
Group 2
Group 3
Question 1.1
Question 2.1
Question 3.1
Question 1.2
Question 2.2
Question 3.2
P
P
P
P
Instructions:
The questions are divided into thr
Assignment 9
Sample Solutions
CSCI 3110 Fall 2015
The data structure.
We take a Rank-Select Tree as a starting point, but instead of maintaining the
elements in sorted order, we ensure that the elements of S are stored in the leaves of the tree sorted
fro
Assignment 3
CSCI 3110: Design and Analysis of Algorithms
Due June 5, 2015
Banner ID:
Name:
Banner ID:
Name:
Banner ID:
Name:
Assignments are due on the due date before class and have to include this cover page. Plagiarism in assignment answers will
not b
Assignment 7
CSCI 3110: Design and Analysis of Algorithms
Due July 6, 2015
Banner ID:
Name:
Banner ID:
Name:
Banner ID:
Name:
Assignments are due on the due date before class and have to include this cover page. Plagiarism in assignment answers will
not b
Assignment 9
CSCI 3110: Design and Analysis of Algorithms
Due July 20, 2015
Banner ID:
Name:
Banner ID:
Name:
Banner ID:
Name:
Assignments are due on the due date before class and have to include this cover page. Plagiarism in assignment answers will
not
Assignment 3
CSCI 3110: Design and Analysis of Algorithms
Due May 29, 2015
Banner ID:
Name:
Banner ID:
Name:
Banner ID:
Name:
Assignments are due on the due date before class and have to include this cover page. Plagiarism in assignment answers will
not b
Assignment 2
CSCI 3110: Design and Analysis of Algorithms
Due May 25, 2015
Banner ID:
Name:
Banner ID:
Name:
Banner ID:
Name:
Assignments are due on the due date before class and have to include this cover page. Plagiarism in assignment answers will
not b
Assignment 1
CSCI 3110: Design and Analysis of Algorithms
Due May 15, 2015
Banner ID:
Name:
Banner ID:
Name:
Banner ID:
Name:
Assignments are due on the due date before class and have to include this cover page. Plagiarism in assignment answers will
not b
Sample Solution
Assignment 8
CSCI 3110 Summer 2015
I present two solutions here, one based on answering part (a), nding the set H, and then testing for
each element in H whether it is a heavy hitter; the other based on a much more direct approach. As it
t
Sample Solutions
Assigment 9
CSCI 3110 Summer 2015
a. As stated in the assignment, we represent a reghting strategy as a set S of pairs (i, v) such that we
place a reghter on node v in turn i. To develop a recurrence, we observe the following optimal
subs
Sample Solution
Assignment 10
CSCI 3110 Summer 2015
In 2-d, dominance reporting is a special case of 3-sided range reporting: A data structure that can answer
3-sided range queries with query ranges [l, r] [b, ) can easily be adapted to answer range queri
Sample Solutions
Assigment 6
CSCI 3110 Summer 2015
Heres the general strategy. Let S0 be the set of intervals not yet covered by intervals in S . Since
initially S = , we have S0 = S. Now we repeat the following procedure until S0 is empty, that is,
all i
Sample Solutions
Assignment 7
CSCI 3110 Summer 2015
Question 1
(a) T (n) = 8T (n/2) + n2 . In the language of the Master Theorem, a = 8, b = 2, so log b a = log2 8 = 3.
f (n) = n2 = nlog2 8 for
= log2 8 2 > 0. Thus, T (n) (nlog2 8 ) = (n3 ).
(b) T (n) = 3