Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

7 0 In . C 1 0 : 1 4 AAUP E - Learn... moodle.aaup.edu Algorithms Analysis and Design Assignment 1 Notes: When you send

70 In.
C 10:14
AAUP E-Learn...
moodle.aaup.edu
Algorithms Analysis and Design
Assignment
1
Notes:
When you send the solution of the Assignment mention the HW characterizes of the used device
Insert the applied code before the Tables result.
Use the function that calculate time in the programming language used
Q1: Use Compiler (ex: C++ to create 2(n**n) matrices [A]*
[B]=[C]. Generate A and B randomly as follows:
[A]**[B]
Execution Time
[100**100]**[100**100]
[500**500]**[500**500]
[1000**1000]**[1000**1000]
[2500**2500]**[2500**2500]
[5000**5000]**[5000**5000]
[10000**10000]**[10000**10000]
[20000**20000]**[20000**20000]
Q2: A) Use Compiler (in: C++) to create array A=[dots..n], Generate A randomly as follows, then apply insertion and selection sort for the same generated array:
A=[1dots..n] Insertion sort time Selection sort time
100
500
1000
2500
5000
10000
25000
50000
100000
B) Apply insertion sort to sort the string "algorithm" in alphabetical order
Show each iteration of insertion sort on the string. Find the number of comparisons
Q3: Prove or disprove
5n2+40n+100=O(n2).
n31000=O(n2).
f(n)=i=1ni2. is f(n)=On3?
nk=O2n
i=1nlogi=Onlogn
7n=(9n)
image text in transcribed

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

Database Concepts

Authors: David M Kroenke, David J Auer

6th Edition

0132742926, 978-0132742924

More Books

Students also viewed these Databases questions

Question

How does an applicant apply?

Answered: 1 week ago

Question

Define and explain the goals of employee orientation/onboarding

Answered: 1 week ago