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

Design and Analysis of Algorithms - AD3351 - Important Questions With Answer - Unit 3 - Dynamic Programming and Greedy Technique

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)
34 views

Design and Analysis of Algorithms - AD3351 - Important Questions With Answer - Unit 3 - Dynamic Programming and Greedy Technique

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/ 8

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-III : DYNAMIC PROGRAMMING AND GREEDY TECHNIQUE

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

UNIT-III DYNAMIC PROGRAMMING AND GREEDY TECHNIQUE

QUESTION BANK

PART - A
1. State the Principle of Optimality [Apr/May 2019, Nov/Dec 2017, Nov/Dec 2016]
The principle of optimality is the basic principle of dynamic programming. It states that an optimal
sequence of decisions or choices, each subsequence must also be optimal.

2. What is the Constraint for binary search tree for insertion? [Apr/May 2019]
When inserting or searching for an element in a binary search tree, the key of each visited
node has to be compared with the key of the element to be inserted or found. The shape of the
binary search tree depends entirely on the order of insertions and deletions, and can become
degenerate.

3. Define multistage graph. Give Example. [Nov/Dec 2018]


A Multistage graph is a directed graph in which the nodes can be divided into a set of stages such
that all edges are from a stage to next stage only (In other words there is no edge between vertices
of same stage and from a vertex of current stage to previous stage).

4. How Dynamic Programming is used to solve Knapsack Problem? [Nov/Dec 2018]


An example of dynamic programming is Knapsack problem. The solution to the Knapsack problem
can be viewed as a result of sequence of decisions. We have to decide the value of xi for 1<i<n.
First we make a decision on x1 and then on x2 and so on. An optimal sequence of decisions
maximizes the object function Σpixi.

5. Define transitive closure of directive graph. [Apr/May 2018]


The transitive closure of a directed graph with 'n' vertices is defined as the n-by-n Boolean matrix
T={tij}, in which the elements in the ith row (1 i n) and the jth column (1 j n) is 1 if there exists a
non trivial directed path from the ith vertex to the jth vertex otherwise, tij is 0 .

6. Define the Minimum Spanning tree problem. [Apr/May 2018]


A minimum spanning tree (MST) or minimum weight spanning tree is a subset of the edges of a
connected, edge-weighted (un)directed graph that connects all the vertices together, without any
cycles and with the minimum possible total edgeweight .

7. What does Floyd’s Algorithm do? [Nov/Dec 2017]


Floyd’s algorithm is an application, which is used to find the entire pairs shortest paths problem.
Floyd’s algorithm is applicable to both directed and undirected weighted graph, but they do not
contain a cycle of a negativelength.

8. State the Assignment Problem [May/June 2016]


There are n people who need to be assigned to execute n jobs as one person per job. Each person is
assigned to exactly one job and each job is assigned to exactly oneperson.

9. Define the Single Source Shortest Path Problem. [May/June 2016]


Single source shortest path problem can be used to find the shortest path from single source to
all othervertices.
Example:Dijikstras algorithm

AD3351_DAA

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

10. List out the memory function under dynamic programming. [Apr/May 2015]
 Top-Down Approach
 Bottom –Up Approach
11. What is Huffman trees?
A Huffman tree is binary tree that minimizes the weighted path length from the root to the leaves
containing a set of predefined weights. The most important application of Huffman trees are
Huffman code.

12. List the advantage of Huffman’s encoding?


 Huffman’s encoding is one of the most important file compression methods.
 It is simple
 It isversatility
 It provides optimal and minimum length encoding
13. What do you mean by Huffman code?
A Huffman code is a optimal prefix tree variable length encoding scheme that assigns bit strings to
characters based on their frequencies in a given text.

14. What is greedy method?


The greedy method is the most straight forward design, which is applied for change making
problem.
The greedy technique suggests constructing a solution to an optimization problem through a
sequence of steps, each expanding a partially constructed solution obtained so far, until a complete
solution to the problem is reached. On each step, the choice made must be feasible, locally optimal
and irrevocable.
15. What do you mean by row major and column major?
In a given matrix, the maximum elements in a particular row is called row major.
In a given matrix, the maximum elements in a particular column is called column major.

16. Compare Greedy method and Dynamic Programming


Greedy method Dynamic programming

1.Only one sequence of 1.Many number of decisions are


decisionis generated.
generated.
2.It does not guarantee to give an
optimal solution always. 2.It definitely gives an optimal solution
always.

17. Show the general procedure of dynamic programming. [APR/MAY 2017]


The development of dynamic programming algorithm can be broken into a sequence of 4 steps.
 Characterize the structure of an optimalsolution.
 Recursively define the value of the optimalsolution.
 Compute the value of an optimal solution in the bottom-up fashion.
 Construct an optimal solution from the computed information

18. Define Kruskal Algorithm.


Kruskal’s algorithm is another greedy algorithm for the minimum spanning tree problem.
Kruskal’s algorithm constructs a minimum spanning tree by selecting edges in increasing order
of their weights provided that the inclusion does not create a cycle. Kruskal’s algorithm provides

AD3351_DAA

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

a optimal solution.

19. List the features of dynamic programming?


Optimal solutions to sub problems are retained so as to avoid recomputing their values. Decision
sequences containing subsequences that are sub optimal are not considered. It definitely gives
the optimal solution always.

20. Write the method for Computing a Binomial Coefficient


Computing binomial coefficients is non optimization problem but can be solved using dynamic
programming.
Binomial coefficients are represented by C(n, k) or (nk) and can be used to represent the coefficients
of a binomial:
(a + b)n = C(n, 0)an + ... + C(n, k)an-kbk + ... + C(n, n)bn The recursive relation is
defined by the prior power
C(n, k) = C(n-1, k-1) + C(n-1, k) for n >k > 0
IC C(n, 0) = C(n, n) = 1

i. PART B & C

2. Explain Kruskal's Algorithm


3. Discuss Prim's Algorithm in detail.

4. Write short note on Greedy Method. [Nov/Dec 2019]


5. What does dynamic programming have in common with divide-and-Conquer?

6. Explain how to Floyd’s Algorithm works. [Apr/May 2019]


7. Write Huffman code algorithm and derive its complexity. [Apr/May 2019]
8. Outline the Dynamic Programming approach to solve the Optimal Binary Search Tree
problem and analyze it time 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