BT0080 - Fundamentals of Algorithms

Dear students get fully solved assignments
Send your semester & Specialization name to our mail id :
help.mbaassignments@gmail.com
or
call us at : 08263069601


ASSIGNMENT

DRIVE
FALL 2016
PROGRAM
BSc IT
SEMESTER
FOURTH
SUBJECT CODE & NAME
BT0080 - Fundamentals of Algorithms
BK ID
B1092
CREDITS
4
MARKS
60


Note: Answer all questions. Kindly note that answers for 10 marks questions should be approximately of 400 words. Each question is followed by evaluation scheme.



Question. 1. Describe insertion sort algorithm with the help of an example. Give the complexity of it.

Answer: Like selection sort, insertion sort loops over the indices of the array. It just calls insert on the elements at indices 1,2,3,…,n−1 1, 2, 3, \ldots, n-1 1,2,3,…,n−1. Just as each call to indexOfMinimum took an amount of time that depended on the size of the sorted subarray, so does each call to insert. Actually, the word "does" in the previous sentence should be "can," and we'll see why.

Let's take a situation where we call insert and the value being inserted into a subarray is less than every element in the subarray. For example, if we're inserting 0 into the subarray [2, 3, 5, 7, 11], then every element in the subarray has to slide over one position to the right. So, in general, if we're inserting into a subarray with k k kk elements, all k k



Question. 2. State the concept of divide and conquer strategy with the help of an example.


Answer: In computer science, divide and conquer (D&C) is an algorithm design paradigm based on multi-branched recursion. A divide and conquer algorithm works by recursively breaking down a problem into two or more sub-problems of the same or related type, until these become simple enough to be solved directly. The solutions to the sub-problems are then combined to give a solution to the original problem.

This divide and conquer technique is the basis of efficient algorithms for all kinds of problems, such as sorting (e.g., quicksort, merge sort),


Question. 3. Prove the theorem
“A given connected graph G is a Euler graph  all the vertices of G are of even degree.”


Answer: An Eulerian circuit is a traversal of all the edges of a simple graph once and only once, staring at one vertex and ending at the same vertex. You can repeat vertices as many times as you want, but you can never repeat an edge once it is traversed.

The degree of a vertex is the number of edges incident with that vertex.




Question. 4. Explain Adjacency and Incidence Matrix.


Answer: In graph theory and computer science, an adjacency matrix is a square matrix used to represent a finite graph. The elements of the matrix indicate whether pairs of vertices are adjacent or not in the graph.

In the special case of a finite simple graph, the adjacency matrix is a (0,1)-matrix with zeros on its diagonal. If the graph is undirected, the adjacency matrix is symmetric. The relationship between a graph and the eigenvalues and eigenvectors of its adjacency matrix is studied in spectral graph theory.




Question. 5. State Cook’s theorem.

Prove the theorem “CNF satisfiability is polynomial transformable to the clique problem. Therefore, the clique problem is NP complete.”


Answer: In computational complexity theory, the Cook–Levin theorem, also known as Cook's theorem, states that the Boolean satisfiability problem is NP-complete. That is, any problem in NP can be reduced in polynomial time by a deterministic Turing



Question. 6. Mention different classification of problems.


Answer: A problem is simply the difference between what you have and what you want. It may be a matter of getting something, of getting rid of something, of avoiding something, or of getting to know what you want.

Four Types of Problems

Known, solution requires just → action. Most of the
Dear students get fully solved assignments
Send your semester & Specialization name to our mail id :
help.mbaassignments@gmail.com
or
call us at : 08263069601


No comments:

Post a Comment

Note: Only a member of this blog may post a comment.