0% found this document useful (0 votes)
70 views27 pages

Gtu Algo Pyq

This document is a comprehensive question bank for the GTU course 'Analysis and Design of Algorithms' (Subject Code: 3150703), compiling past examination questions from Summer 2022 to Winter 2024. It organizes questions by chapter and topic, includes marks and examination sessions, and tracks repeated questions to highlight frequently tested concepts. Students can use this resource to understand question patterns, gauge mark distribution, and practice actual past exam questions for better preparation.

Uploaded by

CLASHER a
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)
70 views27 pages

Gtu Algo Pyq

This document is a comprehensive question bank for the GTU course 'Analysis and Design of Algorithms' (Subject Code: 3150703), compiling past examination questions from Summer 2022 to Winter 2024. It organizes questions by chapter and topic, includes marks and examination sessions, and tracks repeated questions to highlight frequently tested concepts. Students can use this resource to understand question patterns, gauge mark distribution, and practice actual past exam questions for better preparation.

Uploaded by

CLASHER a
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/ 27

GTU Analysis and Design of Algorithms (3150703) - Topic-wise Past

Examination Questions (Summer 2022 - Winter 2024)

Introduction
●​ Purpose: This document serves as a comprehensive, topic-wise question
bank for the Gujarat Technological University (GTU) course "Analysis and
Design of Algorithms" (Subject Code: 3150703). It compiles questions from
past examinations held between Summer 2022 and Winter 2024, aiming to
assist students in their focused and effective preparation for this subject.
●​ Methodology: Questions have been meticulously extracted from official GTU
question papers. Each question has been carefully mapped to the relevant
chapters and topics as outlined in the official syllabus for the course. This
systematic organization allows for a structured approach to studying past
examination trends.
●​ Format Explanation:
○​ Questions are presented under their respective chapter and topic
headings.
○​ Each entry includes the original question number (e.g., Q.1 (a)), the full
question text, and the specific examination session (e.g., Winter 2023)
along with the marks allocated for that question (e.g., 3M).
○​ Alternative questions, often denoted with an "OR" in the question
paper, are listed as distinct entries under the relevant topic.
○​ Repetition Tracking: A significant feature of this compilation is the
tracking of repeated questions. If a question, or a very close variant
testing the same core concept, has appeared in multiple examinations,
this is indicated with a note in the format: ``. The question is listed once
under its primary topic, and all its recurrences are noted alongside its
first identified appearance in this compilation. This helps in identifying
frequently emphasized concepts.
○​ Diagrams/Tables: If a question originally included a diagram that
cannot be reproduced here, it is tagged as [diagram exists]. Similarly, if a
question involved a table, the table content is transcribed if it is simple
and textual; for complex or graphical tables, a tag [table exists in question]
is used.
●​ How to Use This Document: Students are encouraged to use this document
to:
○​ Understand the typical question patterns and types (definitional,
analytical, problem-solving) associated with each syllabus topic.
○​ Identify questions and topics that have been frequently asked in past
examinations.
○​ Gauge the mark distribution for different types of questions and topics.
○​ Practice answering actual past examination questions to enhance
problem-solving skills and exam preparedness.
●​ Source Documents:
○​ Syllabus: GUJARAT TECHNOLOGICAL UNIVERSITY Bachelor of
Engineering Subject Code: 3150703 ANALYSIS AND DESIGN OF
ALGORITHMS Semester V.
○​ Question Papers:
■​ BE - SEMESTER-V (NEW) EXAMINATION - WINTER 2022,
1
Subject Code: 3150703, Date: 09-01-2023.
■​ BE - SEMESTER-V(NEW) EXAMINATION - SUMMER 2022,
Subject Code: 3150703, Date: 07/06/2022.
■​ BE - SEMESTER- V EXAMINATION-SUMMER 2023, Subject
1
Code: 3150703, Date: 03/07/2023.
■​ BE-SEMESTER-V (NEW) EXAMINATION - WINTER 2023,
Subject Code:3150703, Date: 20-12-2023.
■​ BE - SEMESTER-V (NEW) EXAMINATION - SUMMER 2024,
1
Subject Code:3150703, Date:31-05-2024.
■​ BE- SEMESTER-V (NEW) EXAMINATION - WINTER 2024,
1
Subject Code:3150703, Date:17-12-2024.

Chapter 1: Basics of Algorithms and Mathematics

(Syllabus Weightage: 2%, Total Hrs: 02)

This foundational chapter, despite its minimal weightage in the overall scheme,
introduces the core concept of an algorithm and the basic mathematical tools
required for algorithm analysis. Questions from this chapter are typically definitional,
carrying lower marks (usually 3-4 marks), and aim to assess a student's grasp of
fundamental terminology. While direct questions may be few, the concepts learned
here are prerequisites for understanding more complex topics in subsequent
chapters.
●​ Topic: What is an algorithm?​

○​ Q.1 (a) What is an algorithm? Explain various properties of an


1
algorithm. (Winter 2023, 3M)
○​ Q.1 (a) Define Algorithm, Time Complexity and Space Complexity
(Summer 2022, 3M)
■​ Note: This question also touches upon complexity concepts from
Chapter 2, indicating an expectation of early familiarity.
●​ Topic: Mathematics for Algorithmic Sets​

○​ No direct questions specifically asking about "Algorithmic Sets" as a


standalone definition were found in the analyzed examination papers
from Winter 2022 to Winter 2024. This topic may be considered too
elementary for a distinct question or is implicitly covered within other
mathematical concepts or problem contexts. Students should possess
a basic understanding, though dedicated questions appear unlikely
based on recent trends.
●​ Topic: Functions and Relations​

○​ Q.1 (a) Define the following terms: i) Function in mathematics ii) Linear
1
inequalities (Winter 2024, 3M)
■​ Note: Part (ii) of this question pertains to the topic "Linear
Inequalities and Linear Equations."
●​ Topic: Vectors and Matrices​

○​ No direct definitional questions solely focused on "Vectors and


Matrices" as mathematical entities were identified in this introductory
chapter's context within the reviewed papers. However, the application
of matrices, particularly matrix multiplication and related problems like
matrix chain multiplication, is a significant component of later chapters
(e.g., Divide and Conquer, Dynamic Programming). This suggests that
a practical understanding of matrices is valued more in applied
algorithmic problems than as standalone definitions in this initial
chapter.
●​ Topic: Linear Inequalities and Linear Equations​

○​ Q.1 (a) Define the following terms: i) Function in mathematics ii) Linear
1
inequalities (Winter 2024, 3M)
■​ Note: Part (ii) directly addresses this topic.
■​ The appearance of such questions indicates that basic
mathematical definitions outlined in the syllabus can be directly
examined.

Chapter 2: Analysis of Algorithm

(Syllabus Weightage: 20%, Total Hrs: 08)


This chapter carries substantial weightage and is critical for understanding algorithm
performance. It covers methods for analyzing algorithm efficiency, various complexity
cases, asymptotic notations, and the analysis of fundamental sorting algorithms.
Examination questions typically include a mix of theoretical definitions (especially for
asymptotic notations and complexity cases) and practical applications, such as
analyzing given code snippets or performing sorting procedures and deriving their
complexities. A strong grasp of asymptotic notations (Big O, Big Omega, Big Theta)
is particularly essential, as questions on these are very common.
●​ Topic: The efficient algorithm​

○​ The concept of an "efficient algorithm" is central to this chapter and the


entire subject. While direct questions like "Define an efficient algorithm"
are not common in the analyzed papers, the principles of efficiency are
implicitly tested in nearly all questions related to time/space complexity
analysis and asymptotic notations. Understanding what makes an
algorithm efficient is the motivation behind the analytical techniques
taught.
●​ Topic: Average, Best, and worst case analysis​

○​ Q.1 (b) Explain: Worst Case, Best Case and Average Case Complexity
with suitable example. (Summer 2022, 4M)
○​ Q.1 (c) Explain the bubble sort algorithm and derive its best case,
1
worst case, and average case time complexity. (Summer 2023, 7M)
○​ Q.1 (c) Write an algorithm for insertion sort. Calculate the best,
1
average and worst case complexity of it. (Winter 2024, 7M)
■​ The ability to define, differentiate, and derive these complexity
cases for standard algorithms, especially basic sorting
algorithms, is a frequently assessed skill, often carrying
significant marks (4-7M).
●​ Topic: Amortized analysis​

○​ Q.1 (b) Explain the need of amortized notation. Explain with suitable
1
example. (Winter 2024, 4M)
■​ Amortized analysis is a more specialized analysis technique.
Questions typically focus on its purpose (the "need") and require
an illustrative example (e.g., dynamic arrays/tables or the
aggregate method).
●​ Topic: Asymptotic Notations (Big O, Big Omega, Big Theta)​

○​ Q.1 (a) Define following terms: (i) Big O Notation, (ii) Big Theta
1
Notation, (iii) Big Omega Notation. (Summer 2023, 3M)
○​ Q.2 (b) What is asymptotic notation? Find out big-oh notation of the
f(n)=3n2+5n+10 (Winter 2023, 4M)
○​ Q.1 (c) Explain asymptotic analysis with all the notations and its
1
mathematical inequalities. (Winter 2022, 7M)
○​ Q.1 (b) Define Big-oh and Theta notations with graph (Summer 2024,
1
4M) [graph exists]
○​ Q.1 (a) Find Omega ( ) notation of function f(n)=2n2+n∗lg n+6n
1
(Summer 2024, 3M)
○​ Q.1 (b) State whether the statements are correct or incorrect with
reasons. 1. O(f(n))+O(f(n))=O(2f(n)) 2. If 3n+5=O(n2), then 3n+5=o(n2)
1
(Winter 2022, 4M)
■​ Asymptotic notations are a cornerstone of algorithm analysis
and are consistently and heavily tested, often appearing in initial
questions (Q.1). Questions span a range from basic definitions
to applying notations to mathematical functions, explaining them
with graphical representations, and understanding their formal
mathematical properties and relationships (e.g., Big O vs. little
o). Mastery of these notations, including their definitions,
calculations, and conceptual distinctions, is critical.
●​ Topic: Analyzing control statement​

○​ This skill is implicitly tested in any question requiring the derivation of


an algorithm's time complexity. Understanding how control structures
like loops (for, while), conditional statements (if-else), and function calls
(especially recursive ones) contribute to the overall count of operations
is fundamental to complexity analysis, for instance, when analyzing
sorting algorithms. Direct definitional questions on "analyzing control
statements" are generally not asked.
●​ Topic: Loop invariant and the correctness of the algorithm​

○​ Q.2 (a) What is the use of Loop Invariant? What should be shown to
1
prove that an algorithm is correct? (Winter 2022, 3M)
■​ Loop invariants provide a formal method for proving algorithm
correctness. Questions on this topic are typically theoretical,
focusing on the definition, purpose, and the three essential
properties (initialization, maintenance, termination) that must be
demonstrated.
●​ Topic: Sorting Algorithms and analysis (Bubble sort, Selection sort,
Insertion sort, Shell sort, Heap sort)​
○​ Bubble Sort:
■​ Q.1 (c) Explain the bubble sort algorithm and derive its best
case, worst case, and average case time complexity. (Summer
1
2023, 7M)
○​ Selection Sort:
■​ Q.1 (c) Write selection sort algorithm and compute running time
of algorithm. (Winter 2023, 7M)
■​ Q.2 (a) Write an algorithm of Selection Sort Method. (Summer
2022, 3M)
○​ Insertion Sort:
■​ Q.1 (c) Write and analyze an insertion sort algorithm to sort n
items into ascending order. (Summer 2024, 7M) [1 time
repeated in Winter 2024, Q.1 (c) Write an algorithm for insertion
sort. Calculate the best, average and worst case complexity of
1
it., 7M]
○​ Heap Sort:
■​ Q.2 (c) OR Give the properties of Heap Tree. Sort the following
data using Heap Sort Method: 20, 50, 30, 75, 90, 60, 80, 25, 10,
40. (Winter 2023, 7M) [diagram exists] (Implied for heap
construction and sorting steps)
○​ General Sorting Comparison:
■​ Q.1 (a) Sort the best case running times of all these algorithms
in a non-decreasing order. LCS, Quick-Sort, Merge-Sort,
Counting-Sort, Heap-Sort, Selection-Sort, Insertion-Sort,
1
Bucket-Sort, Strassen's Algorithm. (Winter 2022, 3M)
■​ The fundamental quadratic sorting algorithms (Bubble,
Selection, Insertion) are common examination topics, typically
requiring students to write the algorithm pseudocode and
perform a detailed complexity analysis (best, worst, and average
cases). Heap sort, an efficient O(nlogn) algorithm, is also tested,
often involving its application to a given dataset and
understanding heap properties. Comparative questions
assessing knowledge of complexities across multiple algorithms
also appear. Shell sort, though part of the syllabus , was not
featured in the analyzed examination papers.
●​ Topic: Sorting in linear time (Bucket sort, Radix sort, Counting sort)​

○​ Bucket Sort:
■​ Q.1 (b) Perform Bucket sort for following sequence: 30, 12, 22,
1
66, 48, 27, 35, 43, 47, 41. (Summer 2023, 4M)
■​ Q.2 (b) Sort the following elements using bucket sort. 10, 21, 29,
1
41, 52 (Winter 2024, 4M)
○​ Counting Sort:
■​ Q.3 (a) OR Apply counting sort for the following numbers to sort
in ascending order. 3, 1, 2, 3, 3, 1 (Winter 2023, 3M)
■​ Q.2 (a) Sort the following elements using counting sort. 2.5, 3, 0,
1
2, 3, 0, 3 (Winter 2024, 3M)
■​ Note: The Winter 2024 question for counting sort includes
non-integer data (2.5). Standard counting sort is designed
for integers. This might imply a variation, a need for data
transformation, or an assumption about handling such
inputs.
■​ Linear time sorting algorithms like Bucket Sort and Counting
Sort are typically examined through application-based questions
where students must sort a given dataset. These questions
usually carry 3-4 marks. Radix sort, while included in the
syllabus , did not appear in the specific set of question papers
analyzed for this compilation.

Chapter 3: Divide and Conquer Algorithm

(Syllabus Weightage: 15%, Total Hrs: 06)

The Divide and Conquer (D&C) paradigm is a fundamental algorithmic technique


with significant representation in examinations. This chapter focuses on
understanding the D&C approach, methods for solving recurrence relations that arise
from D&C algorithms (with a strong emphasis on the Master Theorem), and the
detailed study of key algorithms such as Binary Search, Merge Sort, and Quick Sort.
Students should expect a combination of theoretical questions (e.g., stating and
applying the Master Theorem) and problem-solving applications of D&C algorithms.
●​ Topic: Introduction to Divide and Conquer​

○​ Q.3 (b) Write an algorithm for Max-Min problem using divide and
1
conquer approach. Calculate its complexity. (Winter 2024, 4M)
■​ While direct definitional questions like "Define Divide and
Conquer" are infrequent, a thorough understanding of the three
core steps (Divide, Conquer, Combine) is essential. This
understanding is implicitly tested when explaining specific D&C
algorithms (like Merge Sort or Quick Sort) or when asked to
design a D&C solution for problems like the Max-Min problem.
●​ Topic: Recurrence and different methods to solve recurrence (Master
Theorem, Substitution, Recursion Tree)​

○​ Master Theorem:
■​ Q.1 (b) Solve the following using Master's theorem: a.
T(n)=2T(n/4)+1 b. T(n)=3T(n/4)+nlgn (Winter 2023, 4M)
■​ Q.2 (b) Solve following recurrence using Master Theorem:
1
T(n)=3T(n/3)+n∧3. (Summer 2024, 4M)
■​ Q.2 (c) Write the Master theorem. Solve following recurrence
using it. (i) T(n)=3T(n/2)+n2 (ii) T(n)=2T(n/2)+n log n (Winter
1
2024, 7M)
○​ Substitution Method:
■​ Q.2 (b) What is a recurrence? Solve recurrence equation for
1
T(n)=T(n−1)+1 using substitution method. (Summer 2023, 4M)
○​ Recursion Tree Method:
■​ Q.2 (c) OR What is recurrence? Explain recursion-tree method
1
with suitable example. (Summer 2024, 7M)
■​ Q.2 (c) OR Perform the analysis of a recurrence relation
T(n)=2T(2n​)+θ(n2) by drawing its recurrence tree. (Winter 2022,
1
7M) [diagram exists] (Implied for tree drawing)
○​ Iterative Method (similar to Substitution/Unrolling):
■​ Q.2 (c) OR Solve following recurrence relation using iterative
method T(n)=T(n−1)+1 with T(0)=0 as initial condition. Also find
big oh notation (Summer 2022, 7M)
○​ General Recurrence Questions:
■​ Q.2 (c) Write and explain the recurrence relation of Merge Sort.
1
(Winter 2022, 7M)
■​ The ability to solve recurrence relations is a frequently tested
skill, with the Master Theorem being a particularly popular
choice for examiners. Questions vary from directly providing
recurrences for solution to asking students to state the theorem
and then apply it. Other methods like substitution and
recursion-tree are also part of the examination scope. A
fundamental understanding of what a recurrence relation
represents is also expected. The marks for these questions
(ranging from 4M to 7M) underscore the importance of both
procedural application and conceptual understanding of these
solution techniques.
●​ Topic: Multiplying large Integers Problem​

○​ No direct questions specifically addressing the "Multiplying large


Integers Problem" (e.g., Karatsuba algorithm) were found in the
analyzed examination papers from Winter 2022 to Winter 2024.
Although this topic is listed in the syllabus as an application of Divide
and Conquer, its absence in recent papers might suggest a lower
current emphasis compared to other D&C topics like sorting or
recurrence solving.
●​ Topic: Problem Solving using divide and conquer algorithm: Binary
Search​

○​ Q.2 (c) Discuss Binary search algorithm, also write and solve its
1
recurrence relation. (Summer 2023, 7M)
○​ Q.5 (a) Demonstrate Binary Search method to search Key=14, form the
1
array A =<2,4,7,8,10,13,14,60>. (Winter 2023, 3M)
○​ Q.3 (a) OR Consider an array of size 2048 elements sorted in
non-decreasing order. Show how the Binary Search will perform on this
size by analysis of its recurrence relation. Derive the running time.
1
(Winter 2022, 3M)
○​ Q.2 (c) OR Write binary search algorithm using recursion. Derive its
recurrence relation. Calculate its complexity using master theorem.
1
(Winter 2024, 7M)
■​ Binary search is a quintessential D&C algorithm and is
frequently examined. Questions cover various aspects including
writing the algorithm, deriving and solving its recurrence relation,
analyzing its complexity, and demonstrating its application on a
given dataset. The repetition of the demonstration-type question
highlights its practical importance.
●​ Topic: Problem Solving using divide and conquer algorithm: Max-Min
problem​

○​ Q.3 (b) Write an algorithm for Max-Min problem using divide and
1
conquer approach. Calculate its complexity. (Winter 2024, 4M)
■​ This is a standard application of the D&C strategy, testing the
student's ability to formulate a D&C solution for a given problem
and analyze its efficiency.
●​ Topic: Problem Solving using divide and conquer algorithm: Sorting
(Merge Sort, Quick Sort)​
○​ Merge Sort:
■​ Q.3 (a) Sort the List "G,U,J,A,R,A,T,S,A,R,K,A,R" in alphabetical
order using merge sort. (Winter 2023, 3M) [diagram exists]
(Implied for merge steps)
■​ Q.2 (c) OR Explain Merge Sort algorithm with suitable example.
1
(Summer 2023, 7M)
■​ Q.2 (c) Write and explain the recurrence relation of Merge Sort.
1
(Winter 2022, 7M)
○​ Quick Sort:
■​ Q.2 (c) Illustrate the working of the quick sort on input instance:
25, 29, 30, 35, 42, 47, 50, 52, 60. Comment on the nature of
input i.e. best case, average case or worst case. Also discuss
1
worst and best case of quick sort algorithm. (Winter 2023, 7M)
■​ Q.1 (c) Sort the following list using quick sort algorithm:< 5,
3,8,1,4,6,2,7 > Also write Worst and Best case and Average
case of quick sort algorithm. (Summer 2022, 7M)
■​ Q.3 (a) Consider the array 2,4,6,7,8,9,10,12,14,15,17,19,20.
Show (without actually sorting), how the quick sort performance
1
will be affected with such input. (Winter 2022, 3M)
■​ Merge Sort and Quick Sort are flagship D&C sorting algorithms
and are central to this chapter. Examination questions frequently
involve explaining the algorithms, applying them step-by-step to
given data, analyzing their recurrence relations and
complexities, and discussing their performance characteristics
under different input scenarios (especially for Quick Sort, due to
its sensitivity to pivot selection and input order). The high marks
often associated with these questions (typically 7M) signify their
importance. The recurrence of the Quick Sort illustration
question with specific data points towards a common problem
type.
●​ Topic: Problem Solving using divide and conquer algorithm: Matrix
Multiplication (Strassen's)​

○​ Q.3 (b) OR Write an algorithm for matrix multiplication using divide and
1
conquer approach. Calculate its complexity. (Winter 2024, 4M)
■​ This question likely refers to Strassen's algorithm or a general
D&C approach to matrix multiplication.
○​ Q.1 (a) Sort the best case running times of all these algorithms in a
non-decreasing order. LCS, Quick-Sort, Merge-Sort, Counting-Sort,
Heap-Sort, Selection-Sort, Insertion-Sort, Bucket-Sort, Strassen's
1
Algorithm. (Winter 2022, 3M) (Mentioned as part of a list for
complexity comparison)
■​ Matrix multiplication using the D&C approach, exemplified by
Strassen's algorithm, is a known application. Questions may ask
for the algorithm's description or its complexity analysis. Its
inclusion in comparative complexity questions implies an
expectation that students are aware of its efficiency.
●​ Topic: Problem Solving using divide and conquer algorithm: Exponential​

○​ Q.4 (a) Explain Tower of Hanoi Problem, Derive its recursion equation
1
and computer it's time complexity. (Summer 2024, 3M)
■​ The term "Exponential" in the syllabus under D&C likely refers to
problems whose D&C or recursive solutions lead to exponential
time complexities if not carefully designed, or classic recursive
problems like the Tower of Hanoi. The Tower of Hanoi is a
standard example used to illustrate recursion, and its analysis
reveals an exponential time complexity.

Chapter 4: Dynamic Programming

(Syllabus Weightage: 15%, Total Hrs: 05)

Dynamic Programming (DP) is a powerful algorithmic technique for solving


optimization problems by breaking them down into simpler subproblems and utilizing
the property of overlapping subproblems and optimal substructure. This chapter has
a significant weightage, and questions frequently involve applying DP to classic
problems like the Knapsack problem, Longest Common Subsequence (LCS), and
Matrix Chain Multiplication. Theoretical understanding of the Principle of Optimality is
also commonly tested. Students are often required to show detailed steps or fill in
computation tables.
●​ Topic: Introduction to Dynamic Programming​

○​ Q.3 (b) Explain advantages and disadvantages of dynamic


programming. (Summer 2023, 4M) [1 time repeated in Winter 2024
Q.4(b) Enlist the advantages and disadvantages of dynamic
1
programming, 4M]
○​ Q.5 (a) OR Explain Over-lapping Sub-problem with respect to dynamic
1
programming. (Winter 2022, 3M)
■​ Introductory questions may focus on the core characteristics,
pros, and cons of the DP approach, or key concepts like
overlapping subproblems.
●​ Topic: The Principle of Optimality​

○​ Q.3 (a) Explain principle of optimality with suitable example. (Summer


1
2023, 3M)
○​ Q.5 (a) When can we say that a problem exhibits the property of
1
Optimal Sub-structure? (Winter 2022, 3M)
■​ The Principle of Optimality is a cornerstone of dynamic
programming. A clear understanding and the ability to explain it,
often with an example, is frequently assessed. This principle is
fundamental because it justifies why DP can yield globally
optimal solutions by combining optimal solutions to
subproblems.
●​ Topic: Problem Solving using Dynamic Programming: Calculating the
Binomial Coefficient​

○​ Q.3 (b) Explain Binomial Coefficient algorithm using dynamic


1
programming. (Summer 2024, 4M)
○​ Q.4 (a) OR Find out the NCR (35​) Using Dynamic Method. (Winter
2023, 3M)
■​ Calculating binomial coefficients using DP is a standard
example illustrating the tabulation method.
●​ Topic: Problem Solving using Dynamic Programming: Making Change
Problem​

○​ Q.3 (c) Given the denominations: d1=1, d2=4, d3=6. Calculate for
making change of Rs. 8 using dynamic programming. (Summer 2023,
1
7M)
○​ Q.4 (b) Given coins of denominations 2, 3 and 4 with amount to be pay
is 5. Find optimal no. of coins and sequence of coins used to pay given
amount using dynamic method. (Winter 2023, 4M)
■​ The coin change problem is a classic DP application, requiring
students to determine the minimum number of coins for a given
amount.
●​ Topic: Problem Solving using Dynamic Programming: Assembly
Line-Scheduling​

○​ Q.3 (c) Discuss Assembly Line Scheduling problem using dynamic


programming with example. (Summer 2022, 7M)
■​ Assembly line scheduling is another canonical DP problem that
tests the ability to set up recurrence relations and compute
optimal schedules.
●​ Topic: Problem Solving using Dynamic Programming: Knapsack
problem (0/1 Knapsack)​

○​ Q.3 (c) Solve following knapsack problem using dynamic programming


algorithm with given capacity W=5, Weight and Value are as follows
(2,12), (1,10),(3,20),(2,15) (Winter 2023, 7M) with weights solve using
dynamic programming the maximum value the knapsack can have, 7M
(Note: Summer 2024 Q.4(c)OR data seems to be: value with weights
1
)]
○​ Q.3 (c) OR For the given set of items and knapsack capacity =5 kg,
find the optimal solution for the 0/1 knapsack problem using dynamic
programming. (Winter 2024, 7M) [table exists in question]

Item Weight Value

---- | ------ | -----


11 | 2 | 3
12 | 3 | 4
13 | 4 | 5
14 | 5 | 6
[1]
* Q.4 (a) OR Consider a Knapsack with maximum weight capacity M is 7, for the three objects
with value <3, 4, 5> with weights <2, 3, 4> solve using dynamic programming the maximum
value the knapsack can have. (Winter 2022, 3M) [1]
* The 0/1 Knapsack problem is a very common DP question, requiring students to apply the
DP approach (typically by filling a table) to find the maximum value. Its frequent appearance and
high marks (often 7M) highlight its importance.

●​ Topic: Problem Solving using Dynamic Programming: All Points


Shortest path (Floyd-Warshall)​

○​ Q.5 (c) Find all pair of shortest path using Floyd's Algorithm for
1
following graph. (Summer 2024, 7M) [diagram exists]
■​ The Floyd-Warshall algorithm for finding all-pairs shortest paths
is a key DP application in graph problems.
●​ Topic: Problem Solving using Dynamic Programming: Matrix chain
multiplication​
○​ Q.3 (c) Using algorithm find an optimal parenthesization of a matrix
chain product whose sequence of dimension is (5,10,3,12,5,50,6) (use
dynamic programming). (Winter 2023, 7M)
○​ Q.3 (c) The matrices A(5X10), B(10X15), C(15×20), and D(20×25) are
given. Solve the matrix chain multiplication problem using dynamic
1
programming. (Winter 2024, 7M)
○​ Q.4 (a) Given is the S-table after running Chain Matrix Multiplication
algorithm. Calculate the parenthesized output based on
PRINT_OPTIMAL_PARENTHESIS algorithm. Assume the matrix are
names from A1​, A2​,....,An​(Winter 2022, 3M) [table exists in question]

4 1 3 1
2 2 1
3 3
1
○​
1
○​
■​ Matrix Chain Multiplication is a classic DP problem focusing on
finding the optimal order of multiplications. Questions may
involve solving the problem from scratch or interpreting results
from intermediate tables (like the S-table).
●​ Topic: Problem Solving using Dynamic Programming: Longest Common
Subsequence (LCS)​

○​ Q.3 (c) Obtain longest common subsequence using dynamic


programming. Given A= "acabaca" and B= "bacас". (Summer 2024,
1
7M)
○​ Q.2 (b) Apply LCS on sequence <A,B,A,C,B,C> for pattern <A,B,C>
1
(Winter 2022, 4M)
○​ Q.3 (b) Find out LCS of A={K,A,N,D,L,A,P} and B={A,N,D,L} (Summer
2022, 4M)
■​ Finding the Longest Common Subsequence is another
frequently tested DP problem, usually requiring students to fill
the DP table and reconstruct the LCS.

Chapter 5: Greedy Algorithm

(Syllabus Weightage: 15%, Total Hrs: 05)


Greedy algorithms aim to find a global optimum by making a locally optimal choice at
each step. This chapter is heavily weighted and features prominently in exams.
Questions often revolve around applying greedy strategies to standard problems like
Minimum Spanning Trees (MST) using Prim's or Kruskal's algorithms, Huffman
coding, fractional knapsack, and job scheduling. Theoretical questions regarding the
characteristics of greedy algorithms and their comparison with dynamic programming
also appear. A common requirement is to show the step-by-step application of these
algorithms.
●​ Topic: General Characteristics of greedy algorithms​

○​ Q.2 (a) Explain general characteristics of greedy algorithms. (Winter


1
2023, 3M)
○​ Q.3 (b) OR Discuss advantages and disadvantages of greedy
1
algorithm. (Summer 2023, 4M)
○​ Q.4 (a) OR What are the disadvantages of greedy method over
1
dynamic programming method? (Summer 2024, 3M)
○​ Q.3 (b) OR Give difference between greedy approach and dynamic
programming. (Summer 2022, 4M)
■​ Understanding the fundamental nature, properties, advantages,
and limitations of greedy algorithms, especially in contrast to
dynamic programming, is frequently assessed.
●​ Topic: Problem solving using Greedy Algorithm: Activity selection
problem​

1
○​
●​ Topic: Problem solving using Greedy Algorithm: Elements of Greedy
Strategy​

○​ Q.3 (a) OR Explain the steps of greedy strategy for solving a problem
1
(Summer 2024, 3M)
■​ Questions directly ask for an explanation of the general steps or
components involved in designing a greedy algorithm.
●​ Topic: Problem solving using Greedy Algorithm: Minimum Spanning
trees (Kruskal's algorithm, Prim's algorithm)​

○​ Kruskal's Algorithm:
■​ Q.4 (b) OR Write the Kruskal's Algorithm to find out Minimum
Spanning Tree. Apply the same and find MST for the graph
1
given below. (Winter 2023, 4M) [diagram exists]
■​ Graph for Winter 2023 Q.4(b)OR and Summer 2022
Q.4(b)OR: Vertices 1-7, edges (1,2,28), (1,6,10), (2,3,14),
(2,7,16), (3,4,12), (4,7,18), (4,5,22), (5,7,24), (5,6,25).
■​ Q.4 (c) OR Draw the minimum spanning tree correspond to
following graph using Kruskal's algorithm and find weight of
MST: (Summer 2023, 7M) [diagram exists]
■​ Graph for Summer 2023 Q.4(c)OR: Vertices a-i, edges
(a,b,4), (a,h,8), (b,c,8), (b,h,11), (c,d,7), (c,f,4), (c,i,2),
1
(d,e,9), (d,f,14), (e,f,10), (f,g,2), (g,h,1), (g,i,6), (h,i,7).
■​ Q.3 (c) Apply Kruskal's algorithm on the given graph and step by
step generate the MST. (Winter 2022, 7M) [diagram exists] (Graph
1
G(V,E) FIG:1)
■​ Graph for Winter 2022 Q.3(c) (FIG:1): Vertices A-H,
edges (A,B,1), (A,D,4), (A,E,3), (B,C,2), (B,E,5), (C,F,11),
(D,E,2), (D,G,9), (E,F,10), (E,H,8), (F,H,7), (G,H,12).
○​ Prim's Algorithm:
■​ Q.4 (c) Draw the minimum spanning tree correspond to following
graph using Prim's algorithm and find the MST weight: (Summer
2023, 7M) [diagram exists]
■​ Graph for Summer 2023 Q.4(c): Vertices 0-6, edges
(0,1,28), (0,5,10), (1,2,14), (1,6,16), (2,3,12), (3,4,22),
1
(3,6,18), (4,5,25), (4,6,24).
■​ Q.3 (c) OR What is a minimum spanning tree? Draw the
minimum spanning tree correspond to following graph using
Prim's algorithm. (Summer 2024, 7M) [diagram exists]
■​ Graph for Summer 2024 Q.3(c)OR: Vertices 1-7, edges
(1,2,5), (1,4,1), (1,5,3), (2,3,2), (2,4,9), (3,4,8), (3,6,4),
1
(3,7,7), (4,5,3), (5,6,6), (6,7,2).
■​ Q.4 (c) Define minimum spanning tree. Explain Prim's algorithm
1
with suitable example. (Winter 2024, 7M)
■​ Q.3 (c) OR Apply Prim's algorithm on the given graph in Q.3 (C)
FIG:1 Graph G(V,E) and step by step generate the MST. (Winter
1
2022, 7M) [diagram exists] (Refers to FIG:1 from Q.3(c))
■​ Q.4 (b) Find Minimum Spanning Tree for the given graph using
Prim's Algorithm. (Summer 2022, 4M) [diagram exists]
■​ Graph for Summer 2022 Q.4(b): Vertices a-f, edges
(a,b,1), (a,d,5), (a,e,13), (b,c,3), (b,d,4), (c,d,2), (c,f,5),
(d,e,8), (d,f,15).
○​ Comparison/Definition:
■​ Q.4 (a) OR Differentiate between Kruskal's algorithm and Prim's
1
algorithm for finding MST. (Summer 2023, 3M)
■​ MST algorithms, specifically Prim's and Kruskal's, are very
frequently tested. Questions typically provide a graph and
require students to find the MST using one of these algorithms,
often asking to show the steps involved and the final MST
weight. Definitional questions about MSTs and comparisons
between the two algorithms also occur.
●​ Topic: Problem solving using Greedy Algorithm: Graphs: Shortest paths
(Dijkstra's - though not explicitly named here, it's the common greedy
for SSSP)​

○​ (While "Shortest paths" is listed, specific questions on single-source


shortest path algorithms like Dijkstra's using a greedy approach were
not as prominent as MST algorithms in the analyzed set of papers
under the Greedy chapter. All-pairs shortest path (Floyd-Warshall)
appeared under Dynamic Programming.)
●​ Topic: Problem solving using Greedy Algorithm: The Knapsack Problem
(Fractional Knapsack)​

○​ Q.5 (b) Solve the following knapsack problem using greedy method.
Number of items = 5, knapsack capacity W=100, weight vector
1
={50,40,30,20,10} and profit vector={1,2,3,4,5} (Winter 2023, 4M)
○​ Q.3 (c) OR Consider Knapsack capacity W=15. w=(4,5,6,3) and
v=(10,15,12,8) find the maximum profit using greedy method. (Summer
2022, 7M)
○​ Q.4 (c) OR "A greedy strategy will work for fractional Knapsack
problem but not for 0/1′′, is this true or false? Explain with suitable
example. (Winter 2024, 7M) [1 time repeated in Winter 2022 Q.3(b) "A
greedy strategy will work for fractional Knapsack problem but not for
1
0/1′′, is this true or false? Explain., 4M]
○​ Q.4 (c) OR Explain fractional knapsack problem with example.
(Summer 2022, 7M)
■​ The fractional knapsack problem is a classic application of the
greedy method. Questions involve applying the greedy strategy
(typically by selecting items with the highest profit/weight ratio)
to a given set of items and capacity. A critical concept often
tested is the distinction between why greedy works for fractional
knapsack but not for the 0/1 knapsack problem.
●​ Topic: Problem solving using Greedy Algorithm: Job Scheduling
Problem​
○​ Q.3 (b) Following are the details of various jobs to be scheduled on
multiple processors such that no two processes execute at the same
on the same processor. Show schedule of these jobs on minimum
number of processors using greedy approach. (Winter 2023, 4M) [table
exists in question]

Jobs Start time Finish time

---- | ---------- | -----------


<span class="math-inline">J\_\{1\}</span> | 0 | 2
<span class="math-inline">J\_\{2\}</span> | 3 | 7
<span class="math-inline">J\_\{3\}</span> | 4 | 7
<span class="math-inline">J\_\{4\}</span> | 9 | 11
<span class="math-inline">J\_\{5\}</span> | 7 | 10
<span class="math-inline">J\_\{6\}</span> | 1 | 5
<span class="math-inline">J\_\{7\}</span> | 6 | 8

* Q.4 (b) Using greedy algorithm find an optimal schedule for following jobs with <span
class="math-inline">n\=7</span> profits: (P1, P2, P3, P4, P5, P6, <span
class="math-inline">P7\)\=\(3,5,18,20,6,1,38\)</span> and deadline (d1, d2, <span
class="math-inline">d3,d4,d5,d6,d7\)\=\(1,3,3,4,1,2,1\)</span> (Summer 2024, 4M) [1]
* Job scheduling problems, often involving deadlines and profits, or minimizing processors,
are standard greedy algorithm applications.

●​ Topic: Problem solving using Greedy Algorithm: Huffman code


○​ Q.3 (b) OR Find the Optimal Huffman code for each symbol in following
text ABCCDEBABFFBACBEBDFAAAABCDEEDCCBFEBFCAE
(Winter 2023, 4M)
○​ Q.4 (a) Find an optimal Huffman code for the following set of frequency.
1
a: 40, b: 20, c: 15, d: 30, e: 10. (Summer 2023, 3M)
○​ Q.4 (a) OR Explain Huffman code with Example. (Summer 2022, 3M)
■​ Huffman coding is a common greedy algorithm problem.
Questions typically require constructing the Huffman tree and
deriving the codes for given characters and their frequencies, or
sometimes from a given text by first calculating frequencies.

Chapter 6: Exploring Graphs

(Syllabus Weightage: 10%, Total Hrs: 04)


This chapter focuses on fundamental graph theory concepts and traversal
algorithms. Breadth-First Search (BFS) and Depth-First Search (DFS) are core
topics, frequently tested through application or explanation. Definitions of basic
graph terminologies like "Graph," "Tree," and "Articulation Point" are also common.
More advanced applications like topological sorting and finding connected
components or articulation points build upon these traversal techniques.
●​ Topic: An introduction using graphs and games​

○​ (This is a conceptual introduction; direct questions are unlikely. The


understanding is assessed through application in graph problems.)
●​ Topic: Undirected Graph, Directed Graph​

○​ Q.3 (a) OR Explain Weighted Graph, Undirected Graph, Directed


1
Graph. (Summer 2023, 3M)
■​ Basic definitions distinguishing types of graphs are examinable.
●​ Topic: Traversing Graphs: Depth First Search (DFS)​

○​ Q.4 (b) Explain depth first traversal using suitable example. (Summer
1
2023, 4M)
1
○​ Q.4 (a) Explain DFS with suitable example. (Winter 2024, 3M)
○​ Q.5 (a) OR Define BFS. How it is differ from DFS. (Summer 2024, 3M)
1

■​ Explaining DFS, often with an example graph traversal, is a


common question. Comparisons with BFS also occur.
Understanding DFS is crucial as it forms the basis for many
other graph algorithms like topological sort and finding
articulation points.
●​ Topic: Traversing Graphs: Breadth First Search (BFS)​

○​ Q.5 (b) OR Traverse the following graph using Breadth First Search
Technique. Also draw BFS Tree for a given graph. (Winter 2023, 4M)
[diagram exists]
■​ Graph for Winter 2023 Q.5(b)OR: Vertices R, S, T, U, V, W, X, Y
with edges forming a connected component.
○​ Q.4 (c) Explain Breath First Traversal Method for Graph with algorithm
with example. (Summer 2022, 7M)
1
○​ Q.4 (a) OR Explain BFS with suitable example. (Winter 2024, 3M)
○​ Q.5 (a) OR Define BFS. How it is differ from DFS. (Summer 2024, 3M)
1
■​ Similar to DFS, BFS is tested through explanation, application to
a given graph (including drawing the BFS tree), and comparison
with DFS.
●​ Topic: Topological sort​

○​ Q.4 (b) OR Explain the need of topological Sort with example.


1
(Summer 2023, 4M)
○​ Q.4 (c) OR Given is the DAG, apply the algorithm to perform
topological sort and show the sorted graph. (Winter 2022, 7M) [diagram
exists]
■​ Graph for Winter 2022 Q.4(c)OR: DAG with nodes A, B, C, E, F,
1
G.
■​ Topological sort, applicable to Directed Acyclic Graphs (DAGs),
is examined for its purpose and application.
●​ Topic: Connected components​

○​ Q.4 (c) Apply the algorithm to find strongly connected components from
the given graph. (Winter 2022, 7M) [diagram exists]
■​ Graph for Winter 2022 Q.4(c): Graph with nodes A, B, C, D, E,
1
F, G, H.
■​ While the syllabus mentions "Connected components" (typically
for undirected graphs), this question asks for "Strongly
Connected Components" (for directed graphs), which is a more
advanced application often solved using algorithms based on
DFS (like Kosaraju's or Tarjan's).
●​ Topic: Articulation Points (Cut Vertices)​

○​ Q.4 (c) Write an algorithm to find out the articulation points of an


undirected graph. Find out articulation points for the following graph.
Consider vertex 0 as the starting point. (Winter 2023, 7M) [diagram
exists]
■​ Graph for Winter 2023 Q.4(c): Vertices 0-5.
1
○​ Q.2 (a) Explain: Articulation Point, Graph, Tree (Summer 2024, 3M)
○​ Q.5 (b) Define the followings: i) Articulation point ii) Acyclic Directed
1
Graph iii) Back Edge iv) Tree (Winter 2024, 4M)
■​ Finding articulation points is a practical graph problem often
solved using DFS. Definitions of graph-related terms, including
articulation points, are also common.
Chapter 7: Backtracking and Branch and Bound

(Syllabus Weightage: 6%, Total Hrs: 03)

Backtracking and Branch and Bound are techniques used for solving complex
optimization and search problems, often combinatorial in nature. The N-Queens
problem is a classic example frequently used to illustrate backtracking. Questions
may also cover definitions and comparisons of these two techniques, and
occasionally the Minimax principle.
●​ Topic: Introduction to Backtracking and Branch and Bound​

○​ Q.4 (c)OR Explain Backtracking Method. What is N-Queens Problem?


Give solution of 4-Queens Problem using Backtracking Method.
1
(Winter 2023, 7M)
○​ Q.5 (b) OR Differentiate between Backtracking and Branch-and-Bound
1
algorithms. (Summer 2023, 4M)
○​ Q.4 (b) Explain states, constraints types of nodes and bounding
function used by backtracking and branch and bound methods. (Winter
1
2022, 4M)
■​ A fundamental understanding of the backtracking approach is
often tested in conjunction with the N-Queens problem.
Differentiating between backtracking and branch-and-bound,
and understanding their core components like state-space trees,
constraints, and bounding functions, are also key assessment
areas.
●​ Topic: The Eight queens problem (and N-Queens in general)​

○​ Q.4 (c)OR Explain Backtracking Method. What is N-Queens Problem?


Give solution of 4-Queens Problem using Backtracking Method.
1
(Winter 2023, 7M) [2 times repeated, see above]
○​ Q.5 (c) What is state space tree. How do you solve the Eight queens
problem using backtracking with the help of state space tree. (Summer
1
2023, 7M)
○​ Q.5 (b) Draw the state space tree Diagram for 4 Queens problem.
1
(Summer 2024, 4M) [diagram exists]
■​ The N-Queens problem (often specified as 4-Queens or
8-Queens) is a staple for demonstrating backtracking. Questions
frequently require explaining the solution process, providing a
solution, or drawing the state-space tree.
●​ Topic: Knapsack problem (using Backtracking/Branch and Bound)​

○​ (While Knapsack is listed here, specific questions asking for its solution
using Backtracking or Branch and Bound were not prominent in the
analyzed papers. DP and Greedy approaches for Knapsack were more
common in their respective chapters.)
●​ Topic: Travelling Salesman problem (using Backtracking/Branch and
Bound)​

○​ (Similar to Knapsack, TSP is listed, but specific questions requiring its


solution via Backtracking/Branch & Bound in these papers were not
found. TSP is more often discussed in the context of
NP-Completeness.)
○​ Q.5 (c) OR Explain with example, how the Hamiltonian Cycle problem
can be used to solve the Travelling Salesman problem. (Winter 2022,
1
7M)
■​ This question relates TSP to Hamiltonian Cycle, which falls
under NP-Completeness discussions but touches upon problem
reduction relevant to advanced algorithm design.
●​ Topic: Minimax principle​

○​ Q.4 (b) OR Explain the Minimax principle and show its working for
1
simple tic-tac-toe game playing. (Winter 2022, 4M)
○​ Q.5 (b) OR Explain Minimax principal. (Summer 2022, 4M)
■​ The Minimax principle, used in game theory and decision
making, is occasionally tested conceptually, sometimes with a
simple game example.

Chapter 8: String Matching

(Syllabus Weightage: 6%, Total Hrs: 03)

String matching algorithms are concerned with finding occurrences of a pattern string
within a larger text string. Common algorithms tested include the Naive approach
and the Rabin-Karp algorithm, with a particular focus on concepts like spurious hits
in Rabin-Karp. Definitions related to string matching terminology are also examined.
●​ Topic: Introduction to String Matching​
○​ Q.5 (a) What is string-matching problem? Define valid shift and invalid
1
shift. (Summer 2022, 3M)
■​ Basic definitions related to the string matching problem and its
terminology are common starting points.
●​ Topic: The naive string matching algorithm​

○​ Q.5 (b) Write the pseudocode for Naïve String-Matching Algorithm.


1
(Summer 2023, 4M)
○​ Q.5 (b) OR Show that if all the characters of pattern P of size m are
different, the naïve string matching algorithm can perform better with
modification. Write the modified algorithm that performs better than
1
O(n.m). (Winter 2022, 4M)
■​ The naive algorithm is tested for its pseudocode or explanation,
and sometimes for analytical understanding of its performance
under specific conditions.
●​ Topic: The Rabin-Karp algorithm​

○​ Q.5 (c) Explain spurious hits in Rabin-Karp string matching algorithm


with example. Working modulo q=13 how many spurious hits does the
Rabin-Karp matcher encounter in the text T =2359023141526739921
when looking for the pattern P =26739 (Winter 2023, 7M)
■​ Note: A very similar question appeared in Summer 2024
Q.5(c)OR: "Explain spurious hits in Rabin-Karp string matching
algorithm with example. Working modulo q=13 how many
spurious hits does the Rabin Karp matcher encounter in the text
T=235902314152673992 when looking for the pattern
1
P=31415?" (Summer 2024, 7M). Due to the different
text/pattern, it's listed separately but highlights the pattern of this
question type.
1
○​ Q.5 (a) Explain Spurious hits with an example. (Summer 2023, 3M)
■​ The Rabin-Karp algorithm, particularly the concept of spurious
hits (when hash values match but the strings do not), is a key
focus. Questions often require explaining spurious hits and
applying the algorithm to count them in a given scenario.
Understanding modular arithmetic is essential for these
problems.
●​ Topic: String Matching with finite automata​

○​ Q.5 (c) OR What is Finite Automata? Explain use of finite automata for
string matching with suitable example. (Summer 2022, 7M)
■​ The use of finite automata for string matching is occasionally
tested, requiring an explanation of the approach and an
example.
●​ Topic: The Knuth-Morris-Pratt (KMP) algorithm​

○​ Q.5 (b) Create an example of string P of length 7 such that, the prefix
function of KMP string matcher returns π=3, π=1 and π=0 (Winter
1
2022, 4M)
■​ The KMP algorithm, particularly its prefix function (LPS array),
can be tested, sometimes requiring students to construct
examples or understand its properties.

Chapter 9: Introduction to NP-Completeness

(Syllabus Weightage: 11%, Total Hrs: 05)

This chapter delves into the theory of computational complexity, focusing on the
classes P, NP, NP-Complete, and NP-Hard problems. It carries a significant
weightage, and questions are predominantly theoretical, emphasizing definitions and
examples of problems within these classes. Understanding polynomial reduction is
also important. This area tests the conceptual limits of what can be solved efficiently
by algorithms.
●​ Topic: The class P and NP​

○​ Q.5 (c) Define P, NP, NP-complete, NP-Hard problems. Give examples


1
of each (Winter 2023, 7M)
○​ Q.5 (a) OR Explain "P=NP?" problem. (Summer 2022, 3M)
■​ Definitions of P and NP are fundamental and almost always
asked in conjunction with NP-Complete and NP-Hard. The P vs
NP question is a central unsolved problem in computer science.
●​ Topic: Polynomial reduction​

1
○​ Q.5 (a) OR Explain in Brief: Polynomial reduction. (Winter 2023, 3M)
■​ Understanding the concept of polynomial-time reduction is
crucial for the definition of NP-Completeness.
●​ Topic: NP-Completeness Problem​

○​ Q.5 (c) Define P, NP, NP-complete, NP-Hard problems. Give examples


1
of each (Winter 2023, 7M)
○​ Q.5 (a) Define NP-Complete and NP-Hard problems. (Summer 2024,
1
3M)
○​ Q.5 (c) Explain the 3SAT problem and show that it is NP Complete.
1
(Winter 2022, 7M)
■​ The definition of NP-Completeness is a very high-frequency
topic. Students are expected to define it accurately and provide
examples. Understanding proofs of NP-Completeness (like for
3SAT) demonstrates a deeper grasp.
●​ Topic: NP-Hard Problems​

○​ Q.5 (c) Define P, NP, NP-complete, NP-Hard problems. Give examples


1
of each (Winter 2023, 7M)
○​ Q.5 (a) Define NP-Complete and NP-Hard problems. (Summer 2024,
1
3M)
■​ Similar to NP-Complete, defining NP-Hard problems and giving
examples is a standard requirement. The consistent appearance
of questions asking for definitions of P, NP, NP-Complete, and
NP-Hard, often for 7 marks, makes this a very high-yield area for
study.
●​ Topic: Travelling Salesman problem (TSP) & Hamiltonian problem (in
context of NP-Completeness)​

○​ Q.5 (c) OR Explain with example, how the Hamiltonian Cycle problem
can be used to solve the Travelling Salesman problem. (Winter 2022,
1
7M)
■​ TSP and Hamiltonian Cycle are classic examples of
NP-Hard/NP-Complete problems. Questions might explore their
relationship or use them as examples.
●​ Topic: Approximation algorithms​

○​ Q.5 (c) OR Write short note on the followings: i) Approximation


1
algorithms ii) Randomized algorithms (Winter 2024, 7M)
■​ Brief explanations or short notes on approximation algorithms,
which are used to find near-optimal solutions for NP-Hard
problems, may be asked.
●​ Topic: Randomized algorithms​

○​ Q.5 (c) OR Write short note on the followings: i) Approximation


1
algorithms ii) Randomized algorithms (Winter 2024, 7M)
■​ Similar to approximation algorithms, a conceptual understanding
of randomized algorithms might be tested.
●​ Topic: Class of problems beyond NP - P SPACE​

1
○​

Concluding Remarks

This compilation of topic-wise questions from past GTU examinations for "Analysis
and Design of Algorithms" (3150703) aims to provide students with a structured and
comprehensive resource for their exam preparation. The analysis of question papers
from Summer 2022 to Winter 2024 reveals several consistent trends:
●​ Core Topics: Chapters on Analysis of Algorithms (Chapter 2), Divide and
Conquer (Chapter 3), Dynamic Programming (Chapter 4), and Greedy
Algorithms (Chapter 5) form the bulk of the examination, both in terms of
question frequency and mark allocation. NP-Completeness (Chapter 9) is also
heavily tested for its theoretical concepts.
●​ Question Types: A mix of definitional questions (e.g., properties of
algorithms, asymptotic notations, principle of optimality, P/NP definitions),
analytical questions (e.g., deriving complexities, solving recurrences), and
problem-solving questions (e.g., applying sorting algorithms, MST algorithms,
DP solutions to knapsack/LCS, Huffman coding) is evident.
●​ Frequently Repeated Questions/Themes:
○​ Definitions and applications of Asymptotic Notations.
○​ Analysis (best, worst, average case) of basic sorting algorithms
(Insertion, Selection, Bubble, Quick Sort).
○​ Solving recurrence relations, especially using the Master Theorem.
○​ Application of Merge Sort and Quick Sort.
○​ The Principle of Optimality in Dynamic Programming.
○​ 0/1 Knapsack (DP), LCS (DP), Matrix Chain Multiplication (DP).
○​ Prim's and Kruskal's algorithms for MST.
○​ Fractional Knapsack (Greedy) and Huffman Coding.
○​ BFS and DFS traversals.
○​ N-Queens problem using Backtracking.
○​ Rabin-Karp algorithm (spurious hits).
○​ Definitions of P, NP, NP-Complete, and NP-Hard problems.
●​ Diagrams and Step-by-Step Solutions: Many questions, especially those
involving graph algorithms (MST, traversals) or step-wise procedures (sorting,
DP table filling, Huffman tree construction), implicitly or explicitly require
diagrams or detailed procedural steps.
Students are advised to thoroughly understand the fundamental concepts of each
chapter, practice solving problems from each category, and pay special attention to
the frequently repeated themes highlighted in this document. Effective utilization of
this question bank, alongside regular coursework and textbook study, should
significantly enhance preparedness for the university examinations.

You might also like