Design and Analysis of Algorithms - AD3351 - Important Questions With Answer - Unit 1 - Introduction
Design and Analysis of Algorithms - AD3351 - Important Questions With Answer - Unit 1 - Introduction
4th Semester
2nd Semester
Deep Learning -
AD3501
Embedded Systems
Data and Information Human Values and
and IoT - CS3691
5th Semester
7th Semester
8th Semester
Open Elective-1
Distributed Computing Open Elective 2
- CS3551 Project Work /
Elective-3
Open Elective 3 Intership
Big Data Analytics - Elective-4
CCS334 Open Elective 4
Elective-5
Elective 1 Management Elective
Elective-6
Elective 2
All Computer Engg Subjects - [ B.E., M.E., ] (Click on Subjects to enter)
Programming in C Computer Networks Operating Systems
Programming and Data Programming and Data Problem Solving and Python
Structures I Structure II Programming
Database Management Systems Computer Architecture Analog and Digital
Communication
Design and Analysis of Microprocessors and Object Oriented Analysis
Algorithms Microcontrollers and Design
Software Engineering Discrete Mathematics Internet Programming
Theory of Computation Computer Graphics Distributed Systems
Mobile Computing Compiler Design Digital Signal Processing
Artificial Intelligence Software Testing Grid and Cloud Computing
Data Ware Housing and Data Cryptography and Resource Management
Mining Network Security Techniques
Service Oriented Architecture Embedded and Real Time Multi - Core Architectures
Systems and Programming
Probability and Queueing Theory Physics for Information Transforms and Partial
Science Differential Equations
Technical English Engineering Physics Engineering Chemistry
Engineering Graphics Total Quality Professional Ethics in
Management Engineering
Basic Electrical and Electronics Problem Solving and Environmental Science and
and Measurement Engineering Python Programming Engineering
www.BrainKart.com
4931_Grace College of Engineering
SCIENCE
Unit-I : INTRODUCTION
QUESTION BANK
Prepared By,
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes
www.BrainKart.com
4931_Grace College of Engineering, Thoothukudi
4. Prove that f(n)= O(g(n)) and g(n)=O(f(g(n)) then f(n)=(g(n)) [Apr/May 2019]
Prove by contradiction. Assume f(n) = O(g(n)), by the definition, there exist constants c, n0 > 0
such that 0 ≤ f(n) ≤ cg(n) or 0 ≤ n ≤ cn1+sin n for all n ≥ n0. It implies (0.6) 0 ≤ 1 ≤ cnsin n for
all n ≥ n0. Can it be true? To show that the answer is No, it suffices to show: For any n0 > 0, we
can always pick an n ≥ n0 such that cnsin n < 1.
AD3351_DAA
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes
www.BrainKart.com
4931_Grace College of Engineering, Thoothukudi
n n(n-1)/2 n2
Polynomial Quadratic Quadratic
1 0 1
2 1 4
4 6 16
8 28 64
10 45 102
11. Give the Euclid’s Algorithm for Computing gcd(m,n) [Apr/May `16,`18]
Algorithm Euclid_gcd(m,n)
//Computes gcd(m, n) by Euclid’s algorithm
//Input: Two nonnegative, not-both-zero integers m and n
//Output: Greatest common divisor of m and n
while n ≠ 0 do
r ←m mod n
m←n
n←r
return m
AD3351_DAA
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes
www.BrainKart.com
4931_Grace College of Engineering, Thoothukudi
AD3351_DAA
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes
www.BrainKart.com
4931_Grace College of Engineering, Thoothukudi
19. What are six steps processes in algorithmic problem solving? [Nov/Dec2009]
Understanding theproblem
Decision making on - Capabilities of computational devices, Choice of exact or
approximate problem solving, Datastructures
Algorithmicstrategies
Specification ofalgorithm
Algorithmicverification
Analysis of algorithms
21. List the factors which affects the running time of thealgorithm.
A. Computer
B. Compiler
C. Input to thealgorithm
i. The content of the input affects the runningtime
ii. Typically, the input size is the mainconsideration.
22. Give an non-recursive algorithm to find out the largest element in a list of nnumbers.
ALGORITHMMaxElement(A[0..n-1])
//Determines the value of the largest element in a
given array Input:An array A[0..n-1] of real
numbers
//Output: The value of the largest element in A
maxvala[0] for I  1 to n-1 do
if A[I] >maxval
return maxval
A[I] return maxval
23. Write a recursive algorithm for computing the nth fibonacci number.
ALGORITHMF(n)
// Computes the nth Fibonacci number recursively by using the definition
// Input A non-negative integer n
AD3351_DAA
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes
www.BrainKart.com
4931_Grace College of Engineering, Thoothukudi
PART-B & C
3. Discuss important problem types that you face during Algorithm Analysis.
8. Write an Algorithm using recursion that determines the GCD of two numbers. Determine
the time and space complexity. [Nov/Dec 2019]
AD3351_DAA
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes
Click on Subject/Paper under Semester to enter.
Professional English Discrete Mathematics Environmental Sciences
Professional English - - II - HS3252 - MA3354 and Sustainability -
I - HS3152 GE3451
Digital Principles and
Statistics and Probability and
Computer Organization
Matrices and Calculus Numerical Methods - Statistics - MA3391
- CS3351
- MA3151 MA3251
3rd Semester
1st Semester
4th Semester
2nd Semester
Deep Learning -
AD3501
Embedded Systems
Data and Information Human Values and
and IoT - CS3691
5th Semester
7th Semester
8th Semester
Open Elective-1
Distributed Computing Open Elective 2
- CS3551 Project Work /
Elective-3
Open Elective 3 Intership
Big Data Analytics - Elective-4
CCS334 Open Elective 4
Elective-5
Elective 1 Management Elective
Elective-6
Elective 2
All Computer Engg Subjects - [ B.E., M.E., ] (Click on Subjects to enter)
Programming in C Computer Networks Operating Systems
Programming and Data Programming and Data Problem Solving and Python
Structures I Structure II Programming
Database Management Systems Computer Architecture Analog and Digital
Communication
Design and Analysis of Microprocessors and Object Oriented Analysis
Algorithms Microcontrollers and Design
Software Engineering Discrete Mathematics Internet Programming
Theory of Computation Computer Graphics Distributed Systems
Mobile Computing Compiler Design Digital Signal Processing
Artificial Intelligence Software Testing Grid and Cloud Computing
Data Ware Housing and Data Cryptography and Resource Management
Mining Network Security Techniques
Service Oriented Architecture Embedded and Real Time Multi - Core Architectures
Systems and Programming
Probability and Queueing Theory Physics for Information Transforms and Partial
Science Differential Equations
Technical English Engineering Physics Engineering Chemistry
Engineering Graphics Total Quality Professional Ethics in
Management Engineering
Basic Electrical and Electronics Problem Solving and Environmental Science and
and Measurement Engineering Python Programming Engineering