ADA
TUTORIAL-0
Session: May 2020 Subject: Analysis and Design of Algorithms(CSH326B) T & P
TUTORIAL-1
Objective: Students will learn about GROWTH OF FUNCTION.
Blooms Taxonomy Level: BT2, BT3, BT4
1. Show that f(x)=x2 + 2x + 1 is O(x2).
2. Show that f(x)=7x2 is O(x3).
3. Show that n2 is not O(n)
4. Is it true that x3 is O(7x2).
| x2 + 2x + 1 | x2 |
X=1 | 4 | 1 |
X=4 | 25 | 16 |
X=6 | 47 | 36 |
|
|
|
|
|
Note:- All questions are for 10 marks.
1.
Explain all the asymptotic notations with
function and graphs
2.
Analyse bubble sort and insertion sort and state
the difference between then using pseudo code
3.
State the difference between Big-O and Small-O.
Is Big-O a subset of Small-O. Explain using f(n) = 2n^2 + n + n/2+5
4.
What do you understand by divide and conquer.
Can you write a pseudo code for an algorithm based on this technique? Indicate
the best, average and worst time complexity for the pseudo code that you will
write. Also state if this pseudo code is stable or not
5. What are disjoint
sets? How do
you write disjoint sets? Give some
examples of disjoint sets and non-disjoint sets?
Comments
Post a Comment