2. (a) Explain the strassen s matrix multiplication. (b) Write deletion algorithm, of Binary search tree. [8+8]



Similar documents
Data Structure [Question Bank]

Exam study sheet for CS2711. List of topics

NP-Completeness. CptS 223 Advanced Data Structures. Larry Holder School of Electrical Engineering and Computer Science Washington State University

CMPSCI611: Approximating MAX-CUT Lecture 20

Computer Algorithms. NP-Complete Problems. CISC 4080 Yanjun Li

Why? A central concept in Computer Science. Algorithms are ubiquitous.

Converting a Number from Decimal to Binary

Tutorial 8. NP-Complete Problems

Binary Search Trees CMPSC 122

Mathematics for Algorithm and System Analysis

Page 1. CSCE 310J Data Structures & Algorithms. CSCE 310J Data Structures & Algorithms. P, NP, and NP-Complete. Polynomial-Time Algorithms

Outline. NP-completeness. When is a problem easy? When is a problem hard? Today. Euler Circuits

Krishna Institute of Engineering & Technology, Ghaziabad Department of Computer Application MCA-213 : DATA STRUCTURES USING C

5 INTEGER LINEAR PROGRAMMING (ILP) E. Amaldi Fondamenti di R.O. Politecnico di Milano 1

Guessing Game: NP-Complete?

CSE 326, Data Structures. Sample Final Exam. Problem Max Points Score 1 14 (2x7) 2 18 (3x6) Total 92.

DATA STRUCTURES USING C

1. Nondeterministically guess a solution (called a certificate) 2. Check whether the solution solves the problem (called verification)

Problem Set 7 Solutions

1) The postfix expression for the infix expression A+B*(C+D)/F+D*E is ABCD+*F/DE*++

Near Optimal Solutions

Approximation Algorithms

GRAPH THEORY LECTURE 4: TREES

Discrete Mathematics Problems

Fundamentals of algorithms

Home Page. Data Structures. Title Page. Page 1 of 24. Go Back. Full Screen. Close. Quit

Complexity Theory. IE 661: Scheduling Theory Fall 2003 Satyaki Ghosh Dastidar

A Fast Algorithm For Finding Hamilton Cycles

On the Unique Games Conjecture

Complexity Classes P and NP

A binary search tree is a binary tree with a special property called the BST-property, which is given as follows:

CS5310 Algorithms 3 credit hours 2 hours lecture and 2 hours recitation every week

Lecture 7: NP-Complete Problems

IE 680 Special Topics in Production Systems: Networks, Routing and Logistics*

To My Parents -Laxmi and Modaiah. To My Family Members. To My Friends. To IIT Bombay. To All Hard Workers

5. A full binary tree with n leaves contains [A] n nodes. [B] log n 2 nodes. [C] 2n 1 nodes. [D] n 2 nodes.

Social Media Mining. Graph Essentials

CSC 373: Algorithm Design and Analysis Lecture 16

Algorithms and data structures

Chapter Load Balancing. Approximation Algorithms. Load Balancing. Load Balancing on 2 Machines. Load Balancing: Greedy Scheduling

Warshall s Algorithm: Transitive Closure

Any two nodes which are connected by an edge in a graph are called adjacent node.

! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. !-approximation algorithm.

NP-complete? NP-hard? Some Foundations of Complexity. Prof. Sven Hartmann Clausthal University of Technology Department of Informatics

Single machine parallel batch scheduling with unbounded capacity

Every tree contains a large induced subgraph with all degrees odd

3. The Junction Tree Algorithms

Reductions & NP-completeness as part of Foundations of Computer Science undergraduate course

Many algorithms, particularly divide and conquer algorithms, have time complexities which are naturally

Data Structures and Algorithms Written Examination

Ordered Lists and Binary Trees

CAD Algorithms. P and NP

DATA ANALYSIS II. Matrix Algorithms

Universality in the theory of algorithms and computer science

Binary Search Trees. A Generic Tree. Binary Trees. Nodes in a binary search tree ( B-S-T) are of the form. P parent. Key. Satellite data L R

Method To Solve Linear, Polynomial, or Absolute Value Inequalities:

Dynamic Programming. Lecture Overview Introduction

5.1 Bipartite Matching

A NOTE ON OFF-DIAGONAL SMALL ON-LINE RAMSEY NUMBERS FOR PATHS

Scheduling Shop Scheduling. Tim Nieberg

One last point: we started off this book by introducing another famously hard search problem:

Binary Trees and Huffman Encoding Binary Search Trees

Dynamic programming. Doctoral course Optimization on graphs - Lecture 4.1. Giovanni Righini. January 17 th, 2013

Data Structures and Algorithms

Java Software Structures

Notes on NP Completeness

! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. #-approximation algorithm.

Analysis of Algorithms, I

Cpt S 223. School of EECS, WSU

2. FINDING A SOLUTION

Welcome to... Problem Analysis and Complexity Theory , 3 VU

Introduction to Algorithms. Part 3: P, NP Hard Problems

The Basics of Graphical Models

Exponential time algorithms for graph coloring

Theoretical Computer Science (Bridging Course) Complexity

V. Adamchik 1. Graph Theory. Victor Adamchik. Fall of 2005

Binary Search Trees (BST)

Static Load Balancing

JUST-IN-TIME SCHEDULING WITH PERIODIC TIME SLOTS. Received December May 12, 2003; revised February 5, 2004

Course: Model, Learning, and Inference: Lecture 5

A permutation can also be represented by describing its cycles. What do you suppose is meant by this?

Algorithm Homework and Test Problems

Atmiya Infotech Pvt. Ltd. Data Structure. By Ajay Raiyani. Yogidham, Kalawad Road, Rajkot. Ph : ,

TREE BASIC TERMINOLOGIES

International Journal of Software and Web Sciences (IJSWS)

SIMS 255 Foundations of Software Design. Complexity and NP-completeness

Scheduling Home Health Care with Separating Benders Cuts in Decision Diagrams

Sample Questions Csci 1112 A. Bellaachia

Introduction to Logic in Computer Science: Autumn 2006

Lecture 1: Course overview, circuits, and formulas

Lecture 15 An Arithmetic Circuit Lowerbound and Flows in Graphs

NP-Completeness and Cook s Theorem

CS473 - Algorithms I

Applied Algorithm Design Lecture 5

The Goldberg Rao Algorithm for the Maximum Flow Problem

1. The memory address of the first element of an array is called A. floor address B. foundation addressc. first address D.

Transcription:

Code No: R05220502 Set No. 1 1. (a) Describe the performance analysis in detail. (b) Show that f 1 (n)+f 2 (n) = 0(max(g 1 (n), g 2 (n)) where f 1 (n) = 0(g 1 (n)) and f 2 (n) = 0(g 2 (n)). [8+8] 2. (a) Explain the strassen s matrix multiplication. (b) Write deletion algorithm, of Binary search tree. [8+8] 3. (a) Write Greedy algorithm to generate shortest path. (b) If p 1 /w 1 p 2 /w 2... p n /w n prove that knapsack generates an optimal solution to the given instance of the knapsack problem. [8+8] 4. (a) Explain matrix chain multiplication with an example. (b) Solve the following 0/1 Knapsack problem using dynamic programming P=(11,21,31,33), W=(2,11,22,15), C=40, n=4. [8+8] 5. (a) Explain the properties of strongly connected components. (b) Write a non-recursive algorithm of In-order traversal of a tree and also analyze its time complexity. [6+10] 6. (a) Write an algorithm of m-coloring problem. (b) Solve the 4-queens problem using backtracking. [8+8] 7. (a) Describe problem state, solution state and answer state with an example. (b) Explain the general method of Branch and Bound. [8+8] 8. (a) Explain the classes of P and NP. (b) Write a nondeterministic Knapsack algorithm. [8+8]

Code No: R05220502 Set No. 2 1. (a) Define time complexity. Describe different notations used to represent there complexities. (b) Derive the function f(n)= 12n 2 +6n is 0(n 3 ) and w(n). [10+6] 2. (a) Suppose a binary tree has leaves l 1 l 2...l m at depths d 1, d 2...d m respectively prove that m 2 di 1 and determine when the equality is true. i=1 (b) Write and explain the control abstraction algorithm of divide and conquer. [8+8] 3. (a) Write a greedy algorithm to the Job sequencing with deadlines. (b) Prove that the edge with the smallest weight will be part of every minimum spanning tree. [8+8] 4. (a) Explain matrix chain multiplication with an example. (b) Solve the following 0/1 Knapsack problem using dynamic programming P=(11,21,31,33), W=(2,11,22,15), C=40, n=4. [8+8] 5. (a) Explain the BFS algorithm with an example. (b) The Preorder and Postorder sequences of a binary tree do not uniquely define the binary tree. Justify the answer. [8+8] 6. (a) Describe graph coloring problem and its time complexity. (b) Write an algorithm of 8-queens problem using backtracking. [8+8] 7. (a) Write an algorithm to solve the Knapsack problem with the Branch and Bound (b) Differentiate between Dynamic Knapsack and Branch and Bound Knapsack problem. [10+6] 8. (a) Explain the classes of P and NP. (b) Write a nondeterministic Knapsack algorithm. [8+8]

Code No: R05220502 Set No. 3 1. (a) Consider a polynomial in n of the form f (n) = m a i n i. = a m n m + a m 1 n m 1 +... + a 2 n 2 + a 1 n + a 0 where a m > 0 i=0 then f (n) = Ω (n m ) (b) Differentiate between profilling and debugging. [10+6] 2. (a) Write and explain the control abstraction for Divide and conquer. (b) Suggest refinements to mergesort to make it in-place. [8+8] 3. State whether the following statements are true or false. Justify the answer. (a) If e is a minimum weight edge in a connected weighted graph, it must be among edges of at least one minimum spanning tree of the graph. (b) If e is a minimum weight edge in a connected weighted graph, it must be among edges of each minimum spanning tree of the graph. (c) If edge weights of a connected weighted graph are all distinct, the graph must have exactly are minimum spanning tree. (d) If edge weights of a connected weighted graph are not all distinct, the graph must have more than one minimum spanning tree. [16] 4. (a) In how many ways, the following chain of matrices may be multiplied? A X B X C X D [2X5] [5X3] [3X6] [6X4] Find the no. of multiplications required in each case. (b) Differentiate between Greedy method and Dynamic programming (c) Define merging and purging rules of O/1 Knapsack problem. [6+5+5] 5. (a) Explain game tree with an example. (b) Prove or disprove an undirected graph G=(V,E) is biconnected if and only if for each pair of distinct vertices u and v there are two distinct paths from u to v that have no vertex in common except u and v. [8+8] 6. (a) Draw the state space tree for m coloring when n=3 and m=3 (b) Write a recursive backtracking algorithm. [8+8] 7. (a) Explain the general method of Branch and Bound. 1 of 2

Code No: R05220502 Set No. 3 (b) Explain the principles of LIFO Branch and Bound. [8+8] 8. (a) Explain the classes of NP-hard and NP-complete. (b) Describe clique decision problem and write the algorithm for the same. [8+8] 2 of 2

Code No: R05220502 Set No. 4 1. (a) Develop a probabilistic algorithm to find the value of the integral 2 0 4 x2 dx (b) Differentiate between priori analysis and posteriori analysis. [10+6] 2. (a) Write and explain the control abstraction for Divide and conquer. (b) Suggest refinements to mergesort to make it in-place. [8+8] 3. (a) What is spanning tree? Explain the prim s algorithm with an example. (b) Explain the terms Feasible solution, optimal solution and objective function. [10+6] 4. (a) Write a pseudocode for a linear time algorithm that generates the optimal Binary search tree from the root table. (b) Find the minimum no of operations required for the following chain matrix multiplication using dynamic programming. A(30,40) * B(40,5) * C(5,15) * D(15,6). [8+8] 5. Write an algorithm of Biconnected components and also analyze its time complexity. [16] 6. (a) Draw the state space tree for m coloring when n=3 and m=3 (b) Write a recursive backtracking algorithm. [8+8] 7. (a) Explain the method of reduction to solve TSP problem using Branch and Bound. (b) Explain the principles of FIFO Branch and Bound. [8+8] 8. (a) What is meant by Halting problem explain with an example. (b) Explain the classes of P and NP. [8+8]