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

ALL PYQ

JORJOIRT4BTUB4UBRU94R949RHUIPJLKFBJLKDBFLKJDBFKJ F DIBFJKEFK DFBIE FJKEBF EF EJINFJIE F IE FJI EJIF IE FI

Uploaded by

omkumar3012
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)
4 views

ALL PYQ

JORJOIRT4BTUB4UBRU94R949RHUIPJLKFBJLKDBFLKJDBFKJ F DIBFJKEFK DFBIE FJKEBF EF EJINFJIE F IE FJI EJIF IE FI

Uploaded by

omkumar3012
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/ 4

Indian Institute of Engineering Science and Technology, Shibpur

B. Tech, (IT), 5th Semester End Semester Examinations, November 2023


Algorithms (1T-3104)
Full Marks: 50 Time: 3 Hours

Answer any five questions


.. V.ó What do you understand by asymptotic upper bound? "0 (.) is only an upper bound, not the exact
gTowth rate of the function" - comment. Which asymptotic bound gives the exact growth rate of a
function? Explain.

SProve that if f = Ng) and g = 2(h), then f = ).


H Prove that if an algorithm has a running túme O(logn), then it also has a linear running time.
ZjnBreadth First Search (BFS), vertices are colored white, gray, or black. Under what conditions the
vertices get each of the colors? Explain. During BFS traversal, ifa vertex has a color gray and it has
white neighbors, what does it signify? [5]

i) Explain what is a i) tree edge ii) back edge and ii) cross edge in Depth First Search.
) Prove that in aDepth First Search (DFS) of an undirected graph G, every edge is either atree cdge or
a back edge.
Explain what is meant by 'a cut respects a set A'. State the Kruskal's algorithm for finding the
Minimum Spanning Tree (MST) in agiven connected and undirected graph.
5) Explain the time complexity of the Prim's algorithm for finding the MST. [5]

4. a) Explain why the Dijkstra's algorithm to find the single source shortest path does not work when the
edges may have negative weights. [S]
Prove that the maximum degree of any node in an n-node binomial tree is log n. Prove that a
binomial heap H contains at most Llog n +1 Jbinomial trees.
6. a) In Delete Min operation on the Fibonacci Heap, a consolidate tree function is executed to ensure that
no two roots have same rank. Explain the consolidate tree operation.
b) What are the properties of a Red-Black tree? Explain.

.. a) Explain what is meant by "Y is polynomial-time reducible to X(Y Sp X)y". Prove that Independent
Set Problem Sp Vertex Cover Problem.
b) Give the statement for 3 Satisfiability Problem (3-SAT). Show that 3-SAT S, Independent Set
Problem. (S]

7. a) Prove that if ZspY and Y SpX, then Z Sp X. What do you understand by efficient certification?(5]
b) Show that Directed-Hamilton-Cycle Sp Hamilton-Cycle-Problem. [S]
Indian Institute of Engineering Science and Technology, Shibpur
B. Tech. Information Technology, 5th Semester End Semester Examinations, December 2021
Algorithms (IT-3104)
Full Marks: 50 Answer any five questions Time: 1 Hour 30 Minutes
1. a) Why does not Dijkstra algorithm for single-source shortest path work with negative weights? Can
you explain with an example? [5]
b) Suppose 𝐻1 𝑎𝑛𝑑 𝐻2 are two Fibonacci Trees. The root list of 𝐻1 contains 8 nodes and that of 𝐻2
contains 3 nodes. How will you unite these Fibonacci heaps? Explain each operation i.e., comparison,
assignment etc. for this process.
Explain with an example how will you insert a node in a Fibonacci Tree. [5]

2. a) Under what condition in decrease key operation of Fibonacci Tree, there will be modification of only
one node? How will you combine three Fibonacci Heaps 𝐻1 , 𝐻2 , 𝑎𝑛𝑑 𝐻3 and how many pointers have
to be modified for this process? [5]
b) Differentiate between a Binary Search Tree and a Red-Black Tree. Describe any two properties of a
Red-Black tree. [5]

3. a) What is the black height of a node? What is the black-height of a Red-Black tree? Given the same
height of two Red-Black trees, 𝐻1 𝑎𝑛𝑑 𝐻2, can their black-heights be different? Explain. [5]
b) What can be the maximum height of a Red-Black tree with n internal nodes? Prove it. [5]

4. a) What do you understand by the branching factor of a B-Tree? Does it necessarily mean that a large
branching factor will lead to reduced height of a B-Tree? Why the root node of a B-Tree should be kept
permanently in the main memory? [5]
b) Insert 12 in the following B-Tree.

Then insert 25 and show the resulting tree. [5]

5. a) What is an independent set? Let V= (G, E) be a graph, then S is an independent set if and only if its
complement V-S is a vertex cover – prove it. [5]
b) Prove that Vertex Cover ≤𝑃 Independent Set. [5]

6. a) What do you understand by Y is polynomial time reducible to X? Why such reducibility is important
in the context of intractability of problems? [5]
b) Prove that Independent Set ≤𝑃 Set Packing problem. [5]

7. a) What is a Euler tour? What is Hamiltonian Cycle? Can you relate between the two? [5]
b) What are the properties of an efficient certifier? Explain what can be an efficient certifier for a set
cover problem? [5]

8. a) What is the randomized quicksort algorithm? Compare quicksort, heapsort, and mergesort with
respect to locality of reference. [5]
b) Define a binary heap. Explain with an example. What is a complete binary tree? [5]
Indian Institute of Engineering Science and Technology, Shibpur

B. Tech. Information Technology, 5th Semester Mid Semester Examinations, October 2021

Algorithms

IT-3104

Full Marks: 30 Answer any five questions Time: 45 Minutes

1. a) 3-D Maxima problem: Let a point p in 3-dimensional space be given by its integer coordinates, p
= (p.x, p.y,p.z). A point p is said to be dominated by a point q if p.x<= q.x and p.y<=q.y and
p.z<=q.z. Given a set of n points, P = {p1, p2, … , pn} in 3-space a point is said to be maximal if it is
not dominated by any other point in P. Write an algorithm to find the set of maximal points. [3]
b) Find the time complexity of the algorithm given by you for the 3-D maxima problem. [3]

2. a) Let f and g be two functions that take nonnegative values, suppose that f=O(g). Show that
g=(f). [3]
b) Suppose that f and g are two functions such that for some other function h, we have f = O(h) and
g = O(h). Then f + g = O(h). [3]

3. a) “T(n)=pn2+qn+r is both O(n2) and (n2)” – comment and explain whether this statement is
correct. [3]
b) If f= (g) and g=(h), then f=(h). Prove it. [3]

4. a) State the Merge procedure used in MergeSort. [3]


b) Analyse the running time of the Merge procedure. [3]

5. a) State the Master Theorem for determining the asymptotic growth rates of recurrence problems.
[3]

b) Solve the recurrence using Master Theorem: T(n) = T(2n/3) + 1. [3]

6. a) If G is an directed graph, the sum of the lengths of all the adjacency lists is |E|. Prove it. [3]
b) Breadth-first search colors each vertex white, gray, or black. All vertices start out white and may
later become gray and then black. Show with an example when i) a white vertex becomes black and
ii) a white vertex becomes gray then black. [3]

7. a) In Depth-First-Search, what do you understand by the following? i) Back edge ii) forward edge
iii) cross edge. Explain with illustrations. [3]
b) Why the Minimum Spanning Tree of a graph may not be unique? Explain with example. [3]

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