0% found this document useful (0 votes)
28 views5 pages

MODEL AD3351 QP Key

This document outlines the model exam for the Design and Analysis of Algorithms course at SRI Rajaa Rajan College of Engineering & Technology, scheduled for December 2024. It includes a series of questions covering key concepts such as empirical analysis, dynamic programming, greedy techniques, and various algorithms like Ford-Fulkerson and Dijkstra's. The exam consists of two parts: Part A with short answer questions and Part B requiring detailed explanations and examples.

Uploaded by

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

MODEL AD3351 QP Key

This document outlines the model exam for the Design and Analysis of Algorithms course at SRI Rajaa Rajan College of Engineering & Technology, scheduled for December 2024. It includes a series of questions covering key concepts such as empirical analysis, dynamic programming, greedy techniques, and various algorithms like Ford-Fulkerson and Dijkstra's. The exam consists of two parts: Part A with short answer questions and Part B requiring detailed explanations and examples.

Uploaded by

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

SRI RAAJA RAAJAN COLLEGE OF ENGINEERING & TECHNOLOGY

Amaravathiputhur Post, Karaikudi Tk


Accredited by NAAC with B+ Grade
MODEL EXAM – December 2024

Reg. Date : 12.12.24


o: Yr/Sem/Dept: II/III/AI&DS
Session : FN

AD3351 DESIGN AND ANALYSIS OF ALGORITHM 100 Marks

ANSWER ALL QUESTIONS


PART A (10*2 = 20 MARKS)
1. 1. What is empirical analysis of algorithm? (AU., ND2022) C204.1 BTL1
Empirical analysis refers to the process of evaluating an
algorithm's performance based on experimental data and
practical observations.
2. 2. Define P,NP,NP Complete problem. (AU.,AM2023) C204.5 BTL1
The P in the P class stands for Polynomial Time. It is the
collection of decision problems(problems with a “yes” or “no”
answer) that can be solved by a deterministic machine in
polynomial time.
The NP in NP class stands for Non-deterministic
Polynomial Time. It is the collection of decision problems that can
be solved by a non-deterministic machine in polynomial time.
A problem is NP-complete if it is in NP and as hard as any
problem in NP, meaning that every NP problem can be transformed
(or reduced) to it in polynomial time.
3. 3. Define principles of optimality (AU.,AM2023) C204.5 BTL1
The principle of optimality is a fundamental aspect of
dynamic programming, which states that the optimal solution
to a dynamic optimization problem can be found by combining
the optimal solutions to its sub-problems.
4. 4. Define dynamic programming (AU., ND2023) C204.5 BTL1
Dynamic Programming is an optimization technique that
improves recursive solutions by storing results of
subproblems to reduce time complexity from exponential to
polynomial, applicable to various problems like Fibonacci
numbers and shortest path algorithms.
5. 5. What are the elements of greedy technique? (AU.,AM2023) C204.5 BTL1
Greedy algorithms are a class of algorithms that
make locally optimal choices at each step with the hope of
finding a global optimum solution.
6. 6. Define flow cut (AU., ND2023) C204.5 BTL1
A cut in a flow network is a partition of the vertices of the network
into two disjoint subsets, such that one subset contains the
source (starting node) and the other subset contains the sink
(ending node). This partition separates the flow network into two
parts. The edges that cross from the source subset to the sink
subset are called the cut edges.
7. 7. What is two color graph? C204.5 BTL1
A two-color graph is referred to as a bipartite graph. This type of
graph can be colored using only two colors such that no two
adjacent vertices share the same color.
8. What is backtracking?

Backtracking is a general algorithmic technique used for


solving problems by exploring all potential solutions and
abandoning ("backtracking") solutions that fail to satisfy the
problem constraints.

9. Define LIFO and FIFO Search.

LIFO search is a strategy where the most recently added


element is the first to be removed and processed. This approach uses
a stack data structure.

FIFO search is a strategy where the earliest added element


is the first to be removed and processed. This approach uses a queue
data structure.

10. Define Hamiltonian circuit problem


Hamilton Circle Problem, also known as the Hamiltonian
Cycle Problem, is a fundamental concept in the field of
computer science and graph theory. It involves finding a cycle
that visits every vertex of a graph exactly once and returns to
the starting vertex.

PART B – (5*16 = 80 Marks) (Any five)

11.i)Explain ford Fulkerson method with suitable example.(10) (AU.,AM2023) C204.4 BTL3
The Ford-Fulkerson algorithm is a widely used algorithm to solve the
maximum flow problem in a flow network. The maximum flow
problem involves determining the maximum amount of flow that can
be sent from a source vertex to a sink vertex in a directed weighted
graph, subject to capacity constraints on the edges.
The algorithm works by iteratively finding an augmenting path, which
is a path from the source to the sink in the residual graph, i.e., the
graph obtained by subtracting the current flow from the capacity of
each edge. The algorithm then increases the flow along this path by
the maximum possible amount, which is the minimum capacity of the
edges along the path.
For example, consider the following graph from the CLRS book.
The maximum possible flow in the above graph is 23.

ii) List the steps of the simplex method (6)


1. Formulate the Linear Programming Problem
2. Convert to Standard Form
3. Set Up the Initial Simplex Tableau
4. Identify the Pivot Column (Entering Variable)
5. Identify the Pivot Row (Leaving Variable)
6. Perform the Pivot Operation
7. Iterate
8. Check for Optimality
9. Extract the Solution
10. Interpret Results
12. Explain briefly about Huffman tree with suitable example . (16) (AU., ND2023) C204.1 BTL2

A Huffman tree is a binary tree used in data compression algorithms. It


is an optimal way to encode data such that the most frequently
occurring items use the least amount of space. Let's break it down:

Huffman Coding Process

1. Frequency Analysis: Count the frequency of each character in


the input data.
2. Build a Priority Queue: Create a priority queue (min-heap)
where each node represents a character and its frequency.

3. Construct the Tree:

o Extract two nodes with the lowest frequency from the


queue.

o Create a new internal node with these two nodes as


children and the sum of their frequencies as the new
node's frequency.

o Insert the new node back into the priority queue.

o Repeat until only one node remains, which becomes the


root of the Huffman tree.

4. Assign Codes: Traverse the tree to assign binary codes to each


character, with left edges representing '0' and right edges
representing '1'.
13. i)Discuss how N -queens problem can be solved by backtracking (AU., ND2023) C204.1 BTL3
technique.(8)
ii)Outline the pseudocode(algorithm) for maximum matching bipartite
graph.(8) (AU.,N/D2023) C204.4 BTL3
14.i) Explain in detail about dijikstra’s algorithm with suitable example.
(8) (AU.,A/M2023) C204.4 BTL3
ii) Discuss how coin changing problem can be solved by dynamic
programming with suitable example(8)
(AU.,A/M2023) C204.1 BTL2
14. Apply warshall’s algorithm to find the transitive closure of the (AU.,AM2023) C204.1 BTL2
digraph defined by the following adjacency matrix. (16)
0100
0010
0001
0000
15. Apply the DFS based algorithm to solve the topological sorting problem for the following digraphs.

(16) (AU.,A/M2023)C204.4 BTL4

i)

a b

d e
c

f g

b c d
ii) a

e f g
16. i) Justify how back tracking techniques is used to solve sum of subsets problem with its pseudocode
and complexity.
ii)construct all possible subsets of weights that sum to M for the given instance n=6. M=30 and
weights(1:6)=(5,10,12,13,15,18) (AU.,N/D2023) C204.4 BTL 4

Prepared by: Mrs.D.Sujatha, HOD/AI&DS Approved by:

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy