Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ For this assignment you will be comparing the performance of the four different algorithms for the maximum subsequence sum problem. Here are the details:

C++

For this assignment you will be comparing the performance of the four different algorithms for the maximum subsequence sum problem. Here are the details:

  • Implement the four algorithms (maxSubSum1, maxSubSum2, maxSubSum3, maxSubSum4) from the Weiss textbook (pages 52-58).
  • Write a test driver code which has a main() function that will allow you to (i) load an arbitrary input array from a text file (to be specified as an argument to the program), (ii) run each algorithm on the input array, and (iii) report their respective running times (the timing should not include the initial input load time). Report time in milliseconds.
  • You should test all the four algorithms on varying input sizes: 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192 (increase more as needed to show difference in times). For each size, test on 10 different inputs and use the average of these running times to generate the plot for that input size. If the runtime for some of your codes take a very long time (>1 hour) then there is no need to document or plot the runtime other than note it down as ">1 hour" in your runtime table.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Spatial And Temporal Databases 8th International Symposium Sstd 2003 Santorini Island Greece July 2003 Proceedings Lncs 2750

Authors: Thanasis Hadzilacos ,Yannis Manolopoulos ,John F. Roddick ,Yannis Theodoridis

2003rd Edition

3540405356, 978-3540405351

More Books

Students also viewed these Databases questions