0% found this document useful (0 votes)
174 views6 pages

Kadi Sarva Vishwavidyalaya: LDRP Institute of Technology and Research Gandhinagar

This document is a laboratory manual for the course Design and Analysis of Algorithms. It contains 13 experiments on data structures and sorting algorithms. Experiment 2 explains Big-O and Big-Omega notations and provides examples of functions with their time complexities analyzed using these notations. The experiment solutions span 4 pages and include examples like n=O(n) and 100n+5=O(n^2). The conclusion restates what was learned about analyzing asymptotic time complexities.

Uploaded by

Dhrumil Dancer
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
174 views6 pages

Kadi Sarva Vishwavidyalaya: LDRP Institute of Technology and Research Gandhinagar

This document is a laboratory manual for the course Design and Analysis of Algorithms. It contains 13 experiments on data structures and sorting algorithms. Experiment 2 explains Big-O and Big-Omega notations and provides examples of functions with their time complexities analyzed using these notations. The experiment solutions span 4 pages and include examples like n=O(n) and 100n+5=O(n^2). The conclusion restates what was learned about analyzing asymptotic time complexities.

Uploaded by

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

KADI SARVA VISHWAVIDYALAYA

LDRP INSTITUTE OF TECHNOLOGY AND RESEARCH


GANDHINAGAR

Department of
Computer Engineering and Information Technology

Subject : Design and Analysis of Algorithm (CE-504N)

Laboratory Manual

Prepared By
Ney Kiritbhai Patel

18BECE30108

5CE-D
Lab Manual DAA(CE 504N)
INDEX

Practical Date of
Name of Experiment Page Sign
No Submission
1 Revision of Data Structures: Write a program to implement:
a. A Queue
b. A Stack
c. A Queue using two Stacks
d. A Stack using two Queues
  3-20   22-July-2020  
2 Basics:
Find out Big - Oh and Big–Omega of the function.
 30-33 6-August-2020   
3 Aim: Design an algorithm and implement a program for:
a. Bubble Sort
b. Selection Sort
c. Insertion Sort
d. Linear Search
e. Radix Sort  21-29   29-July-2020  
4

     
5

     
6      
7

     
8
     
9

     
10
     
11
     

18BECE30108
Lab Manual DAA(CE 504N)
Experiment 2

Aim: Find out Big - Oh and Big–Omega of the function

Explanation:

Big-Oh Notation:
 It represents the lower bound of the function.
 f(n) and g(n) are two functions for comparison purpose. where f(n) should be less than or equal
to the g(n).

Examples:
1) Prove that 2n + 10 is O(n)
2) Prove that 7n-2 is O(n)
3) Prove that 3 log n + log log n is O(log n)
4) n^4 + 100n^2 + 10n + 50 is O(n^4)
5) 10n^3 + 2n^2 is O(n^3)
6) n^3 – n^2 is O(n^3)
7) 2n^2 = O(n^3)
8) 1000n^2+1000n = O(n^2)
9) 30n+8 is O(n)
10) Prove that 100n + 5 = O(n^2)

18BECE30108
Lab Manual DAA(CE 504N)
Solution:

Page-1 Page-2

Page-3 Page-4

18BECE30108
Lab Manual DAA(CE 504N)
Big-Omega Notation:
 It represent the upper bound of the function.
 f(n) and g(n) are two functions for comparison purpose. Where f(n) should be greater than or
equal to the g(n).

Example:
1) n = Ω(2n)
2) n3 = Ω (n2)
3) n = Ω (logn)
4) 100n + 5 ≠ Ω (n2)
5) 5n2 = Ω (n)

18BECE30108
Lab Manual DAA(CE 504N)
Solution:

Page-1 Page-2

Conclusion:
In this practical we have learned about Big Oh and Big Omega function. We have also counted examples of
Big Oh and Big Omega.

18BECE30108

You might also like