Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

i am in real need of help. i will give thumbs up. please help me with this in C++ language Task 1: Computational Complexity--75 In

image text in transcribed

i am in real need of help. i will give thumbs up. please help me with this in C++ language

Task 1: Computational Complexity--75 In the folder assignment1_codes there are 6 executable codes. These codes represent two different problems, and 3 algorithms of different complexities each of these problems. Running the executables Use the code create_input.cpp to create the input file, input.txt When you run the codes, as in /m1.out, it will automatically read in input.txt You can change the range and the number of entries by giving appropriate parameters to the executable of create_input.cpp This might be a helpful link (https://mycurvefit.com/ 1. Your first task is to fill up this table, (10 points) Problem 1 Problem 2 O(n) O(n) O(nlogin) Function (what does the code do?) 2. Explain how you computed the complexity of each of the source codes. Provide graphs for each executable to support your work (6*5=30 points) 3. Explain how you figured out what the codes do (2410=20 points) 4. Given that we do not know anything about the inputs other than that they are a set of integers what is the best complexity possible for computing problem and problem? a. Give the pseudocode for each problem and the complexity (245=10 points) b. Give an example of an input of length more than 2 that will give the same results for either of the problem. Explain your answer. (5) Task 1: Computational Complexity--75 In the folder assignment1_codes there are 6 executable codes. These codes represent two different problems, and 3 algorithms of different complexities each of these problems. Running the executables Use the code create_input.cpp to create the input file, input.txt When you run the codes, as in /m1.out, it will automatically read in input.txt You can change the range and the number of entries by giving appropriate parameters to the executable of create_input.cpp This might be a helpful link (https://mycurvefit.com/ 1. Your first task is to fill up this table, (10 points) Problem 1 Problem 2 O(n) O(n) O(nlogin) Function (what does the code do?) 2. Explain how you computed the complexity of each of the source codes. Provide graphs for each executable to support your work (6*5=30 points) 3. Explain how you figured out what the codes do (2410=20 points) 4. Given that we do not know anything about the inputs other than that they are a set of integers what is the best complexity possible for computing problem and problem? a. Give the pseudocode for each problem and the complexity (245=10 points) b. Give an example of an input of length more than 2 that will give the same results for either of the problem. Explain your

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

Making Databases Work The Pragmatic Wisdom Of Michael Stonebraker

Authors: Michael L. Brodie

1st Edition

1947487167, 978-1947487161

More Books

Students also viewed these Databases questions

Question

Why do HCMSs exist? Do they change over time?

Answered: 1 week ago