COP 3503H – Spring 2001 – Programming Assignment #1
Points:
This assignment is worth 100 points. [program 60pts – writeup 40 pts]
Due Date:
Thursday February 15, 2001 in class
Objective
In class we discussed three different algorithms, each of different complexity, that solve the
Maximum Contiguous Subsequence Sum problem.
In this first programming assignment
you will implement each of these algorithms [the O(N
3
), O(N
2
), and O(N) versions] and
verify that the BigOh estimates are correct. This will be done by timing the actual running
time of your algorithms and comparing that running time to the theoretically expected value
for that algorithm based upon the size of the input data set.
Note that all of these algorithms
return the MCSS, the starting index, and the ending index, these values must be printed out
as part of your results.
One of your data sets should be an example from the book so that
you can verify your algorithm correctly computes the MCSS.
Generate a total of 5 different
data sets (run each set of data on all three algorithms), one each of size 10, 100, 1000,
10000, 100,000 elements.
Remember that the arrays must contain both positive and
negative numbers!
Submission of the Assignment
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview.
Sign up
to
access the rest of the document.
 Spring '08
 Staff
 Computer Science, Algorithms, hard copy

Click to edit the document details