Verify whether √11 is rational or irrational.
See Answer →Prove by mathematical induction that
Subset Sum Problem
See Answer →Hamiltonian Cycle Problem
See Answer →Clique problem
See Answer →SAT Problem
See Answer →Define the NP-Hard and NP-Complete problem. How are they different from each other. Explain the use of polynomial time reduction with the help of an example
See Answer →What are P and NP class of Problems? Explain each class with the help of at least two examples.
See Answer →Explain the term Decision problem with the help of an example. Define the following problems and identify if they are decision problem or optimisation problem? Give reasons in support of your answer.
(i) Travelling Salesman Problem
(ii) Graph Colouring Problem
(iii) 0-1 Knapsack Problem
See Answer →Explain the Rabin Karp algorithm for string matching with the help of an example. Find the time complexity of this algorithm.
See Answer →Given the following sequence of chain multiplication of the matrices. Find the optimal way of multiplying these matrices:
| Matrix | Dimension |
| A1 | 10 × 15 |
| A2 | 15 × 5 |
| A3 | 5 × 20 |
| A4 | 20 × 10 |
Explain the algorithm to find the optimal Binary Search Tree. Demonstrate this algorithm to find the Optimal Binary Search Tree for the following probability data (where pi represents the probability that the search will be for the key node ki, whereas qi represents that the search is for dummy node di. Make suitable assumptions, if any)
| i | 0 | 1 | 2 | 3 | 4 |
| pi | 0.10 | 0.15 | 0.20 | 0.10 | |
| qi | 0.05 | 0.10 | 0.10 | 0.10 | 0.10 |
Write the Dijkstra’s shortest path algorithm. Also, find the time complexity of this shortest path algorithm. Find the shortest paths from the vertex ‘A’ using Dijkstra’s shortest path algorithm for the graph given in Figure 1. Show all the steps of computation.
See Answer →Write the Prim’s algorithm to find the minimum cost spanning tree of a graph. Also, find the time complexity of Prim’s algorithm. Demonstrate the use of Kruskal’s algorithm and Prim’s algorithm to find the minimum cost spanning tree for the Graph given in Figure 1. Show all the steps.
See Answer →Explain the Topological sorting with the help of an example. Also, explain the algorithm of finding strongly connected components in a directed Graph.
See Answer →Explain the divide and conquer approach of multiplying two large integers. Compute the time complexity of this approach. Also, explain the binary search algorithm and find its time complexity
See Answer →Explain the Merge procedure of the Merge Sort algorithm. Demonstrate the use of recursive Merge sort algorithm for sorting the following data of size 8: [19, 18, 16, 12, 11, 10, 9, 8]. Compute the complexity of Merge Sort algorithm.
See Answer →Assuming that data to be transmitted consists of only characters ‘a’ to ‘g’, design the Huffman code for the following frequencies of character data. Show all the steps of building a huffman tree. Also, show how a coded sequence using Huffman code can be decoded
What is an Optimisation Problem? Explain with the help of an example. When would you use a Greedy Approach to solve optimisation problem? Formulate the Task Scheduling Problem as an optimisation problem and write a greedy algorithm to solve this problem. Also, solve the following fractional Knapsack problem using greedy approach. Show all the steps.
Suppose there is a knapsack of capacity 20 Kg and the following 6 items are to packed in it. The weight and profit of the items are as under:
Select a subset of the items that maximises the profit while keeping the total weight below or equal to the given capacity.
See Answer →