SlideShare a Scribd company logo
1
DEPARTMENT OF INFORMATION TECHNOLOGY
Subject Code : CS8451 Subject Name : Design & Analysis ofAlgorithms
Class/ Sem : II IT / II Sem Subject In – Charge : Dr. P. Subathra, Prof./IT
QUESTION BANK
UNIT II
BRUTE FORCE AND DIVIDE-AND-CONQUER
Brute Force – Computing an – String Matching - Closest-Pair and Convex-Hull Problems -
Exhaustive Search - Travelling Salesman Problem - Knapsack Problem - Assignment problem. Divide
and Conquer Methodology – Binary Search – Merge sort – Quick sort – Heap Sort - Multiplication of
Large Integers – Closest-Pair and Convex - Hull Problems.
Q. No Question
Marks
Knowled
geLevel
Number
of
Times
inAU
PART - A
BRUTE FORCE
1. Write the advantages of insertion sort. (R 13 NOV/ DEC 2017)
BRUTE FORCE - STRING MATCHING
2. Write the brute force algorithm to string matching. (R 17 APR/MAY2019)
BRUTE FORCE - CLOSEST-PAIRAND CONVEX-HULLPROBLEMS
3. What is the closest – pair problem? (R 13 MAY/JUN 2016)
What is closest-pair problem? (R 13 APR/MAY 2017)
What is the closest-pair problem? (R13 APR/MAY2019)
4. Write an algorithm for brute force closest- pair problem. (R 13 NOV/ DEC 2016)
EXHAUSTIVE SEARCH
5. What is an exhaustive search? (R13 APR/MAY2018)
DIVIDE AND CONQUERMETHODOLOGY
2
Give the general strategy of Divide and Conquer Method. (R 13 MAY/JUN 2016)
Give the general plan of divide and conquer algorithms. (R 13 NOV/ DEC 2017)
Give the general strategy of Divide and Conquer Method. (R13 APR/MAY2019)
State Master's Theorem. (R13 APR/MAY2018)
DIVIDE AND CONQUERMETHODOLOGY – BINARYSEARCH
6. Derive the complexity of Binary Search algorithm. (R 13 APR/MAY 2015)
7. What is worst case complexity of binary search? (R 13 NOV/ DEC 2016)
DIVIDE AND CONQUER METHODOLOGY - MERGE SORT
8. What is the time and space complexity of Merge sort? (R 17 APR/MAY2019)
Q. No Question
Marks
Knowled
geLevel
Number
of
Times
inAU
PART - B
BRUTE FORCE - STRING MATCHING
1. Solve the following using Brute-Force algorithm: (R 13 APR/MAY 2015) (10)
Find whether the given string follows the specific pattern and return 0 or 1
accordingly.
Examples:
a. Pattern:“abba”, input : “redblueredblue” should return 1
b. Pattern:“aaaa”,input: “asdasdasdasd” should return 1
c. Pattern:“aabb”, input: “xyzabcxyzabc” should return 0
2. Solve the following using Brute – Force algorithm: (R 13 APR/MAY 2017)
(13) Find whether the given string follows the specifid pattern and return 0 or 1
accordingly.
Examples:
Pattern:“abba”, input : “redblueredblue” should return 1
Pattern:“aaaa”,input: “asdasdasdasd” should return 1
Pattern:“aabb”, input: “xyzabcxyzabc” should return 0
BRUTE FORCE - CLOSEST-PAIRPROBLEM
3. Explain the Bruteforce method to find the two closest points in a set of n points in
k-dimensional space. (R 13 NOV/ DEC 2017) (13)
4. BRUTE FORCE - CONVEX-HULL PROBLEM
3
5. What is the convex hull problem? Explain the brute force approach to solve
convex-hull with an example. derive the time complexity. (R 17 APR/MAY
2019) (2+7+4)
EXHAUSTIVE SEARCH
EXHAUSTIVE SEARCH - TRAVELLING SALESMAN PROBLEM
6. Find all the solution to the travelling salesman problem (cities and distances
shown below) by exhaustive search. Give the optimal solution. (R 13 MAY/JUN
2016) (16)
7. Find all the solution to the travelling salesman problem (cities and distances
shown below) by exhaustive search. Give the optimal solution. (R13 APR/MAY
2019) (13)
DIVIDE AND CONQUERMETHODOLOGY
Give the running time equation for divide and conquer algorithms. (R 08 APR/ MAY 2011)
Write short notes on : (R 08 APR/ MAY 2011)
d. Divide and Conquer algorithms (3)
e. Randomized algorithms (3)
What is Divide and Conquer strategy. Why recursion is most suited for divide and conquers? (R 08 NOV/ DEC
2015) (6)
DIVIDE AND CONQUERMETHODOLOGY – BINARYSEARCH
4
8. If you have to solve the searching problem for a list of n numbers, how can you
take advantage of the fact that the list is known to be sorted? Give separate
answers for:
Lists represented as arrays.
Lists represented as linked lists.
Compare the time complexities involved in the analysis of both the algorithms. (R
13 APR/MAY 2015) (16)
9. Write the algorithm to perform Binary Search and compute its run time
complexity. (R 13 NOV/ DEC 2015) (8)
10. What is Divide and Conquer strategy and explain the binary search with suitable
example problem. (R 13 APR/MAY 2017) (13)
11. Write the algorithm to perform Binary Search and compute run time complexity.
(R13 APR/MAY2019) (7)
DIVIDE AND CONQUER METHODOLOGY - MERGE SORT
12. Derive the worst case analysis of Merge Sort using suitable illustrations. (R 13
APR/MAY 2015) (8)
13. State and Explain the Merge Sort algorithm and Give the recurrence relation and
efficiency. (R 13 MAY/JUN 2016) (16)
14. Explain the working of Merge Sort Algorithm with an example. (R 13 NOV/ DEC
2017) (13)
15. Discuss the running time of Divide-and-Conquer merge sort algorithm. (R 08
NOV/ DEC 2010) (8)
16. Analyze merge sort for the following numbers using divide and conquer strategy
25, 3, 45, 789, 87, 56, 47, 65, 30, 59, 56, 24. (R 08 NOV/ DEC 2013) (16)
DIVIDE AND CONQUERMETHODOLOGY - QUICK SORT
17. Give the algorithm for Quicksort. With an example show that Quicksort is not a
stable sorting algorithm. (R 13 NOV/ DEC 2016) (16)
18. Write the quick sort algorithm and explain it with an example. Derive the worst
case and average case time complexity. (R 17 APR/MAY2019) (5+4+4)
DIVIDE AND CONQUERMETHODOLOGY - MULTIPLICATIONOF LARGE INTEGERS
19. Explain the method used for performing Multiplication of two large integers.
Explain how Divide and Conquer Method can be used to solve the same. (R 13
MAY/JUN 2016) (16)
20. Formulate an algorithm to multiply n-digit integers using divide and conquer
approach. (R 08 NOV/ DEC 2009) (8)
5
DIVIDE AND CONQUERMETHODOLOGY - CONVEX- HULL PROBLEMS
21. Explain the convex hull problem and the solution involved behind it. (R 13
APR/MAY 2015) (6)
22. Write down the algorithm to construct a convex hull based on divide and conquer
strategy. (R 13 NOV/ DEC 2015) (8)
23. Write down the algorithm to construct a convex hull based divide and conquer
strategy. (R13 APR/MAY2019)(7 )
Q. No Question
Marks
Knowled
geLevel
Number
of
Times
inAU
PART - C
DIVIDE AND CONQUERMETHODOLOGY – BINARYSEARCH
1. Consider the problem of finding the smallest and largest elements in an array of n
numbers.
Design a presorting-based algorithm for solving this problem and determine its
efficiency class. (R13 APR/MAY2018) (7)
Compare the efficiency of the three algorithms: (R13 APR/MAY2018) (8)
The Brute Force Algorithm, This presorting-based algorithm and
The divide and conquer algorithm
DIVIDE AND CONQUER METHODOLOGY - MERGE SORT
2. Explain the Merge Sort algorithm with an example. (R13 APR/MAY2018) (13)
DIVIDE AND CONQUERMETHODOLOGY - QUICK SORT
3. Write an algorithm for quick sort and write its time complexity with example list
as: 5, 3, 1, 9, 8, 2, 4, 7. (R 13 APR/MAY 2017) (15)
4. Write the algorithm for quick sort. Provide a complete analysis of quick sort for
the given set of numbers 12, 33, 23, 43, 44, 55, 64, 77, and 76. (R13 NOV/ DEC
2018) (13)
5. Write an algorithm for Quick sort and write its time complexity with example list
are 5, 3, 1, 9, 8, 2, 4, 7. (R13 APR/MAY2019) (15)
Staff In – Charge Subject Matter Expert HoD/IT

More Related Content

What's hot

Cs2303 theory of computation may june 2016
Cs2303 theory of computation may june 2016Cs2303 theory of computation may june 2016
Cs2303 theory of computation may june 2016
appasami
 
Cs6503 theory of computation november december 2015 be cse anna university q...
Cs6503 theory of computation november december 2015  be cse anna university q...Cs6503 theory of computation november december 2015  be cse anna university q...
Cs6503 theory of computation november december 2015 be cse anna university q...
appasami
 
A Polynomial-Space Exact Algorithm for TSP in Degree-5 Graphs
A Polynomial-Space Exact Algorithm for TSP in Degree-5 GraphsA Polynomial-Space Exact Algorithm for TSP in Degree-5 Graphs
A Polynomial-Space Exact Algorithm for TSP in Degree-5 Graphs
京都大学大学院情報学研究科数理工学専攻
 
Cs6503 theory of computation may june 2016 be cse anna university question paper
Cs6503 theory of computation may june 2016 be cse anna university question paperCs6503 theory of computation may june 2016 be cse anna university question paper
Cs6503 theory of computation may june 2016 be cse anna university question paper
appasami
 
Cs6503 theory of computation april may 2017
Cs6503 theory of computation april may 2017Cs6503 theory of computation april may 2017
Cs6503 theory of computation april may 2017
appasami
 
Acceptability Paradigms in Abstract Argumentation Frameworks
Acceptability Paradigms in Abstract Argumentation FrameworksAcceptability Paradigms in Abstract Argumentation Frameworks
Acceptability Paradigms in Abstract Argumentation Frameworks
Carlo Taticchi
 
Cs6503 theory of computation november december 2016
Cs6503 theory of computation november december 2016Cs6503 theory of computation november december 2016
Cs6503 theory of computation november december 2016
appasami
 
CS2303 Theory of computation April may 2015
CS2303 Theory of computation April may  2015CS2303 Theory of computation April may  2015
CS2303 Theory of computation April may 2015
appasami
 
Topological sort
Topological sortTopological sort
Topological sort
Burhan Ahmed
 
Topoloical sort
Topoloical sortTopoloical sort
Topoloical sort
sahilnarvekar
 
Paper
PaperPaper
I. AO* SEARCH ALGORITHM
I. AO* SEARCH ALGORITHMI. AO* SEARCH ALGORITHM
I. AO* SEARCH ALGORITHM
vikas dhakane
 
Lecture 21 problem reduction search ao star search
Lecture 21 problem reduction search ao star searchLecture 21 problem reduction search ao star search
Lecture 21 problem reduction search ao star search
Hema Kashyap
 
20131216 Stat Journal
20131216 Stat Journal20131216 Stat Journal
20131216 Stat Journal
Med_KU
 
Model toc
Model tocModel toc
Model toc
GUNASUNDARI C
 

What's hot (17)

Cs2303 theory of computation may june 2016
Cs2303 theory of computation may june 2016Cs2303 theory of computation may june 2016
Cs2303 theory of computation may june 2016
 
Cs6503 theory of computation november december 2015 be cse anna university q...
Cs6503 theory of computation november december 2015  be cse anna university q...Cs6503 theory of computation november december 2015  be cse anna university q...
Cs6503 theory of computation november december 2015 be cse anna university q...
 
A Polynomial-Space Exact Algorithm for TSP in Degree-5 Graphs
A Polynomial-Space Exact Algorithm for TSP in Degree-5 GraphsA Polynomial-Space Exact Algorithm for TSP in Degree-5 Graphs
A Polynomial-Space Exact Algorithm for TSP in Degree-5 Graphs
 
Cs6503 theory of computation may june 2016 be cse anna university question paper
Cs6503 theory of computation may june 2016 be cse anna university question paperCs6503 theory of computation may june 2016 be cse anna university question paper
Cs6503 theory of computation may june 2016 be cse anna university question paper
 
Cs6503 theory of computation april may 2017
Cs6503 theory of computation april may 2017Cs6503 theory of computation april may 2017
Cs6503 theory of computation april may 2017
 
Acceptability Paradigms in Abstract Argumentation Frameworks
Acceptability Paradigms in Abstract Argumentation FrameworksAcceptability Paradigms in Abstract Argumentation Frameworks
Acceptability Paradigms in Abstract Argumentation Frameworks
 
Cs6503 theory of computation november december 2016
Cs6503 theory of computation november december 2016Cs6503 theory of computation november december 2016
Cs6503 theory of computation november december 2016
 
algo1
algo1algo1
algo1
 
Cs 73
Cs 73Cs 73
Cs 73
 
CS2303 Theory of computation April may 2015
CS2303 Theory of computation April may  2015CS2303 Theory of computation April may  2015
CS2303 Theory of computation April may 2015
 
Topological sort
Topological sortTopological sort
Topological sort
 
Topoloical sort
Topoloical sortTopoloical sort
Topoloical sort
 
Paper
PaperPaper
Paper
 
I. AO* SEARCH ALGORITHM
I. AO* SEARCH ALGORITHMI. AO* SEARCH ALGORITHM
I. AO* SEARCH ALGORITHM
 
Lecture 21 problem reduction search ao star search
Lecture 21 problem reduction search ao star searchLecture 21 problem reduction search ao star search
Lecture 21 problem reduction search ao star search
 
20131216 Stat Journal
20131216 Stat Journal20131216 Stat Journal
20131216 Stat Journal
 
Model toc
Model tocModel toc
Model toc
 

Similar to 2. cs8451 daa anna univ question bank unit 2

4. cs8451 daa anna univ question bank unit 4
4. cs8451 daa anna univ question bank unit 44. cs8451 daa anna univ question bank unit 4
5. cs8451 daa anna univ question bank unit 5
5. cs8451 daa anna univ question bank unit 55. cs8451 daa anna univ question bank unit 5
Anna University Question Bank Unit I
Anna University Question Bank Unit IAnna University Question Bank Unit I
Anna University Question Bank Unit I
Anna University Question Bank Unit IAnna University Question Bank Unit I
CS 6402 – DESIGN AND ANALYSIS OF ALGORITHMS questio
CS 6402 – DESIGN AND ANALYSIS OF ALGORITHMS questioCS 6402 – DESIGN AND ANALYSIS OF ALGORITHMS questio
CS 6402 – DESIGN AND ANALYSIS OF ALGORITHMS questio
Karthik Venkatachalam
 
VTU 1ST SEM PROGRAMMING IN C & DATA STRUCTURES SOLVED PAPERS OF JUNE-2015 & ...
VTU 1ST SEM  PROGRAMMING IN C & DATA STRUCTURES SOLVED PAPERS OF JUNE-2015 & ...VTU 1ST SEM  PROGRAMMING IN C & DATA STRUCTURES SOLVED PAPERS OF JUNE-2015 & ...
VTU 1ST SEM PROGRAMMING IN C & DATA STRUCTURES SOLVED PAPERS OF JUNE-2015 & ...
vtunotesbysree
 
2nd Semester M Tech: Structural Engineering (June-2015) Question Papers
2nd  Semester M Tech: Structural Engineering  (June-2015) Question Papers2nd  Semester M Tech: Structural Engineering  (June-2015) Question Papers
2nd Semester M Tech: Structural Engineering (June-2015) Question Papers
BGS Institute of Technology, Adichunchanagiri University (ACU)
 
Lesson 6 recursion
Lesson 6  recursionLesson 6  recursion
Lesson 6 recursion
MLG College of Learning, Inc
 
QUESTION BANK FOR ANNA UNNIVERISTY SYLLABUS
QUESTION BANK FOR ANNA UNNIVERISTY SYLLABUSQUESTION BANK FOR ANNA UNNIVERISTY SYLLABUS
QUESTION BANK FOR ANNA UNNIVERISTY SYLLABUS
JAMBIKA
 
2nd Semester M Tech: Computer Science and Engineering (Jun-2016) Question Pa...
2nd  Semester M Tech: Computer Science and Engineering (Jun-2016) Question Pa...2nd  Semester M Tech: Computer Science and Engineering (Jun-2016) Question Pa...
2nd Semester M Tech: Computer Science and Engineering (Jun-2016) Question Pa...
BGS Institute of Technology, Adichunchanagiri University (ACU)
 
CS 542 -- Query Execution
CS 542 -- Query ExecutionCS 542 -- Query Execution
CS 542 -- Query ExecutionJ Singh
 
Descriptionsordernametypeformatvallabvarlab1location_idint8.0gNum.docx
Descriptionsordernametypeformatvallabvarlab1location_idint8.0gNum.docxDescriptionsordernametypeformatvallabvarlab1location_idint8.0gNum.docx
Descriptionsordernametypeformatvallabvarlab1location_idint8.0gNum.docx
cuddietheresa
 
ARIES: An Eclipse Plug-in To Support Extract Class Refactoring
ARIES: An Eclipse Plug-in To Support Extract Class RefactoringARIES: An Eclipse Plug-in To Support Extract Class Refactoring
ARIES: An Eclipse Plug-in To Support Extract Class Refactoring
Fabio Palomba
 
Data Structures & Algorithms Coursework Assignment for Sem.docx
Data Structures & Algorithms Coursework Assignment for Sem.docxData Structures & Algorithms Coursework Assignment for Sem.docx
Data Structures & Algorithms Coursework Assignment for Sem.docx
simonithomas47935
 
R and Visualization: A match made in Heaven
R and Visualization: A match made in HeavenR and Visualization: A match made in Heaven
R and Visualization: A match made in Heaven
Edureka!
 
Descriptionsordernametypeformatvallabvarlab1location_idint8.0gNum.docx
Descriptionsordernametypeformatvallabvarlab1location_idint8.0gNum.docxDescriptionsordernametypeformatvallabvarlab1location_idint8.0gNum.docx
Descriptionsordernametypeformatvallabvarlab1location_idint8.0gNum.docx
carolinef5
 
Descriptionsordernametypeformatvallabvarlab1location_idint8.0gNum.docx
Descriptionsordernametypeformatvallabvarlab1location_idint8.0gNum.docxDescriptionsordernametypeformatvallabvarlab1location_idint8.0gNum.docx
Descriptionsordernametypeformatvallabvarlab1location_idint8.0gNum.docx
donaldp2
 
Data Structures And Algorithms Roadmap for Beginners By ScholarHat PDF
Data Structures And Algorithms Roadmap for Beginners  By ScholarHat PDFData Structures And Algorithms Roadmap for Beginners  By ScholarHat PDF
Data Structures And Algorithms Roadmap for Beginners By ScholarHat PDF
Scholarhat
 
Daa tutorial
Daa tutorialDaa tutorial
Daa tutorial
poojagupta010
 

Similar to 2. cs8451 daa anna univ question bank unit 2 (20)

4. cs8451 daa anna univ question bank unit 4
4. cs8451 daa anna univ question bank unit 44. cs8451 daa anna univ question bank unit 4
4. cs8451 daa anna univ question bank unit 4
 
5. cs8451 daa anna univ question bank unit 5
5. cs8451 daa anna univ question bank unit 55. cs8451 daa anna univ question bank unit 5
5. cs8451 daa anna univ question bank unit 5
 
Anna University Question Bank Unit I
Anna University Question Bank Unit IAnna University Question Bank Unit I
Anna University Question Bank Unit I
 
Anna University Question Bank Unit I
Anna University Question Bank Unit IAnna University Question Bank Unit I
Anna University Question Bank Unit I
 
CS 6402 – DESIGN AND ANALYSIS OF ALGORITHMS questio
CS 6402 – DESIGN AND ANALYSIS OF ALGORITHMS questioCS 6402 – DESIGN AND ANALYSIS OF ALGORITHMS questio
CS 6402 – DESIGN AND ANALYSIS OF ALGORITHMS questio
 
VTU 1ST SEM PROGRAMMING IN C & DATA STRUCTURES SOLVED PAPERS OF JUNE-2015 & ...
VTU 1ST SEM  PROGRAMMING IN C & DATA STRUCTURES SOLVED PAPERS OF JUNE-2015 & ...VTU 1ST SEM  PROGRAMMING IN C & DATA STRUCTURES SOLVED PAPERS OF JUNE-2015 & ...
VTU 1ST SEM PROGRAMMING IN C & DATA STRUCTURES SOLVED PAPERS OF JUNE-2015 & ...
 
2nd Semester M Tech: Structural Engineering (June-2015) Question Papers
2nd  Semester M Tech: Structural Engineering  (June-2015) Question Papers2nd  Semester M Tech: Structural Engineering  (June-2015) Question Papers
2nd Semester M Tech: Structural Engineering (June-2015) Question Papers
 
Lesson 6 recursion
Lesson 6  recursionLesson 6  recursion
Lesson 6 recursion
 
QUESTION BANK FOR ANNA UNNIVERISTY SYLLABUS
QUESTION BANK FOR ANNA UNNIVERISTY SYLLABUSQUESTION BANK FOR ANNA UNNIVERISTY SYLLABUS
QUESTION BANK FOR ANNA UNNIVERISTY SYLLABUS
 
2nd Semester M Tech: Computer Science and Engineering (Jun-2016) Question Pa...
2nd  Semester M Tech: Computer Science and Engineering (Jun-2016) Question Pa...2nd  Semester M Tech: Computer Science and Engineering (Jun-2016) Question Pa...
2nd Semester M Tech: Computer Science and Engineering (Jun-2016) Question Pa...
 
CS 542 -- Query Execution
CS 542 -- Query ExecutionCS 542 -- Query Execution
CS 542 -- Query Execution
 
Descriptionsordernametypeformatvallabvarlab1location_idint8.0gNum.docx
Descriptionsordernametypeformatvallabvarlab1location_idint8.0gNum.docxDescriptionsordernametypeformatvallabvarlab1location_idint8.0gNum.docx
Descriptionsordernametypeformatvallabvarlab1location_idint8.0gNum.docx
 
ARIES: An Eclipse Plug-in To Support Extract Class Refactoring
ARIES: An Eclipse Plug-in To Support Extract Class RefactoringARIES: An Eclipse Plug-in To Support Extract Class Refactoring
ARIES: An Eclipse Plug-in To Support Extract Class Refactoring
 
Data Structures & Algorithms Coursework Assignment for Sem.docx
Data Structures & Algorithms Coursework Assignment for Sem.docxData Structures & Algorithms Coursework Assignment for Sem.docx
Data Structures & Algorithms Coursework Assignment for Sem.docx
 
R and Visualization: A match made in Heaven
R and Visualization: A match made in HeavenR and Visualization: A match made in Heaven
R and Visualization: A match made in Heaven
 
Descriptionsordernametypeformatvallabvarlab1location_idint8.0gNum.docx
Descriptionsordernametypeformatvallabvarlab1location_idint8.0gNum.docxDescriptionsordernametypeformatvallabvarlab1location_idint8.0gNum.docx
Descriptionsordernametypeformatvallabvarlab1location_idint8.0gNum.docx
 
Descriptionsordernametypeformatvallabvarlab1location_idint8.0gNum.docx
Descriptionsordernametypeformatvallabvarlab1location_idint8.0gNum.docxDescriptionsordernametypeformatvallabvarlab1location_idint8.0gNum.docx
Descriptionsordernametypeformatvallabvarlab1location_idint8.0gNum.docx
 
Data Structures And Algorithms Roadmap for Beginners By ScholarHat PDF
Data Structures And Algorithms Roadmap for Beginners  By ScholarHat PDFData Structures And Algorithms Roadmap for Beginners  By ScholarHat PDF
Data Structures And Algorithms Roadmap for Beginners By ScholarHat PDF
 
Recursive
RecursiveRecursive
Recursive
 
Daa tutorial
Daa tutorialDaa tutorial
Daa tutorial
 

More from P. Subathra Kishore, KAMARAJ College of Engineering and Technology, Madurai

3.1 Trees ( Introduction, Binary Trees & Binary Search Trees)
3.1 Trees ( Introduction, Binary Trees & Binary Search Trees)3.1 Trees ( Introduction, Binary Trees & Binary Search Trees)
3.1 Trees ( Introduction, Binary Trees & Binary Search Trees)
P. Subathra Kishore, KAMARAJ College of Engineering and Technology, Madurai
 
2.2 stack applications Infix to Postfix & Evaluation of Post Fix
2.2 stack applications Infix to Postfix & Evaluation of Post Fix2.2 stack applications Infix to Postfix & Evaluation of Post Fix
2.2 stack applications Infix to Postfix & Evaluation of Post Fix
P. Subathra Kishore, KAMARAJ College of Engineering and Technology, Madurai
 
1. C Basics for Data Structures Bridge Course
1. C Basics for Data Structures   Bridge Course1. C Basics for Data Structures   Bridge Course
Approximation Algorithms TSP
Approximation Algorithms   TSPApproximation Algorithms   TSP
Optimal binary search tree dynamic programming
Optimal binary search tree   dynamic programmingOptimal binary search tree   dynamic programming
The stable marriage problem iterative improvement method
The stable marriage problem iterative improvement methodThe stable marriage problem iterative improvement method
The stable marriage problem iterative improvement method
P. Subathra Kishore, KAMARAJ College of Engineering and Technology, Madurai
 
Maximum matching in bipartite graphs iterative improvement method
Maximum matching in bipartite graphs   iterative improvement methodMaximum matching in bipartite graphs   iterative improvement method
Maximum matching in bipartite graphs iterative improvement method
P. Subathra Kishore, KAMARAJ College of Engineering and Technology, Madurai
 
Knapsack dynamic programming formula top down (1)
Knapsack dynamic programming formula top down (1)Knapsack dynamic programming formula top down (1)
Knapsack dynamic programming formula top down (1)
P. Subathra Kishore, KAMARAJ College of Engineering and Technology, Madurai
 
Knapsack dynamic programming formula bottom up
Knapsack dynamic programming formula bottom upKnapsack dynamic programming formula bottom up
Multiplication of integers & strassens matrix multiplication subi notes
Multiplication of integers & strassens matrix multiplication   subi notesMultiplication of integers & strassens matrix multiplication   subi notes
Multiplication of integers & strassens matrix multiplication subi notes
P. Subathra Kishore, KAMARAJ College of Engineering and Technology, Madurai
 

More from P. Subathra Kishore, KAMARAJ College of Engineering and Technology, Madurai (20)

TestFile
TestFileTestFile
TestFile
 
3.1 Trees ( Introduction, Binary Trees & Binary Search Trees)
3.1 Trees ( Introduction, Binary Trees & Binary Search Trees)3.1 Trees ( Introduction, Binary Trees & Binary Search Trees)
3.1 Trees ( Introduction, Binary Trees & Binary Search Trees)
 
2.1 STACK & QUEUE ADTS
2.1 STACK & QUEUE ADTS2.1 STACK & QUEUE ADTS
2.1 STACK & QUEUE ADTS
 
2.2 stack applications Infix to Postfix & Evaluation of Post Fix
2.2 stack applications Infix to Postfix & Evaluation of Post Fix2.2 stack applications Infix to Postfix & Evaluation of Post Fix
2.2 stack applications Infix to Postfix & Evaluation of Post Fix
 
1. 6 doubly linked list
1. 6 doubly linked list1. 6 doubly linked list
1. 6 doubly linked list
 
1. 5 Circular singly linked list
1. 5 Circular singly linked list1. 5 Circular singly linked list
1. 5 Circular singly linked list
 
1. 4 Singly linked list deletion
1. 4 Singly linked list deletion1. 4 Singly linked list deletion
1. 4 Singly linked list deletion
 
1. 3 singly linked list insertion 2
1. 3 singly linked list   insertion 21. 3 singly linked list   insertion 2
1. 3 singly linked list insertion 2
 
1. 2 Singly Linked List
1. 2 Singly Linked List1. 2 Singly Linked List
1. 2 Singly Linked List
 
1. C Basics for Data Structures Bridge Course
1. C Basics for Data Structures   Bridge Course1. C Basics for Data Structures   Bridge Course
1. C Basics for Data Structures Bridge Course
 
Approximation Algorithms TSP
Approximation Algorithms   TSPApproximation Algorithms   TSP
Approximation Algorithms TSP
 
Optimal binary search tree dynamic programming
Optimal binary search tree   dynamic programmingOptimal binary search tree   dynamic programming
Optimal binary search tree dynamic programming
 
The stable marriage problem iterative improvement method
The stable marriage problem iterative improvement methodThe stable marriage problem iterative improvement method
The stable marriage problem iterative improvement method
 
Maximum matching in bipartite graphs iterative improvement method
Maximum matching in bipartite graphs   iterative improvement methodMaximum matching in bipartite graphs   iterative improvement method
Maximum matching in bipartite graphs iterative improvement method
 
Knapsack dynamic programming formula top down (1)
Knapsack dynamic programming formula top down (1)Knapsack dynamic programming formula top down (1)
Knapsack dynamic programming formula top down (1)
 
Knapsack dynamic programming formula bottom up
Knapsack dynamic programming formula bottom upKnapsack dynamic programming formula bottom up
Knapsack dynamic programming formula bottom up
 
Huffman tree coding greedy approach
Huffman tree coding  greedy approachHuffman tree coding  greedy approach
Huffman tree coding greedy approach
 
Simplex method
Simplex methodSimplex method
Simplex method
 
Simplex method
Simplex methodSimplex method
Simplex method
 
Multiplication of integers & strassens matrix multiplication subi notes
Multiplication of integers & strassens matrix multiplication   subi notesMultiplication of integers & strassens matrix multiplication   subi notes
Multiplication of integers & strassens matrix multiplication subi notes
 

Recently uploaded

weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
Pratik Pawar
 
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdfTutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
aqil azizi
 
Basic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparelBasic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparel
top1002
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 
14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
SyedAbiiAzazi1
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 
Fundamentals of Induction Motor Drives.pptx
Fundamentals of Induction Motor Drives.pptxFundamentals of Induction Motor Drives.pptx
Fundamentals of Induction Motor Drives.pptx
manasideore6
 
6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)
ClaraZara1
 
PPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testingPPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testing
anoopmanoharan2
 
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERSCW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
veerababupersonal22
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
thanhdowork
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
gestioneergodomus
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
Kerry Sado
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
gdsczhcet
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
WENKENLI1
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
MdTanvirMahtab2
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
VENKATESHvenky89705
 
DESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABS
DESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABSDESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABS
DESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABS
itech2017
 

Recently uploaded (20)

weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
 
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdfTutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
 
Basic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparelBasic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparel
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 
14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 
Fundamentals of Induction Motor Drives.pptx
Fundamentals of Induction Motor Drives.pptxFundamentals of Induction Motor Drives.pptx
Fundamentals of Induction Motor Drives.pptx
 
6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)
 
PPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testingPPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testing
 
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERSCW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
 
DESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABS
DESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABSDESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABS
DESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABS
 

2. cs8451 daa anna univ question bank unit 2

  • 1. 1 DEPARTMENT OF INFORMATION TECHNOLOGY Subject Code : CS8451 Subject Name : Design & Analysis ofAlgorithms Class/ Sem : II IT / II Sem Subject In – Charge : Dr. P. Subathra, Prof./IT QUESTION BANK UNIT II BRUTE FORCE AND DIVIDE-AND-CONQUER Brute Force – Computing an – String Matching - Closest-Pair and Convex-Hull Problems - Exhaustive Search - Travelling Salesman Problem - Knapsack Problem - Assignment problem. Divide and Conquer Methodology – Binary Search – Merge sort – Quick sort – Heap Sort - Multiplication of Large Integers – Closest-Pair and Convex - Hull Problems. Q. No Question Marks Knowled geLevel Number of Times inAU PART - A BRUTE FORCE 1. Write the advantages of insertion sort. (R 13 NOV/ DEC 2017) BRUTE FORCE - STRING MATCHING 2. Write the brute force algorithm to string matching. (R 17 APR/MAY2019) BRUTE FORCE - CLOSEST-PAIRAND CONVEX-HULLPROBLEMS 3. What is the closest – pair problem? (R 13 MAY/JUN 2016) What is closest-pair problem? (R 13 APR/MAY 2017) What is the closest-pair problem? (R13 APR/MAY2019) 4. Write an algorithm for brute force closest- pair problem. (R 13 NOV/ DEC 2016) EXHAUSTIVE SEARCH 5. What is an exhaustive search? (R13 APR/MAY2018) DIVIDE AND CONQUERMETHODOLOGY
  • 2. 2 Give the general strategy of Divide and Conquer Method. (R 13 MAY/JUN 2016) Give the general plan of divide and conquer algorithms. (R 13 NOV/ DEC 2017) Give the general strategy of Divide and Conquer Method. (R13 APR/MAY2019) State Master's Theorem. (R13 APR/MAY2018) DIVIDE AND CONQUERMETHODOLOGY – BINARYSEARCH 6. Derive the complexity of Binary Search algorithm. (R 13 APR/MAY 2015) 7. What is worst case complexity of binary search? (R 13 NOV/ DEC 2016) DIVIDE AND CONQUER METHODOLOGY - MERGE SORT 8. What is the time and space complexity of Merge sort? (R 17 APR/MAY2019) Q. No Question Marks Knowled geLevel Number of Times inAU PART - B BRUTE FORCE - STRING MATCHING 1. Solve the following using Brute-Force algorithm: (R 13 APR/MAY 2015) (10) Find whether the given string follows the specific pattern and return 0 or 1 accordingly. Examples: a. Pattern:“abba”, input : “redblueredblue” should return 1 b. Pattern:“aaaa”,input: “asdasdasdasd” should return 1 c. Pattern:“aabb”, input: “xyzabcxyzabc” should return 0 2. Solve the following using Brute – Force algorithm: (R 13 APR/MAY 2017) (13) Find whether the given string follows the specifid pattern and return 0 or 1 accordingly. Examples: Pattern:“abba”, input : “redblueredblue” should return 1 Pattern:“aaaa”,input: “asdasdasdasd” should return 1 Pattern:“aabb”, input: “xyzabcxyzabc” should return 0 BRUTE FORCE - CLOSEST-PAIRPROBLEM 3. Explain the Bruteforce method to find the two closest points in a set of n points in k-dimensional space. (R 13 NOV/ DEC 2017) (13) 4. BRUTE FORCE - CONVEX-HULL PROBLEM
  • 3. 3 5. What is the convex hull problem? Explain the brute force approach to solve convex-hull with an example. derive the time complexity. (R 17 APR/MAY 2019) (2+7+4) EXHAUSTIVE SEARCH EXHAUSTIVE SEARCH - TRAVELLING SALESMAN PROBLEM 6. Find all the solution to the travelling salesman problem (cities and distances shown below) by exhaustive search. Give the optimal solution. (R 13 MAY/JUN 2016) (16) 7. Find all the solution to the travelling salesman problem (cities and distances shown below) by exhaustive search. Give the optimal solution. (R13 APR/MAY 2019) (13) DIVIDE AND CONQUERMETHODOLOGY Give the running time equation for divide and conquer algorithms. (R 08 APR/ MAY 2011) Write short notes on : (R 08 APR/ MAY 2011) d. Divide and Conquer algorithms (3) e. Randomized algorithms (3) What is Divide and Conquer strategy. Why recursion is most suited for divide and conquers? (R 08 NOV/ DEC 2015) (6) DIVIDE AND CONQUERMETHODOLOGY – BINARYSEARCH
  • 4. 4 8. If you have to solve the searching problem for a list of n numbers, how can you take advantage of the fact that the list is known to be sorted? Give separate answers for: Lists represented as arrays. Lists represented as linked lists. Compare the time complexities involved in the analysis of both the algorithms. (R 13 APR/MAY 2015) (16) 9. Write the algorithm to perform Binary Search and compute its run time complexity. (R 13 NOV/ DEC 2015) (8) 10. What is Divide and Conquer strategy and explain the binary search with suitable example problem. (R 13 APR/MAY 2017) (13) 11. Write the algorithm to perform Binary Search and compute run time complexity. (R13 APR/MAY2019) (7) DIVIDE AND CONQUER METHODOLOGY - MERGE SORT 12. Derive the worst case analysis of Merge Sort using suitable illustrations. (R 13 APR/MAY 2015) (8) 13. State and Explain the Merge Sort algorithm and Give the recurrence relation and efficiency. (R 13 MAY/JUN 2016) (16) 14. Explain the working of Merge Sort Algorithm with an example. (R 13 NOV/ DEC 2017) (13) 15. Discuss the running time of Divide-and-Conquer merge sort algorithm. (R 08 NOV/ DEC 2010) (8) 16. Analyze merge sort for the following numbers using divide and conquer strategy 25, 3, 45, 789, 87, 56, 47, 65, 30, 59, 56, 24. (R 08 NOV/ DEC 2013) (16) DIVIDE AND CONQUERMETHODOLOGY - QUICK SORT 17. Give the algorithm for Quicksort. With an example show that Quicksort is not a stable sorting algorithm. (R 13 NOV/ DEC 2016) (16) 18. Write the quick sort algorithm and explain it with an example. Derive the worst case and average case time complexity. (R 17 APR/MAY2019) (5+4+4) DIVIDE AND CONQUERMETHODOLOGY - MULTIPLICATIONOF LARGE INTEGERS 19. Explain the method used for performing Multiplication of two large integers. Explain how Divide and Conquer Method can be used to solve the same. (R 13 MAY/JUN 2016) (16) 20. Formulate an algorithm to multiply n-digit integers using divide and conquer approach. (R 08 NOV/ DEC 2009) (8)
  • 5. 5 DIVIDE AND CONQUERMETHODOLOGY - CONVEX- HULL PROBLEMS 21. Explain the convex hull problem and the solution involved behind it. (R 13 APR/MAY 2015) (6) 22. Write down the algorithm to construct a convex hull based on divide and conquer strategy. (R 13 NOV/ DEC 2015) (8) 23. Write down the algorithm to construct a convex hull based divide and conquer strategy. (R13 APR/MAY2019)(7 ) Q. No Question Marks Knowled geLevel Number of Times inAU PART - C DIVIDE AND CONQUERMETHODOLOGY – BINARYSEARCH 1. Consider the problem of finding the smallest and largest elements in an array of n numbers. Design a presorting-based algorithm for solving this problem and determine its efficiency class. (R13 APR/MAY2018) (7) Compare the efficiency of the three algorithms: (R13 APR/MAY2018) (8) The Brute Force Algorithm, This presorting-based algorithm and The divide and conquer algorithm DIVIDE AND CONQUER METHODOLOGY - MERGE SORT 2. Explain the Merge Sort algorithm with an example. (R13 APR/MAY2018) (13) DIVIDE AND CONQUERMETHODOLOGY - QUICK SORT 3. Write an algorithm for quick sort and write its time complexity with example list as: 5, 3, 1, 9, 8, 2, 4, 7. (R 13 APR/MAY 2017) (15) 4. Write the algorithm for quick sort. Provide a complete analysis of quick sort for the given set of numbers 12, 33, 23, 43, 44, 55, 64, 77, and 76. (R13 NOV/ DEC 2018) (13) 5. Write an algorithm for Quick sort and write its time complexity with example list are 5, 3, 1, 9, 8, 2, 4, 7. (R13 APR/MAY2019) (15) Staff In – Charge Subject Matter Expert HoD/IT