0% found this document useful (0 votes)
61 views

Design and Analysis of Algorithms - AD3351 - Important Questions With Answer - Unit 1 - Introduction

Uploaded by

fearlesssparrows
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)
61 views

Design and Analysis of Algorithms - AD3351 - Important Questions With Answer - Unit 1 - Introduction

Uploaded by

fearlesssparrows
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/ 10

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

Database Design and Operating Systems -


Engineering Physics - Engineering Graphics
Management - AD3391 AL3452
PH3151 - GE3251

Physics for Design and Analysis of Machine Learning -


Engineering Chemistry Information Science Algorithms - AD3351 AL3451
- CY3151 - PH3256
Data Exploration and Fundamentals of Data
Basic Electrical and
Visualization - AD3301 Science and Analytics
Problem Solving and Electronics Engineering -
BE3251 - AD3491
Python Programming -
GE3151 Artificial Intelligence
Data Structures Computer Networks
- AL3391
Design - AD3251 - CS3591

Deep Learning -
AD3501

Embedded Systems
Data and Information Human Values and
and IoT - CS3691
5th Semester

Security - CW3551 Ethics - GE3791


6th 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

DEPARTMENT OF ARTIFICIAL INTELLIGENCE AND DATA

SCIENCE

B.Tech-Artificial Intelligence and Data Science

Anna University Regulation: 2021

AD3351-DESIGN AND ANALYSIS OF ALGORITHMS

II Year/ III Semester

Unit-I : INTRODUCTION

QUESTION BANK

Prepared By,

Mrs.P.Joy Suganthy Bai, AP/CSE


AD3351_DAA

https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes
www.BrainKart.com
4931_Grace College of Engineering, Thoothukudi

DESIGN AND ANALYSIS OF ALGORITHMS


UNIT I INTRODUCTION
PART-A

1. State the transpose symmetry property of O and Ω. [Nov/Dec 2019]


f(n) = O(g(n)) if and only if g(n) = Ω(f(n))

2. Define recursion. [Nov/Dec 2019]


The process in which a function calls itself directly or indirectly is called recursion and the
corresponding function is called as recursive function. Using recursive algorithm, certain
problems can be solved quite easily
3. How do you measure the efficiency of an Algorithm? [Apr/May 2019]
 Size of the Input
 Running Time

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.

5. What is basic operation ?[ Apr/May 2018]


The operation that contributes most towards the running time of the algorithm The running
time of an algorithm is the function defined by the number of steps (or amount of memory)
required to solve input instances of size n.

6. What is an Algorithm? [Apr/May 2017]


An algorithm is a sequence of unambiguous instructions for solving a problem. i.e., for obtaining a
required output for any legitimate input in a finite amount of time

7. How to measure algorithm’s running time? [Nov/Dec 2017]


Time efficiency indicates how fast the algorithm runs. An algorithm’s time efficiency is
measured as a function of its input size by counting the number of times its basic operation
(running time) is executed. Basic operation is the most time consuming operation in the
algorithm’s innermostloop.

AD3351_DAA

https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes
www.BrainKart.com
4931_Grace College of Engineering, Thoothukudi

8. Compare the order of growth n(n-1)/2 and n2. [May/June2016]

n n(n-1)/2 n2
Polynomial Quadratic Quadratic
1 0 1
2 1 4
4 6 16
8 28 64
10 45 102

102 4950 104


Complexity Low High
Growth Low high

n(n-1)/2 is lesser than the half of n2


9. Define recurrence relation. [Nov/Dec2016]
A recurrence relation is an equation that defines a sequence based on a rule that gives the next term
as a function of the previous term(s). The simplest form of a recurrence relation is the case where the
next term depends only on the immediately previous term.

10. Write down the properties of asymptotic notations. [April/May2015]


Asymptotic notation is a notation, which is used to take meaningful statement about the
efficiency of a program. To compare and rank such orders of growth, computer scientists use three
notations, they are:
 O - Big ohnotation
 Ω - Big omeganotation
 Θ - Big thetanotation

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

Example: gcd(60, 24) = gcd(24, 12) = gcd(12, 0) = 12.


12. Write an algorithm to find the number of binary digits in the binary representation of
apositive decimal integer. [Apr May 2015]
Algorithm Binary(n)
//Input: A positive decimal integer n
//Output: The number of binary digits in n’s binary representation
count ←1
while n >1 do
count ←count + 1
n←[n/2]
return count
13. Define Little “oh”. [April/May2014]
The function f(n) =
0(g(n)) iff Lim f(n)
=0
n →∞ g(n)
14. Define Little Omega. [April/May2014]
The function f(n) =
ω (g(n)) iff Lim f(n)
=0
n →∞ g(n)
15. Define Big Theta Notations [Nov/Dec2014]
A function t(n) is said to be in Θ(g(n)) , denoted t(n) Є Θ (g(n)) , if t(n) is bounded both
above and below by some positive constant multiple of g(n) for all large n, i.e., if there exist
some positive constants c1 and c2 and some nonnegative integer n0 such that c1
g(n) ≤t(n) ≤ c2g(n) for all n ≥ n0
16. Define Big Omega Notations. [May/June2013]
A function t(n) is said to be in Ω(g(n)) , denoted t(n) Є Ω((g(n)) , if t(n) is bounded
below by some positive constant multiple of g(n) for all large n, i.e., if there exist some positive
constant c and some nonnegative integer n0 such that
t(n) ≥cg(n) for all for all n ≥ n0
17. What is Big ‘Oh’ notation? [May/June2012]
A function t(n) is said to be in O(g(n)), denoted t(n) O(g(n)) , if t(n) is bounded above by
some constant multiple of g(n) for all large n, i.e., if there exist some positive constant c and
some nonnegative integers no such that
t(n) ≤ cg(n) for all n≥ n0
18. Give the two major phases of performanceevaluation.
Performance evaluation can be loosely divided into two major phases:
• a prior estimates (performanceanalysis)
• a Posterior testing (performancemeasurement)

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

20. What are the basic asymptotic efficiencyclasses?


The various basic efficiency classes are
• Constant:1
• Logarithmic: logn
• Linear:n
• N-log-n: n logn
• Quadratic:n2
• Cubic: n3
• Exponential:2n
• Factorial:n!

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

// Output The nth Fibonacci number


if n 1 return n
else return F(n-1)+F(n-2)

24. What is algorithm visualization?


Algorithm visualization can be defines as the use of images to convey some useful information
about algorithms. Two principal variations are Static algorithm visualization Dynamic Algorithm
visualization(also called algorithm animation)

25. What is the order of growth?


The Order of growth is the scheme for analyzing an algorithm's efficiency for different input sizes
which ignores the multiplicative constant used in calculating the algorithm's running time.
Measuring the performance of an algorithm in relation with the input size n is called the order of
growth.

PART-B & C

1. Explain about algorithm with suitable example (Notion of algorithm).

2. Write short note on Fundamentals of Algorithmic Problem Solving

3. Discuss important problem types that you face during Algorithm Analysis.

4. Discuss Fundamentals of the analysis of algorithm efficiency elaborately. [Nov/Dec 2019,


Apr/May 2019]

5. Elaborate Asymptotic analysis of an algorithm with an example.List out the Steps in


Mathematical Analysis of non recursive Algorithms.

6. List out the Steps in Mathematical Analysis of Recursive Algorithms.


7. Explain in detail about linear search.

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

Database Design and Operating Systems -


Engineering Physics - Engineering Graphics
Management - AD3391 AL3452
PH3151 - GE3251

Physics for Design and Analysis of Machine Learning -


Engineering Chemistry Information Science Algorithms - AD3351 AL3451
- CY3151 - PH3256
Data Exploration and Fundamentals of Data
Basic Electrical and
Visualization - AD3301 Science and Analytics
Problem Solving and Electronics Engineering -
BE3251 - AD3491
Python Programming -
GE3151 Artificial Intelligence
Data Structures Computer Networks
- AL3391
Design - AD3251 - CS3591

Deep Learning -
AD3501

Embedded Systems
Data and Information Human Values and
and IoT - CS3691
5th Semester

Security - CW3551 Ethics - GE3791


6th 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

You might also like