Chapter wise Question bank

Similar documents
UNIT 2. Greedy Method GENERAL METHOD

Fundamental Algorithms - Surprise Test

What is Greedy Approach? Control abstraction for Greedy Method. Three important activities

0/1 knapsack problem knapsack problem

Chapter 5: Algorithms

CSE 417 Dynamic Programming (pt 2) Look at the Last Element

CEC login. Student Details Name SOLUTIONS

Q1. [?? pts] Search Traces

COSC160: Data Structures Binary Trees. Jeremy Bolton, PhD Assistant Teaching Professor

IEOR E4004: Introduction to OR: Deterministic Models

Homework #4. CMSC351 - Spring 2013 PRINT Name : Due: Thu Apr 16 th at the start of class

Lecture 4: Divide and Conquer

> asympt( ln( n! ), n ); n 360n n

Optimization Methods. Lecture 16: Dynamic Programming

Lecture 10: The knapsack problem

Heaps. Heap/Priority queue. Binomial heaps: Advanced Algorithmics (4AP) Heaps Binary heap. Binomial heap. Jaak Vilo 2009 Spring

THE TRAVELING SALESMAN PROBLEM FOR MOVING POINTS ON A LINE

Dynamic Programming: An overview. 1 Preliminaries: The basic principle underlying dynamic programming

Heaps

COMP Analysis of Algorithms & Data Structures

SET 1C Binary Trees. 2. (i) Define the height of a binary tree or subtree and also define a height balanced (AVL) tree. (2)

Advanced Algorithmics (4AP) Heaps

Handout 4: Deterministic Systems and the Shortest Path Problem

CSCE 750, Fall 2009 Quizzes with Answers

Yao s Minimax Principle

Demo AS Discrete Questions

Fibonacci Heaps Y Y o o u u c c an an s s u u b b m miitt P P ro ro b blle e m m S S et et 3 3 iin n t t h h e e b b o o x x u u p p fro fro n n tt..

Design and Analysis of Algorithms 演算法設計與分析. Lecture 8 November 16, 2016 洪國寶

Slides credited from Hsu-Chun Hsiao

Demo AS Discrete Questions

Binary and Binomial Heaps. Disclaimer: these slides were adapted from the ones by Kevin Wayne

Priority Queues 9/10. Binary heaps Leftist heaps Binomial heaps Fibonacci heaps

3/7/13. Binomial Tree. Binomial Tree. Binomial Tree. Binomial Tree. Number of nodes with respect to k? N(B o ) = 1 N(B k ) = 2 N(B k-1 ) = 2 k

Chapter 21. Dynamic Programming CONTENTS 21.1 A SHORTEST-ROUTE PROBLEM 21.2 DYNAMIC PROGRAMMING NOTATION

Outline for Today. Quick refresher on binomial heaps and lazy binomial heaps. An important operation in many graph algorithms.

useful than solving these yourself, writing up your solution and then either comparing your

Dynamic Programming cont. We repeat: The Dynamic Programming Template has three parts.

Initializing A Max Heap. Initializing A Max Heap

CMPSCI 311: Introduction to Algorithms Second Midterm Practice Exam SOLUTIONS

Design and Analysis of Algorithms 演算法設計與分析. Lecture 9 November 19, 2014 洪國寶

CS 188: Artificial Intelligence

Essays on Some Combinatorial Optimization Problems with Interval Data

Non-Deterministic Search

Chapter 15: Dynamic Programming

Babu Banarasi Das National Institute of Technology and Management

2 all subsequent nodes. 252 all subsequent nodes. 401 all subsequent nodes. 398 all subsequent nodes. 330 all subsequent nodes

Markov Decision Processes

Sublinear Time Algorithms Oct 19, Lecture 1

PRIORITY QUEUES. binary heaps d-ary heaps binomial heaps Fibonacci heaps. Lecture slides by Kevin Wayne Copyright 2005 Pearson-Addison Wesley

Design and Analysis of Algorithms. Lecture 9 November 20, 2013 洪國寶

Algorithms PRIORITY QUEUES. binary heaps d-ary heaps binomial heaps Fibonacci heaps. binary heaps d-ary heaps binomial heaps Fibonacci heaps

MFE Course Details. Financial Mathematics & Statistics

Deterministic Dynamic Programming

UNIT VI TREES. Marks - 14

1) S = {s}; 2) for each u V {s} do 3) dist[u] = cost(s, u); 4) Insert u into a 2-3 tree Q with dist[u] as the key; 5) for i = 1 to n 1 do 6) Identify

Lecture 17: More on Markov Decision Processes. Reinforcement learning

Data Structures, Algorithms, & Applications in C++ ( Chapter 9 )

Maximum Contiguous Subsequences

Programming for Engineers in Python

Chapter 16. Binary Search Trees (BSTs)

Markov Decision Processes

Elastic demand solution methods

Problem Set 2: Answers

Chapter 2 Linear programming... 2 Chapter 3 Simplex... 4 Chapter 4 Sensitivity Analysis and duality... 5 Chapter 5 Network... 8 Chapter 6 Integer

Empirical and Average Case Analysis

Robust Dual Dynamic Programming

CS 188 Fall Introduction to Artificial Intelligence Midterm 1. ˆ You have approximately 2 hours and 50 minutes.

June 11, Dynamic Programming( Weighted Interval Scheduling)

Reinforcement Learning (1): Discrete MDP, Value Iteration, Policy Iteration

Reinforcement Learning (1): Discrete MDP, Value Iteration, Policy Iteration

Stochastic Optimization Methods in Scheduling. Rolf H. Möhring Technische Universität Berlin Combinatorial Optimization and Graph Algorithms

Reinforcement Learning

Issues. Senate (Total = 100) Senate Group 1 Y Y N N Y 32 Senate Group 2 Y Y D N D 16 Senate Group 3 N N Y Y Y 30 Senate Group 4 D Y N D Y 22

The Stackelberg Minimum Spanning Tree Game

MAT385 Final (Spring 2009): Boolean Algebras, FSM, and old stuff

PARELLIZATION OF DIJKSTRA S ALGORITHM: COMPARISON OF VARIOUS PRIORITY QUEUES

Introduction to Greedy Algorithms: Huffman Codes

Optimal Satisficing Tree Searches

CSE202: Algorithm Design and Analysis. Ragesh Jaiswal, CSE, UCSD

Enhanced Shell Sorting Algorithm

The Traveling Salesman Problem. Time Complexity under Nondeterminism. A Nondeterministic Algorithm for tsp (d)

CSE 21 Winter 2016 Homework 6 Due: Wednesday, May 11, 2016 at 11:59pm. Instructions

CS 188: Artificial Intelligence

DM559/DM545 Linear and integer programming

Mathematics for Management Science Notes 07 prepared by Professor Jenny Baglivo

6.231 DYNAMIC PROGRAMMING LECTURE 3 LECTURE OUTLINE

Outline for this Week

Heap Building Bounds

Dynamic Programming and Reinforcement Learning

MFE Course Details. Financial Mathematics & Statistics

Introduction to Dynamic Programming

Advanced Sequence Alignment. Problem Set #4 is posted.

LEC 13 : Introduction to Dynamic Programming

Reinforcement Learning. Slides based on those used in Berkeley's AI class taught by Dan Klein

Objec&ves. Review: Graphs. Finding Connected Components. Implemen&ng the algorithms

CS 188 Fall Introduction to Artificial Intelligence Midterm 1. ˆ You have approximately 2 hours and 50 minutes.

Optimal Search for Parameters in Monte Carlo Simulation for Derivative Pricing

Markov Decision Processes: Making Decision in the Presence of Uncertainty. (some of) R&N R&N

DESCENDANTS IN HEAP ORDERED TREES OR A TRIUMPH OF COMPUTER ALGEBRA

CS 188: Artificial Intelligence Spring Announcements

Transcription:

GOVERNMENT ENGINEERING COLLEGE - MODASA Chapter wise Question bank Subject Name Analysis and Design of Algorithm Semester Department 5 th Term ODD 2015 Information Technology / Computer Engineering Chapter 1 : Basics of Algorithms and Mathematics 1. What is an algorithm? Explain characteristics of any algorithm. (Winter 2013, Winter 2012) Chapter 2 : Analysis of Algorithm 2. Explain why analysis of algorithms is important? Explain: Worst Case, Best Case & Average Case Complexity. 3. Why do we use asymptotic notations in the study of algorithms? Briefly describe the commonly used asymptotic notations. (summer 2014, summer 4. Explain why analysis of algorithms is important? Arrange the following growth rate in increasing order: n 3, 1, n 2, nlog(n), n 2 log(n), log(n), n 0.5 (Winter 5. What is Recursion? Give Recursive algorithm for Tower of Hanoi Problem and give analysis of it. (Winter 6. Explain Bubble sort Algorithm and give its best case, worst case and average case complexity. 1 P a g e

7. Sort the letters of word DESIGN in alphabetical order using bubble sort. (summer 2014) 8. Explain Selection Sort Algorithm and give its best case, worst case and average case complexity. (summer 2014) 9. Explain Insertion Sort Algorithm and give its best case, worst case and average case complexity. 10. Sort the letters of word EXAMPLE in alphabetical order using insertion sort. (Summer 11. Explain the heap sort in detail. Give its complexity. (summer 2014) 12. Give the properties of Heap Tree. Sort the following data with Heap Sort Method: 20, 50, 30, 75, 90, 60, 25, 10, 40. (Winter Give the properties of Heap Tree. Sort the following data with Heap Sort Method: 65, 75, 5, 55, 25, 30, 90, 45, 80. (Winter 2012) 13. List out various linear sort methods. Explain any one of them giving algorithm and example. Chapter 3 : Divide and Conquer Algorithm 14. Show how divide and conquer technique is used to compute product of two n digit no with example. (summer 2014) 15. Explain the use of Divide and Conquer Technique for Binary Search Method. What is the time complexity of Binary Search Method? (Winter 16. What is Divide and Conquer Technique? Give the use of it for Binary Searching Method. Also give its Time Complexity. (Winter 2012) 2 P a g e

17. Explain algorithm of Merge Sort Method with example. Give its Time Complexity. 18. Explain algorithm of Quick Sort Method with example. Give its Time Complexity. (Winter 2012, Winter 19. Write the quick sort algorithm. Trace the same on data set 4,3,1,9,8,2,4,7 (Summer 20. Sort the following list using quick sort algorithm: <50, 40, 20, 60, 80, 100, 45, 70, 105, 30, 90, 75> Also discuss worst and best case of quick sort algorithm. (summer 2014) Chapter 4 : Greedy Algorithm 22. Explain in brief characteristics of greedy algorithms. Compare Greedy Method with Dynamic Programming Method. (Summer 2014, Winter 2013, Summer 23. Explain Prim s Algorithm to find Minimum Spanning Tree with example. compute its time complexity. (summer 2014, Winter 2013, Summer 24. Define Minimal Spanning Tree(MST). Explain Kruskal s algorithm with example for construction of MST. (summer 2014, Winter 2013, Summer 2013, Winter 2012) Chapter 5 : Dynamic Programming 25. Define: Optimal Solution, Feasible solution, Principle of Optimality. (Winter 2012) 26. Given coins of denominations 1, 3 and 4 with amount to be pay is 7. Find optimal no. of coins and sequence of coins used to pay given amount using dynamic method. (Summer 2014) 27. Solve Making Change problem using Dynamic Programming. (denominations: d1=1,d2=4,d3=6). Give your answer for making change of Rs. 8. (Winter 2013, Winter 2012) 3 P a g e

28. Given coins of denominations 2, 4 and 5 with amount to be pay is 7. Find optimal no. of coins and sequence of coins used to pay given amount using dynamic method.(summer 29. 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) (Summer 2014, Summer 30. Solve the following 0/1 Knapsack Problem using Dynamic Programming Method. Write the equation for solving the problem. n = 5, W = 11 Object --> 1 2 3 4 5 Weight (w) --> 1 2 5 6 7 Value (v) --> 1 6 18 22 28 (Winter 30. Solve the following Knapsack Problem using Dynamic Programming Method. Write the equation for solving above problem. n = 5, W = 100 Object --> 1 2 3 4 5 Weight (w) --> 10 20 30 40 50 Value (v) --> 20 30 66 40 60 (Winter 2012) 31. Write the equation for finding out shortest path using Floyd s algorithm. Use Floyd s method to find shortest path for below mentions all pairs 0 3 2 0 7 0 1 6 0 (Summer 4 P a g e

32. Given the four matrix find out optimal sequence for multiplication D=<15,5,10,20,25> (Summer 2014) 33. Given the four matrix find out optimal sequence for multiplication D=<5,4,6,2,7> (Summer 34. Explain Chained Matrix Multiplication with example. (Winter 2012) 35. Given two sequences of characters, P=<ABCDABE>, Q=<CABE> Obtain the longest common subsequence. (Summer 2014) 36. Find Longest Common Subsequence using Dynamic Programming Technique with illustration X={A,B,C,B,D,A,B} Y={B,D,C,A,B,A} (Winter 2013, Winter 2012) 37. Given two sequences of characters, P=<MLNOM> Q=<MNOM> Obtain the longest common subsequence. (Summer Chapter 6 : Exploring Graphs 38. Explain: Articulation Point, Graph, Tree. (Winter 39. Explain in brief Breadth First Search and Depth First Search Traversal techniques of a Graph. (Winter 2012) 40. Write pseudo code for the basic depth first search algorithm. (Summer 41. Differentiate BFS and DFS. (Summer Chapter 7: Backtracking and Branch and Bound 42. Explain Backtracking Method. What is N-Queens Problem? Give solution of 4-Queens Problem using Backtracking Method. (Summer 2014, Winter 2013,Winter 2012, Summer 5 P a g e

43. Explain use of Branch & Bound Technique for solving Assignment Problem. (Winter Chapter 8: String Matching 44. What is the basic idea behind Rabin Karp algorithm? Explain Rabin-Karp Algorithm for string matching with example and give it complexity. (summer 2014, Winter 2013, Summer 45. What is Finite Automata? Explain use of finite automata for string matching with suitable example. (summer 2014, Winter 2013, Summer 2013, Winter 2012) 46. Using Knuth-Morris-Pratt Algorithm match pattern P= ababada in Text T= badbabababadaab Chapter 9: Introduction to NP-Completeness 47. Define P, NP, NP complete and NP-Hard problems. (Winter 48. Write a brief note on NP-completeness and the classes-p, NP and NPC. (summer 2014) 49. Explain P and NP Problems. (Summer 50. Explain in Breif: P Problem, NP Problem, Travelling Salesman Problem, Min Max Principle. (Winter 2012) 6 P a g e