Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2.1 [15 points] Design an algorithm with O(nlogn)-time complexity to find the longest monotonically increasing subsequence of n numbers Write your pseudocode in the following

image text in transcribed

2.1 [15 points] Design an algorithm with O(nlogn)-time complexity to find the longest monotonically increasing subsequence of n numbers Write your pseudocode in the following format. Explain why your algorithm is O(nlogn) - e.g. Which line takes O(n) and which line takes O(logn) eto. Algorithm Longest-Mono-Increasing-SubseQ-VER2 Input Output Line 1 Line 2: Line 3: Line 4: 2.2 [10 points] Implement your algorithm in a programming language of your choice 2.3 [5 points] Show 5 randomly generated lists of 10 elements and the result returned by your algorithm 2.4 [5 points] Use the randomly generated 100 lists of 10 elements in your Question 1, compare the total time used for this algorithm with that of the algorithm Longest-Mono-Increasing-SubseQ-VER1 2.3 [5 points] Use the randomly generated 100 lists of 100 elements in your Question 1, compare the time used for this algorithm with that of the algorithm Longest-Mono-Increasing-SubseQ-VER1 2.4 [5 points] Use the randomly generated 100 lists of 104 elements in your Question 1, compare the time used for this algorithm with that of the algorithm Longest-Mono-Increasing-SubseQ-VER1 2.5 [5 points] Use the randomly generated 100 lists of 10s elements in your Question 1, compare the time used for this algorithm with that of the algorithm Longest-Mono-Increasing-SubseQ-VER1. If your computer runs out of memory, please state so 2.1 [15 points] Design an algorithm with O(nlogn)-time complexity to find the longest monotonically increasing subsequence of n numbers Write your pseudocode in the following format. Explain why your algorithm is O(nlogn) - e.g. Which line takes O(n) and which line takes O(logn) eto. Algorithm Longest-Mono-Increasing-SubseQ-VER2 Input Output Line 1 Line 2: Line 3: Line 4: 2.2 [10 points] Implement your algorithm in a programming language of your choice 2.3 [5 points] Show 5 randomly generated lists of 10 elements and the result returned by your algorithm 2.4 [5 points] Use the randomly generated 100 lists of 10 elements in your Question 1, compare the total time used for this algorithm with that of the algorithm Longest-Mono-Increasing-SubseQ-VER1 2.3 [5 points] Use the randomly generated 100 lists of 100 elements in your Question 1, compare the time used for this algorithm with that of the algorithm Longest-Mono-Increasing-SubseQ-VER1 2.4 [5 points] Use the randomly generated 100 lists of 104 elements in your Question 1, compare the time used for this algorithm with that of the algorithm Longest-Mono-Increasing-SubseQ-VER1 2.5 [5 points] Use the randomly generated 100 lists of 10s elements in your Question 1, compare the time used for this algorithm with that of the algorithm Longest-Mono-Increasing-SubseQ-VER1. If your computer runs out of memory, please state so

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_2

Step: 3

blur-text-image_3

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

Database Management System MCQs Multiple Choice Questions And Answers

Authors: Arshad Iqbal

1st Edition

1073328554, 978-1073328550

More Books

Students also viewed these Databases questions

Question

Compute a 75% Chebyshev interval centered on the mean.

Answered: 1 week ago

Question

Communicate with diverse populations.

Answered: 1 week ago

Question

1-4 How will MIS help my career?

Answered: 1 week ago