0% found this document useful (0 votes)
9 views1 page

Assignment 1

assignment

Uploaded by

shashwat garg
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views1 page

Assignment 1

assignment

Uploaded by

shashwat garg
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Meerut Institute of Engineering & Technology, Meerut

ASSIGNMENT-1, Odd Semester, 2024-25

Course: B.Tech. Branch: All


Subject: Design & Analysis of Algorithm Subject Code: BCS- 503
Date Of 23-09-2024 Date Of 30-09-2024
Assigning: Submission:

Note: All problems are of CO-1.


CO-1: Design algorithms, prove them correct, and analyze their asymptotic and absolute runtime and memory
demands.
ccvsv

Note: Attempt any five questions

1. Define the term "algorithm" and discuss its main properties in brief. Also, write down the
steps required to design an algorithm.

2. Order the following expressions by their asymptotic growth, and justify you answer: n^2,
nlogn, n √n, e^n, n, 2^n, 1/n

3. For the factorial function f(n)= n!, we can define both upper and lower bounds, but we
cannot establish a tight Θ (theta) bound. Justify your answer.

4. Write a recursive function to compute xn.

5. Solve the recurrence using Iteration method: T(n) = 3T(n-1) +1; T (0) =1

6. Solve the recurrence using Recursion-Tree method T(n) = 2T(n/2) + n

7. Illustrate the operation of Quick Sort on the array {9,14, 87, 2, 32, 86, 67}. Consider the
last item as a pivot element.

You might also like