Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
24 views

Theory of Algorithm Assignment

Uploaded by

mick
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

Theory of Algorithm Assignment

Uploaded by

mick
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Part I: True or false Items

Instruction: write true if the statement is correct and false if the statement is incorrect (5%)

1. The way data are organized in a computer’s memory is called algorithm.


2. Space Complexity determines the approximate number of operations required to solve a
problem of size n.
3. if f(n)=(g(n)) and g(n)= (h(n)) then f(n)=(h(n
4. A simple data structure, in which insertion and deletion occur at the same end, is called a
queue.
5. In pre-order Traversal, the left sub tree is visited first, then the root and later the right
sub-tree.

Part II: Multiple Choices(20%)


Instruction:-Read each statement carefully. Choose the correct answer from the given choices.
Write the letter of your answer on the space provided
1. _____________algorithm traverses a graph in a Breadth-ward motion and uses a queue to
remember to get the next vertex to start a search, when a dead end occurs in any iteration.
A) Breadth first search B) Binary search C) Depth first search D)A&C
2. __________algorithms try to find a localized optimum solution, which may eventually
lead to globally optimized solutions.
A) Dynamic programming B) Divide & conquer C) Greedy D) Optimization
3. Which one of the following is non-linear data structure?
A) Tree B) Stack C) Queue D) Linked list
4. __________________ Measures the upper bound of time complexity.
A) Omega B) Big Oh C) Theta D) All
5. _______________ of an algorithm refers to defining the mathematical bound/framing of
its run-time performance?
A) Space complexity C) Time complexity
B) Asymptotic analysis D) none of the above
6. Which one of the following algorithms is based on divide and conquers approach not ?
A) Multistage Graph C) Merge sort
B) Shortest Path D) Chess playing algorithm
6. _______________ determines the approximate number of operations required to solve a
problem of size n..

A) Space complexity B) Time complexity C) Data structure D) A & B


7. What is the complexity of Quick sort algorithm?
A)nLogn B) Logn C) Polynomial D) Quadratic
8. Which one of the following is the largest (low performance) of all in terms of algorithm
growth rate?
A) Constant B) Logarithmic C) Exponential D) Polynomial
9. Ticketing systems at banks follow the concept of ___________for implementation?
A) Tree B) Queue C) Stack D) Linked list
10. The solution to a given optimization problem can be obtained by the combination of
optimal solutions to its sub-problems. This property is called _____
A) Optimal sub structure B) Recursive C) Non overlapping D) None
11. _____________algorithm traverses a graph in a depth-ward motion and uses a Stack to
remember to get the next vertex to start a search, when a dead end occurs in any iteration.
A) Breadth first search B) Binary search C) Full first search D) none
12. Algorithms must terminate after a finite number of steps; What is this characteristics
called__
A) Unambiguous B) Feasibility C) Finiteness D) Independent
13. What is External (leaf) node:
A) node without a child C) node with two degree
B) Node with one child D) Internal Node

14. In ________ traversal method, the root node is visited first, then the left sub tree and
finally the right sub tree.
A) In-Order B) Post-Order C)Pre-Order D. All
15. Optimal merge pattern is an example of _________ Algorithm design Approach
A) Dynamic Programming C)Greedy
B) Divide and Conquered D) Back tracking

Part III: Answer the following questions Instruction:-Read each statement carefully. Write
appropriate answer on the space provided

1. Find the minimum cost spanning tree from the graph.

2. Consider the given files, x1, x2, x3, x4 x5, and x6 with 25, 31, 15, 5, 20 and 40 numbers of
elements respectively. Find the optimal two way merge pattern.

You might also like