SlideShare a Scribd company logo
Design & Analysis of Algorithm (TCS-503)
CSE-5th
Semester
Last Date of Submission: 25-Nov-2014
UNIT_1
1. What are the different properties of Asymptotic Notations?
2. Briefly explain Master’s Theorem with suitable example?
3. Can the master method be applied to the recurrence T(n)=4T(n/2) + n2
lg n? why or why
not? Give an asymptotic upper bound for this recurrence.
UNIT_2
1. Prove that a RB-Tree with n internal nodes has height at most 2 lg (n +1).
2. Show the RB-Trees that result after successively inserting the keys 41,38,31,12,19,8 into
an initially empty RB-Tree.
UNIT_3
1. Find an optimal parenthesization of a matrix-chain product whose sequence of
dimensions is <5,10,3,12,5,50,6>? 51
2. Give a dynamic programming solution to the 0-1 knapsack problem that runs in O(nW)
time, where n is number of items and W is the maximum weight of items that the thief
can put in his knapsack?
UNIT_4
1. What is the running time of BFS if its input graph is represented by an adjacency matrix
and the algorithm is modified to handle this form of input?
2. What are MSTs. Give their applications in computer science?
3. Suppose that the graph G=(V,E) is represented as an adjacency matrix. Give a simple
implementation of Prim’s algorithm for this case that runs in O(V2
) time.
4. Run the Bellman-Ford Algorithm on the directed graph Fig(following), using vertex z as
the source. In each pass, relax edges in the same order as in the figure, and show the d
and ∏ values after each pass. Now, change the weight of edge(z,x) to 4 and run the
algorithm again, using s as the source.
5. Run Dijkstra’s algorithm on the directed graph (fig. Following), first using vertex s as the
source and then using vertex z as the source. Show the d and ∏ values and vertices in set
S after each iteration?
6. Run the Floyd-Warshall algorithm on the weighted , directed graph of (fig. Following).
Show that matrix D(k)
that results for each iteration?
7. State the maximum-flow problem as a linear-programming problem?
8. Run the Ford-Fulkerson algorithm on the flow network (fig note dwon from coreman)
and show the residual network after each flow augmentation. Number the vertices in L
top to bottom from 1 to 5 and in R top to bottom from 6 to 9. For each iteration, pick the
augmenting path that is lexicographically smallest.
UNIT_5
1. Suppose that all characters in the pattern P are different. Show how to accelerate NAÏVE-
STRING-MATCHER to run in time O(n) on an n-character text T.
2. Working modulo q=11, how many spurious hits does the Rabin-Karp matcher encounter
in the text T=3141592653589793 when looking for the pattern P=26.
3. Show that if HAM-CYCLE € P, then the problem of listing the vertices of a Hamiltonian
cycle, in order, is polynomial-time complement.
4. Prove that circuit-satisfiability problem is NP-complete?
5. Prove that APPROX-VERTEX-COVER is a polynomial-time-2 approximation
algorithm?
6. Explain set-covering problem with suitable example?
7. Write sort notes on the following-
a) Divide & Conquer Technique
b) Dynamic Programming
c) Greedy Approach
d) Backtracking
e) Branch & Bounds

More Related Content

What's hot (20)

PDF
design and analysis of algorithm
Muhammad Arish
 
PDF
Data Structure: Algorithm and analysis
Dr. Rajdeep Chatterjee
 
PPT
DESIGN AND ANALYSIS OF ALGORITHMS
Gayathri Gaayu
 
PPT
Divide and conquer
Dr Shashikant Athawale
 
PDF
Design & Analysis Of Algorithm
Computer Hardware & Trouble shooting
 
PDF
Design and analysis of algorithm
Varun Ojha
 
DOC
algorithm Unit 3
Monika Choudhery
 
PPTX
Asymptotic Notation and Data Structures
Amrinder Arora
 
PPT
Analysis of Algorithm
أحلام انصارى
 
PPT
Big oh Representation Used in Time complexities
LAKSHMITHARUN PONNAM
 
PDF
Big o
Thanhvinh Vo
 
DOC
Time and space complexity
Ankit Katiyar
 
PPT
Time andspacecomplexity
LAKSHMITHARUN PONNAM
 
PPTX
Algorithm Complexity and Main Concepts
Adelina Ahadova
 
PPTX
Asymptotic analysis
Nisha Soms
 
PDF
Algorithem complexity in data sructure
Kumar
 
PPT
Basic terminologies & asymptotic notations
Rajendran
 
PPTX
Complexity analysis - The Big O Notation
Jawad Khan
 
DOC
algorithm Unit 2
Monika Choudhery
 
design and analysis of algorithm
Muhammad Arish
 
Data Structure: Algorithm and analysis
Dr. Rajdeep Chatterjee
 
DESIGN AND ANALYSIS OF ALGORITHMS
Gayathri Gaayu
 
Divide and conquer
Dr Shashikant Athawale
 
Design & Analysis Of Algorithm
Computer Hardware & Trouble shooting
 
Design and analysis of algorithm
Varun Ojha
 
algorithm Unit 3
Monika Choudhery
 
Asymptotic Notation and Data Structures
Amrinder Arora
 
Analysis of Algorithm
أحلام انصارى
 
Big oh Representation Used in Time complexities
LAKSHMITHARUN PONNAM
 
Time and space complexity
Ankit Katiyar
 
Time andspacecomplexity
LAKSHMITHARUN PONNAM
 
Algorithm Complexity and Main Concepts
Adelina Ahadova
 
Asymptotic analysis
Nisha Soms
 
Algorithem complexity in data sructure
Kumar
 
Basic terminologies & asymptotic notations
Rajendran
 
Complexity analysis - The Big O Notation
Jawad Khan
 
algorithm Unit 2
Monika Choudhery
 

Viewers also liked (6)

PPTX
Analysis &amp; design of algorithm
rahela bham
 
PPT
Introduction
pilavare
 
PPT
DESIGN AND ANALYSIS OF ALGORITHM (DAA)
m.kumarasamy college of engineering
 
PDF
Algorithm Analysis and Design Class Notes
Kumar Avinash
 
PPT
Design and Analysis of Algorithms
Swapnil Agrawal
 
PPTX
Parallel algorithms
Danish Javed
 
Analysis &amp; design of algorithm
rahela bham
 
Introduction
pilavare
 
DESIGN AND ANALYSIS OF ALGORITHM (DAA)
m.kumarasamy college of engineering
 
Algorithm Analysis and Design Class Notes
Kumar Avinash
 
Design and Analysis of Algorithms
Swapnil Agrawal
 
Parallel algorithms
Danish Javed
 
Ad

Similar to Algorithms Question bank (20)

PDF
Daa q.paper
swapnil shinde
 
PPTX
Computer Network Homework Help
Computer Network Assignment Help
 
PDF
D E S I G N A N D A N A L Y S I S O F A L G O R I T H M S J N T U M O D E L...
guest3f9c6b
 
PDF
Cs6402 daa-2 marks set 1
Vai Jayanthi
 
PDF
Cs6402 scad-msm
Jai Ram
 
PDF
Mathematicalfoundationofcomputerscience
jntuworld
 
DOCX
CS 6402 – DESIGN AND ANALYSIS OF ALGORITHMS questio
Karthik Venkatachalam
 
PDF
Cs6402 design and analysis of algorithms may june 2016 answer key
appasami
 
PPTX
Algorithms Design Exam Help
Programming Exam Help
 
PDF
Beltron Programmer IGNOU-MCA-NEW-Syllabus.pdf
Sitamarhi Institute of Technology
 
PDF
Answers withexplanations
Gopi Saiteja
 
PDF
Daa contents by B.Kirron Reddi
B.Kirron Reddi
 
PPTX
Algorithms Design Assignment Help
Programming Homework Help
 
PPTX
Design and Analysis of Algorithms Assignment Help
Programming Homework Help
 
PDF
Data Structures 2007
Sanjay Goel
 
PPTX
Unit1.pptxwertyuiolkjhgfaxcvboiuytrewsdfg
devnagar425
 
PPTX
CS341 Algorithms Analysis and Design-Sec7.pptx
hussein zayed
 
DOCX
in computer data structures and algorithms
FIONACHATOLA
 
Daa q.paper
swapnil shinde
 
Computer Network Homework Help
Computer Network Assignment Help
 
D E S I G N A N D A N A L Y S I S O F A L G O R I T H M S J N T U M O D E L...
guest3f9c6b
 
Cs6402 daa-2 marks set 1
Vai Jayanthi
 
Cs6402 scad-msm
Jai Ram
 
Mathematicalfoundationofcomputerscience
jntuworld
 
CS 6402 – DESIGN AND ANALYSIS OF ALGORITHMS questio
Karthik Venkatachalam
 
Cs6402 design and analysis of algorithms may june 2016 answer key
appasami
 
Algorithms Design Exam Help
Programming Exam Help
 
Beltron Programmer IGNOU-MCA-NEW-Syllabus.pdf
Sitamarhi Institute of Technology
 
Answers withexplanations
Gopi Saiteja
 
Daa contents by B.Kirron Reddi
B.Kirron Reddi
 
Algorithms Design Assignment Help
Programming Homework Help
 
Design and Analysis of Algorithms Assignment Help
Programming Homework Help
 
Data Structures 2007
Sanjay Goel
 
Unit1.pptxwertyuiolkjhgfaxcvboiuytrewsdfg
devnagar425
 
CS341 Algorithms Analysis and Design-Sec7.pptx
hussein zayed
 
in computer data structures and algorithms
FIONACHATOLA
 
Ad

More from Shivalik college of engineering (20)

DOCX
Front pages of practical file
Shivalik college of engineering
 
PDF
Infosystestpattern
Shivalik college of engineering
 
PPT
Introduction to xml
Shivalik college of engineering
 
PPT
stack presentation
Shivalik college of engineering
 
DOCX
Dbms lab file format front page
Shivalik college of engineering
 
DOCX
Question bank toafl
Shivalik college of engineering
 
PPT
computer architecture.
Shivalik college of engineering
 
PPT
Parallel processing
Shivalik college of engineering
 
PPT
SQA presenatation made by krishna ballabh gupta
Shivalik college of engineering
 
PPT
Webapplication ppt prepared by krishna ballabh gupta
Shivalik college of engineering
 
PPTX
Cloud computing prepare by krishna ballabh gupta
Shivalik college of engineering
 
PPT
Cloud computing kb gupta
Shivalik college of engineering
 
PPT
comparing windows and linux ppt
Shivalik college of engineering
 
PPT
Gsm an introduction....
Shivalik college of engineering
 
PPT
Gsm an introduction....
Shivalik college of engineering
 
Front pages of practical file
Shivalik college of engineering
 
Introduction to xml
Shivalik college of engineering
 
Dbms lab file format front page
Shivalik college of engineering
 
Question bank toafl
Shivalik college of engineering
 
computer architecture.
Shivalik college of engineering
 
Parallel processing
Shivalik college of engineering
 
SQA presenatation made by krishna ballabh gupta
Shivalik college of engineering
 
Webapplication ppt prepared by krishna ballabh gupta
Shivalik college of engineering
 
Cloud computing prepare by krishna ballabh gupta
Shivalik college of engineering
 
Cloud computing kb gupta
Shivalik college of engineering
 
comparing windows and linux ppt
Shivalik college of engineering
 
Gsm an introduction....
Shivalik college of engineering
 
Gsm an introduction....
Shivalik college of engineering
 

Recently uploaded (20)

PDF
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PDF
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PPTX
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PPT
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
PDF
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PPTX
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
PDF
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
PPTX
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PDF
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
PPTX
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 

Algorithms Question bank

  • 1. Design & Analysis of Algorithm (TCS-503) CSE-5th Semester Last Date of Submission: 25-Nov-2014 UNIT_1 1. What are the different properties of Asymptotic Notations? 2. Briefly explain Master’s Theorem with suitable example? 3. Can the master method be applied to the recurrence T(n)=4T(n/2) + n2 lg n? why or why not? Give an asymptotic upper bound for this recurrence. UNIT_2 1. Prove that a RB-Tree with n internal nodes has height at most 2 lg (n +1). 2. Show the RB-Trees that result after successively inserting the keys 41,38,31,12,19,8 into an initially empty RB-Tree. UNIT_3 1. Find an optimal parenthesization of a matrix-chain product whose sequence of dimensions is <5,10,3,12,5,50,6>? 51 2. Give a dynamic programming solution to the 0-1 knapsack problem that runs in O(nW) time, where n is number of items and W is the maximum weight of items that the thief can put in his knapsack? UNIT_4 1. What is the running time of BFS if its input graph is represented by an adjacency matrix and the algorithm is modified to handle this form of input? 2. What are MSTs. Give their applications in computer science? 3. Suppose that the graph G=(V,E) is represented as an adjacency matrix. Give a simple implementation of Prim’s algorithm for this case that runs in O(V2 ) time. 4. Run the Bellman-Ford Algorithm on the directed graph Fig(following), using vertex z as the source. In each pass, relax edges in the same order as in the figure, and show the d and ∏ values after each pass. Now, change the weight of edge(z,x) to 4 and run the algorithm again, using s as the source. 5. Run Dijkstra’s algorithm on the directed graph (fig. Following), first using vertex s as the source and then using vertex z as the source. Show the d and ∏ values and vertices in set S after each iteration?
  • 2. 6. Run the Floyd-Warshall algorithm on the weighted , directed graph of (fig. Following). Show that matrix D(k) that results for each iteration? 7. State the maximum-flow problem as a linear-programming problem? 8. Run the Ford-Fulkerson algorithm on the flow network (fig note dwon from coreman) and show the residual network after each flow augmentation. Number the vertices in L top to bottom from 1 to 5 and in R top to bottom from 6 to 9. For each iteration, pick the augmenting path that is lexicographically smallest. UNIT_5 1. Suppose that all characters in the pattern P are different. Show how to accelerate NAÏVE- STRING-MATCHER to run in time O(n) on an n-character text T. 2. Working modulo q=11, how many spurious hits does the Rabin-Karp matcher encounter in the text T=3141592653589793 when looking for the pattern P=26. 3. Show that if HAM-CYCLE € P, then the problem of listing the vertices of a Hamiltonian cycle, in order, is polynomial-time complement. 4. Prove that circuit-satisfiability problem is NP-complete? 5. Prove that APPROX-VERTEX-COVER is a polynomial-time-2 approximation algorithm? 6. Explain set-covering problem with suitable example? 7. Write sort notes on the following- a) Divide & Conquer Technique b) Dynamic Programming c) Greedy Approach d) Backtracking e) Branch & Bounds