Question: 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

 2.1 [15 points] Design an algorithm with O(nlogn)-time complexity to find

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!