(SEM V) THEORY EXAMINATION 2021-22 DESIGN AND ANALYSIS OF ALGORITHM

B.Tech Engineering 0 downloads
₹29.00

DESIGN AND ANALYSIS OF ALGORITHM (KCS-503)

B.Tech (Sem V) – Exam Notes & Answers


SECTION A – Short Answer Type (2 Marks Each)


a. Performance Analysis of Algorithm
Algorithm performance is analyzed using best case, average case, and worst case based on input size and operations executed.


b. Time Complexity of Merge Sort
Merge sort follows divide and conquer.                Recurrence: T(n) = 2T(n/2) + O(n)
Time Complexity = O(n log n) in all cases.


c. Left Rotation in Red-Black Tree
Left rotation is used to balance the tree by rotating nodes to the left when right child becomes heavy.


d. Properties of Fibonacci Heap
It supports faster amortized time for operations like insert, decrease-key, and merge. It consists of a collection of heap-ordered trees.


e. Greedy Programming
Greedy algorithms make locally optimal choices at each step to reach a global solution.


f. Convex Hull
Convex hull is the smallest convex polygon that encloses all given points.


g. Floyd-Warshall Algorithm
It finds shortest paths between all pairs of vertices in a weighted graph.


h. Branch and Bound
It systematically explores solution space while pruning branches that cannot give optimal solutions.


i. Randomized Algorithm
Uses random numbers to make decisions and improves expected performance.


j. NP-Complete and NP-Hard
NP-Complete problems are in NP and NP-Hard. NP-Hard problems may not belong to NP.


SECTION B – Descriptive Answers (10 Marks Each)


Recurrence Relations

Using recursion tree and iteration methods, recurrence relations are solved to find time complexity.


Binomial Heap

A binomial heap is a collection of binomial trees.
Decrease-key operation adjusts heap order by swapping nodes upward.
Time complexity = O(log n).


Kruskal’s Algorithm

Kruskal’s algorithm finds Minimum Spanning Tree by selecting edges in increasing order of weight while avoiding cycles.


N-Queens Problem

The N-Queens problem places N queens on an N×N chessboard so that no two queens attack each other. Backtracking is used to solve it.


Rabin-Karp Algorithm

Uses hashing to match patterns efficiently. Spurious hits occur when hash values match but strings differ.


SECTION C – Long Answer Type


Merge Sort Example

Steps include dividing the list and merging sorted sublists until fully sorted.


Stable vs Unstable Sorting

Stable sorting preserves order of equal elements; unstable does not. Heap sort is unstable.


Red-Black Tree Insertion

Insertion maintains tree properties using recoloring and rotations.


Skip List

A probabilistic data structure allowing fast search, insert, and delete operations.


Fractional Knapsack Problem

Solved using greedy method by selecting items based on value/weight ratio.


Bellman-Ford Algorithm

Finds shortest path from single source and handles negative weights.
Time complexity = O(VE).


Travelling Salesman Problem (TSP)

TSP finds minimum cost tour visiting all cities exactly once. Branch and Bound reduces search space.


Hamiltonian Cycle

Backtracking checks all possible paths to find Hamiltonian cycle.


Vertex Cover Approximation Algorithm

Finds near-optimal vertex cover using greedy approach.


Knuth-Morris-Pratt (KMP) Algorithm

Uses prefix table to avoid re-matching characters.              Time complexity = O(n + m).

File Size
140.3 KB
Uploader
SuGanta International
⭐ Elite Educators Network

Meet Our Exceptional Teachers

Discover passionate educators who inspire, motivate, and transform learning experiences with their expertise and dedication

KISHAN KUMAR DUBEY

KISHAN KUMAR DUBEY

Sant Ravidas Nagar Bhadohi, Uttar Pradesh , Babusarai Market , 221314
5 Years
Years
₹10000+
Monthly
₹201-300
Per Hour

This is Kishan Kumar Dubey. I have done my schooling from CBSE, graduation from CSJMU, post graduati...

Swethavyas bakka

Swethavyas bakka

Hyderabad, Telangana , 500044
10 Years
Years
₹10000+
Monthly
₹501-600
Per Hour

I have 10+ years of experience in teaching maths physics and chemistry for 10th 11th 12th and interm...

Vijaya Lakshmi

Vijaya Lakshmi

Hyderabad, Telangana , New Nallakunta , 500044
30+ Years
Years
₹9001-10000
Monthly
₹501-600
Per Hour

I am an experienced teacher ,worked with many reputed institutions Mount Carmel Convent , Chandrapu...

Shifna sherin F

Shifna sherin F

Gudalur, Tamilnadu , Gudalur , 643212
5 Years
Years
₹6001-7000
Monthly
₹401-500
Per Hour

Hi, I’m Shifna Sherin! I believe that every student has the potential to excel in Math with the righ...

Divyank Gautam

Divyank Gautam

Pune, Maharashtra , Kothrud , 411052
3 Years
Years
Not Specified
Monthly
Not Specified
Per Hour

An IIT graduate having 8 years of experience teaching Maths. Passionate to understand student proble...

Explore Tutors In Your Location

Discover expert tutors in popular areas across India

Personal Fitness Training Near Sector 132 Greater Noida – Achieve Your Health and Fitness Goals with Expert Trainers Noida
Dance Classes (Bollywood, Hip-Hop, Classical) Near Sohna Road – Learn, Perform & Shine Sohna Road, Gurugram
Drawing & Sketching Classes Near By Uttam Nagar – Explore Your Creative Potential Uttam Nagar, Delhi
Spoken English Classes Near Central Park 1 – Improve Confidence and Communication Skills Central Park 2, Gurugram
Guitar Classes Near Mehrauli – Professional Guitar Training in South Delhi Mehrauli, Delhi
Data Analytics Classes Near Kirti Nagar – Build a Future-Ready Career in Data Kirti Nagar, Delhi
Spoken English Classes Near By Lajpat Nagar Build Fluency, Confidence & Professional Communication Skills in 2026 Lajpat Nagar, Delhi
Zumba Classes Near Sector 130 Greater Noida – Enjoy Dance Fitness and Stay Active Sector 130, Noida
Fitness Training Near By Najafgarh Professional Workout Programs for Strength, Weight Loss & Overall Wellness Najafgarh, Delhi
Tailoring & Stitching Classes Near By Dwarka Mor – Learn Professional Sewing Skills Dwarka Mor, Delhi
Music Theory & Composition Near DLF Cyber City – Master the Language of Music DLF Cyber City, Gurugram
Hindi Coaching Classes Near By Dwarka Mor Build Strong Language Skills Dwarka Mor, Delhi
Candle Making Classes Near Sector 83 Gurugram – Learn the Art of Handmade Candles Gurugram
Harmonium Classes Near Sushant Lok Phase 1 – Learn Classical Music with Confidence Sushant Lok Phase 1, Gurugram
Singing / Vocal Training Near Sector 18 Market Area Noida – Learn Music with Professional Vocal Trainers Noida Sector 18, Noida
🇪🇸 Spanish Language Classes Near Golf Course Road – Learn Spanish for Global Communication Golf Course Road, Gurugram
English Spoken Classes Near Rosewood City – Improve Your Confidence and Fluency Rosewood, Gurugram
Personal Fitness Training Near Sector 135 Greater Noida – Achieve Your Health and Fitness Goals with Expert Guidance Sector 135, Noida
Singing / Vocal Training Near Sector 148 Noida – Professional Vocal Coaching for All Levels Noida
🇫🇷 French Language Classes Near Sector 114 Noida – Learn French with Professional Trainers Noida
⭐ Premium Institute Network

Discover Elite Educational Institutes

Connect with top-tier educational institutions offering world-class learning experiences, expert faculty, and innovative teaching methodologies

Réussi Academy of languages

sugandha mishra

Réussi Academy of languages
Madhya pradesh, Indore, G...

Details

Coaching Center
Private
Est. 2021-Present

Sugandha Mishra is the Founder Director of Réussi Academy of Languages, a premie...

IGS Institute

Pranav Shivhare

IGS Institute
Uttar Pradesh, Noida, Sec...

Details

Coaching Center
Private
Est. 2011-2020

Institute For Government Services

Krishna home tutor

Krishna Home tutor

Krishna home tutor
New Delhi, New Delhi, 110...

Details

School
Private
Est. 2001-2010

Krishna home tutor provide tutors for all subjects & classes since 2001

Edustunt Tuition Centre

Lakhwinder Singh

Edustunt Tuition Centre
Punjab, Hoshiarpur, 14453...

Details

Coaching Center
Private
Est. 2021-Present
Great success tuition & tutor

Ginni Sahdev

Great success tuition & tutor
Delhi, Delhi, Raja park,...

Details

Coaching Center
Private
Est. 2011-2020