Compsci related math question | Computer Science homework help

Department of Computer Science CompSci 220 (2013 S2C) Assignment 1: Algorithm Analysis Due: 2013-08-08 Give full details of your argument. Questions 1. (30 marks) Suppose that you have to choose between three algorithms A1;A2 and A3 for a given problem. The worst-case running time for each algorithm is given by W1(n) = 100n; W2(n) = 2n log10 n; W3(n) = 0:1n2: Answer the following questions, explaining your assumptions and possible limitations of your analysis. (a) Order the algorithms from fastest to slowest in the sense of asymptotic worst-case running time. (b) Suppose that we run each algorithm on a large problem instance of size n. Then we feed in an input of size 100n and re-run the algorithms on the new input. What would you expect to happen to the running times, and why? (c) Suppose that hardware limitations mean that your algorithm can only accept input of size at most 106. Which algorithm would you prefer, and why? Answer the same question with 106 replaced by 103. (d) For which problem sizes is A1 the best algorithm to use? Answer the same question for A2 and then for A3. (e) Suppose that we have 109 time units available. What is the maximum input size that can be processed by each of the algorithms in that time? 2. (20 marks) Formally show that 0:1n + 10pn is not O(pn) using the denition of O only. 3. (25 marks) Consider the obvious algorithm for checking whether a list of integers is sorted: start at the beginning of the list, and scan along until we rst nd a successive pair of elements that is out of order. In that case, return false. If no such pair is found by the time we reach the end of the list, return true. Our elementary operation is a comparison between two integers. (a) What is the worst case running time of this algorithm on an input list containing n elements? Write all 5-element input lists which contain the numbers 1; 2; 3; 4; 5 and yield the worst case. (b) What is the best case running time of this algorithm on an input list with n…







Place your order
(550 words)

Approximate price: $22

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more

Get 15% OFF on your FIRST order. Use the coupon code: new15