0% found this document useful (0 votes)
73 views2 pages

DAA Assignment 2

This document is an assignment for the Design and Analysis of Algorithms course at Shaheed Zulfikar Ali Bhutto Institute of Science & Technology. It includes submission guidelines, instructions for answering questions, and specific problems related to algorithm analysis. Students are required to submit a handwritten assignment, adhere to academic integrity, and provide answers to three questions regarding algorithm complexity and performance comparison.

Uploaded by

sas798711
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)
73 views2 pages

DAA Assignment 2

This document is an assignment for the Design and Analysis of Algorithms course at Shaheed Zulfikar Ali Bhutto Institute of Science & Technology. It includes submission guidelines, instructions for answering questions, and specific problems related to algorithm analysis. Students are required to submit a handwritten assignment, adhere to academic integrity, and provide answers to three questions regarding algorithm complexity and performance comparison.

Uploaded by

sas798711
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/ 2

Shaheed Zulfikar Ali Bhutto Institute of Science & Technology

COMPUTER SCIENCE DEPARTMENT

Total Marks: 04

Obtained Marks:

Design and Analysis of


Algorithm
Assignment # 02

Submitted To: Mr. Rana Faisal Hayat


_____________________________________________________________________________________________________________________________________________________________________________________________________________________________________

Student Name: ______________________________________________________________________________________________________________________________________________________________________________________________________________________________________

Reg. Number:
______________________________________________________________________________________________________________________________________________________________________________________________________________________________________

DAA BSCS-4 SZABIST-ISB


Shaheed Zulfikar Ali Bhutto Institute of Science & Technology

COMPUTER SCIENCE DEPARTMENT

Instructions: Submission Guidelines:

1. Your assignment should be in handwritten form and on white


page.
2. Each question should be answered separately and clearly labelled.
3. Use appropriate citations and references if you consult external sources.
4. Ensure that your answers are well-structured and free from spelling and grammatical
errors.
5. Plagiarism will not be tolerated. Please make sure your answers are in your own words,
and any external sources are properly cited.
6. Copied or shown assignments will be marked zero.
7. Late submissions are not entertained in any case.
8. Scan it and make PDF and submit online.

Q1. Give the O(f(n)) for the following.


a. f(n) = n3+n2+sin(n)
b. f(n) = n(n2+1)(n-5)
c. f(n) = (n log n+1)(n2+n+1)
Q2. Make a table for n=1 to 10 and generate a table to show how the following
functions grow. If the values go very high, using the table, determine which function
grows faster.
a. n log n
b. n2
c. log(n+1)
d. 15 log n
e. 32n

Q3. Two algorithms, A and B have running time 100n2 and 2n respectively, on the
same machine. Find the smallest value of n for which A beats B.

DAA BSCS-4 SZABIST-ISB

You might also like