Академический Документы
Профессиональный Документы
Культура Документы
II - CSE
Divide and conquer General method Binary search Finding maximum and minimum Merge sort
Greedy algorithms General method Container loading Knapsack problem.
UNIT III DYNAMIC PROGRAMMING
Dynamic programming General method Multistage graphs All-pair shortest paths Optimal binary
search trees 0/1 Knapsack Traveling salesperson problem.
UNIT IV BACKTRACKING
Backtracking General method 8 Queens problem Sum of subsets Graph coloring Hamiltonian
problem Knapsack problem.
UNIT V TRAVERSALS, BRANCH AND BOUND
Graph traversals Connected components Spanning trees Biconnected components Branch and Bound
General methods (FIFO and LC) 0/1 Knapsack problem Introduction to NP-hard and NP-completeness.
L: 45 T: 15 Total: 60
TEXT BOOKS
1. Ellis Horowitz, Sartaj Sahni and Sanguthevar Rajasekaran, Computer Algorithms / C++, 2nd Edition,
Universities Press, 2007.
2. Easwarakumar, K.S., Object Oriented Data Structures Using C++, Vikas Publishing House, 2000.
REFERENCES
1. Cormen, T.H., Leiserson, C.E., Rivest, R.L. and Stein, C., Introduction to Algorithms, 2nd Edition,
Prentice Hall of India Pvt. Ltd, 2003.
2. Aho, A.V., Hopcroft J.E. and Ullman, J.D., The Design and Analysis of Computer Algorithms, Pearson
Education, 1999.
3. Sara Baase and Allen Van Gelder, Computer Algorithms, Introduction to Design and Analysis, 3rd
Edition, Pearson Education, 2009.
Mrs.J.VANITHA ASST.PROFESSOR/CSE
QUESTION BANK
II - CSE
(Algorithm Analysis)
PART-A
(1 MARKS)
1. What is the correct value to return to the operating system upon the successful completion of a
program?
a. -1 b. 1
c. 0
d. Programs do not return a value.
2. What is the only function all C++ programs must contain?
a. start() b. system()
c. main()
d. program()
3. What punctuation is used to signal the beginning and end of code blocks?
a. { }
b. -> and <- c. BEGIN and END d. ( and )
4. What punctuation ends most lines of C++ code?
a. . (dot) b. ; (semi-colon)
c. : (colon)
d. ' (single quote)
5. Which of the following is a correct comment?
a. */ Comments */
b. ** Comment **
c. /* Comment */
d. { Comment }
6. Which of the following is not a correct variable type?
a. Float
b. Real
c. Int
d. double
7. Which of the following is the correct operator to compare two variables?
a. :=
b. = c. Equal
d. ==
8. Which of the following is true?
a. 1
b. 66 c. .1 d. -1 e. All of the above
9. Which of the following is the boolean operator for logical-and?
a. &
b. && c. |
d. |&
10. Evaluate !(1 && !(0 || 1)).
a. True
b. False
c. Unevaluatable
11. Identify the correct statement
a. Programmer can use comments to include short explanations within the source code itself.
b. All lines beginning with two slash signs are considered comments.
c. Comments very important effect on the behaviour of the program d. both
12. The directives for the preprocessors begin with
a. Ampersand symbol (&) b. Two Slashes (//) c. Number Sign (#) d. Less than symbol
(<)
13. The file iostream includes
a. The declarations of the basic standard input-output library.
b. The streams of includes
and outputs of program effect. c. Both of these
d. None of these
14. There is a unique function in C++ program by where all C++ programs start their execution
a. Start()
b. Begin() c. Main()
d. Output()
15. Every function in C++ are followed by
a. Parameters b. Parenthesis
c. Curly braces
d. None of these
16. Which of the following is false?
a. Cout represents the standard output stream in c++.
b. Cout is declared in the iostream standard file
c. Cout is declared within the std namespace
d. None of above
17. Every statement in C++ program should end with
a. A full stop (.)
b. A Comma (,)
c. A Semicolon (;) d. A colon (:)
18. Which of the following statement is true about preprocessor directives?
a. These are lines read and processed by the pre-processor b. They do not produce any code by
themselves
c. These must be written on their own line d. They end with a semicolon
19. A block comment can be written by
a. Starting every line with double slashes (//)b. Starting with /* and ending with */
c. Starting with //* and ending with *// d. Starting with <!- and ending with -!>
20. When writing comments you can
a. Use code and /* comment on the same line
b. Use code and // comments on the same line
c. Use code and //* comments on the same line
d. Use code and <!- comments on the same line
Mrs.J.VANITHA ASST.PROFESSOR/CSE
QUESTION BANK
Answers
1 2 3 4 5
c c a b c
II - CSE
6
b
7
d
8
e
9
b
10 11 12 13 14 15 16 17 18 19 20
a b c a c b d c d b b
PART-B
(2 MARKS)
QUESTION BANK
Searching
II - CSE
String processing
Graph problems
Combinatorial problems
Geometric problems
Numerical problems
29. What are fundamental data structures?
Linear data structures Linked lists,stacks,queues
Graphs
Trees
Sets and dictionaries
30. What is a graph?( A.U.MAY10)
A graph G = (V,E) is defines by a pair of two sets:
A finite set V of items called vertices and set
E of pairs of these items called edges.
31 . How a graph is represented?
Graphs for computer algorithms are represented in two principal ways:
the adjacency matrix and adjacency linked lists.
32.What is a Abstract Data type?( A.U.NOV07) (A.U.NOV/MAY10)
It is a set of abstract objects with a collection of operations
that can be performed on them.
33 .What is an algorithm's basic operation?
It is an operation that contributes the most to the total running time of the algorithm.
Usually the basic operation is the most time consuming operation in the
algorithm's inner most loop.
34.what is the formula used to calculate the algorithm's running time?
The running time T(n) of a program implementing the algorithm on a
computer is given by the formula :
T(n) = Cop x C(n) where
Cop is the time of execution of an algorithm's basic operations
C(n) is the the number of times the basic operation is executed.
35. What is the order of growth?( A.U.MAY10) (A.U.NOV/MAY11) (A.U.NOV/MAY12)
The Order of growth is the scheme for analyzing an algorithm's
efficiency for different input sizes which ignores the multiplicative
constant used in calculating the algorithm's running time.
Measuring the performance of an algorithm in relation with the
input size n is called the order of growth.
36. What is the worst-case efficiency of an algorithm?
Mrs.J.VANITHA ASST.PROFESSOR/CSE
QUESTION BANK
The worst-case efficiency of an algorithm is its efficiency for
II - CSE
logarithmic
linear
nlogn
n2
n-log-n
quadratic
t(n)
--------
lim t'(n)
=
n->oo -------g(n)
g'(n)
PART-C
(16 MARKS)
40.Explain in detail the algorithm design and analysis process.( A.U.NOV07) (A.U.NOV/MAY10)
41.Explain in detail the important problem types.
42.Explain in detail the fundamental data structures.( A.U.NOV06)
43.Write Euclid's algorithm and explain the steps.( A.U.APR07)
44.Write sieve of Eratosthenes algorithm which generates consecutive primes and explain.
45.Explain in detail the general framework for analyzing an algorithm's efficiency.
( A.U.NOV08)
46.Explain with examples the worst-case, best-case and the average case efficiencies.
(A.U.NOV/MAY10) (A.U.NOV/MAY11)
47.What are asymptotic notations? Define and explain the three notations used by computer
scientists for analyzing the efficiency of algorithms. (A.U.NOV/MAY12)
48.What are basic efficiency classes? Explain in detail.( A.U.NOV09)
49.What is Order of growth? Plot the order of growth for different functions.
(1 MARKS)
QUESTION BANK
II - CSE
a.
Abstraction to perform input and output operations in sequential media
b.
Abstraction to perform input and output operations in direct access media
c.
Objects where a program can either insert or extract characters to and from it
51 Which of the following is known as insertion operator?
a.
^ b.
Vc.
<<
d.
>>
52Regarding the use of new line character (/n) and endl manipulator with cout statement
a.
Both ways are exactly same b.
Both are similar but endl additionally performs flushing
of buffer
c.
endl cant be used with cout d.
\n cant be used with cout
53. Which of the following is output statement in C++?
a.
print
b.
Write
c.
Cout
d.
Cin
54. Which of the following is input statement in C++?
a.
cin
b.
Input
c.
Get
d.
none of above
55. By default, the standard output device for C++ programs is
a.
Printer
b.
Monitor
c.
Modem
d.
Disk
56. By default, the standard input device for C++ program is
a.
Keyboard
b.
Mouse c.
Scanner d.
None of these
57. Which of the following statement is true regarding cin statement?
a.
cin statement must contain a variable preceded by >> operator
b.
cin
does
not
process the input until user presses RETURN key c.
you can use more than one datum input
from user by using cind.
all of above
58. Which of the following is extraction operator in C++?
a.
^ b.
Vc.
<<
d.
>>
59. When requesting multiple datum, user must separate each by using
a.
a space b.
a tab character c.
a new line character
d.
all of above
60. Cin extraction stops execution as soon as it finds any blank space character
a.
true
b.
false
61. Observe the following statements and decide what do they do. string mystring; getline(cin,
mystring);
a. reads a line of string from cin into mystring
b.
reads a line of string from mystring into
cin
c.
cin cant be used this way
d.
none of above
62. Regarding stringstream identify the invalid statement
a.
stringstream is defined in the header file <sstream> b.
It allows string based objects
treated as stream
c.
It is especially useful to convert strings to numerical values and vice
versa.
d.
None of above
63. hich of the header file must be included to use stringstream?
a.
<iostream>
b.
<string>
c.
<sstring>
d.
<sstream>
64. Which of the following header file does not exist?
a.
<iostream>
b.
<string>
c.
<sstring>
d.
<sstream>
65. If you use same variable for two getline statements
a.
Both the inputs are stored in that variable
b.
The second input overwrites the first one
c.
The second input attempt fails since the variable already got its value
d.
You can not use same variable for two getline statements
66. The return 0; statement in main function indicates
a.
The program did nothing; completed 0 tasks b.
The program worked as expected
without any errors during its execution c.
not to end the program yet.d.
None of above
67. Which of the following is not a reserve keyword in C++?
a.
mutable
b.
Default
c.
Readable
d.
volatile
68. The size of following variable is not 4 bytes in 32 bit systems
a.
int
b.
long int
c.
short int
d.
float
69. Identify the correct statement regarding scope of variables
a.
Global variables are declared in a separate file and accessible from any program .
b.
Local variables are declared inside a function and accessible within the function
only.
c.
Global variables are declared inside a function and accessible
d.
Local variables are declared in the main body of the program
Answers
Mrs.J.VANITHA ASST.PROFESSOR/CSE
QUESTION BANK
II - CSE
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
PART-B
(2 MARKS)
QUESTION BANK
n <-- L n/2 _|
II - CSE
return count
Show the tree structure for recursive calls made in the problem of towers of Hanoi.
n
n
-1
n
-1
n
-2
2
...
n
-2
n
-2
...
...
n
-2
2
Write
an
1 1
algorith
m
for
finding
the nth Fibonacci number.
ALGORITHM F(n)
if n <= 1 return 1
else return F(n-1) + F(n-2)
75.What is algorithm visualization?( A.U.MAY10) (A.U.NOV/MAY11)
Algorithm visualization can be defines as the use of images
to convey some useful information about algorithms.
Two principal variations are
Static algorithm visualization
Dynamic Algorithm visualization(also called algorithm animation)
76. List 5 of basic efficiency classes.
log n
logarithmic
linear
nlogn
n2
n-log-n
quadratic
Mrs.J.VANITHA ASST.PROFESSOR/CSE
QUESTION BANK
80.What is the tool for analyzing the time efficiency of a non recursive algorithm?
II - CSE
( a * ri-1 + b) mod m
of
input
and
no
mathematical
derivation is involved
The principal weakness is limited applicability The principal strength is it is applicable for any
algorithm
The principal strength is it is independent of The principal weakness is it depends upon the
any input
sample input
(16 MARKS)
85.Explain the general plan for analyzing efficiency of non recursive algorithms.
( A.U.MAY08)
86.Write an algorithm for element uniqueness problem and explain.
87.Write an algorithm for matrix multiplication and explain(A.U.NOV07)
88.Explain the general plan for analyzing efficiency of recursive algorithms.
( A.U.APR09) (A.U.NOV/MAY12)
89.Explain the Tower of Hanoi puzzle and how the recurrence relation
is solved for the moves. (A.U.NOV/MAY12)
90.Write short note on algorithm visualization and its applications.( A.U.APR07)
91.Design a non recursive algorithm for computing the product of two nix matrices and also find the
time efficiency of the algorithm. (A.U.NOV/MAY10) (A.U.NOV/MAY12)
92.Design a recursive algorithm to compute factorial function f(n) = n! (A.U.NOV/MAY12)
for an arbitrary non negative integer n and derive the recurrence relation.( A.U.NOV09)
93.Discuss the features of animation of an algorithm.
94.what is the empirical analysis of algorithm? Discuss its strength and weakness.
Mrs.J.VANITHA ASST.PROFESSOR/CSE
QUESTION BANK
II - CSE
(1 MARKS)
b.
96. The difference between while structure and do structure for looping is
a.
In while statement the condition is tested at the end of first iteration b. In do structure the condition
is tested at the beginning of first iteration
c.
The do structure decides whether to start the loop
code or not whereas while statement decides whether to repeat the code or not d. In while structure
condition is tested before executing statements inside loop whereas in do structure condition is tested
before repeating the statements inside loop
while b.
Until
c.
Do
d.
for
break b.
Goto
c.
Exit
d.
switch
break
b.
Goto
c.
Exit
d.
Switch
resumes the program if it is hanged b. resumes the program if it was break was applied
skips the rest of the loop in current iteration
d. all of above
101. Consider the following two pieces of codes and choose the best answer
CODE 1:
switch (x) {
case 1:
cout <<x is 1;
break;
case 2:
cout <<x is 2;
break;
default:
cout <<value of x unknown;
}
CODE 2
If (x==1){
Cout <<x is 1;
}
Else if (x==2){
Cout << x is 2;
}
Else{
Cout <<value of x unknown;
}
Mrs.J.VANITHA ASST.PROFESSOR/CSE
QUESTION BANK
a.
II - CSE
Both of the above code fragments have the same behaviour b. Both of the above code fragments
produce different effects
c.
The first code produces more results than second d. The second
code produces more results than first.
102. Observe the following block of code and determine what happens when x=2?
switch (x){
case 1:
case 2:
case 3:
cout<< "x is 3, so jumping to third branch";
goto thirdBranch;
default:
cout<<"x is not within the range, so need to say Thank You!" }
a. Program jumps to the end of switch statement since there is nothing to do for x=2b. The code inside
default will run since there is no task for x=2, so, default task is run
c.
Will display x is 3, so
jumping to third branch and jumps to thirdBranch.d. None of above
c.
104. The void specifier is used if a function does not have return type.
a.
True
b.
False
105. You must specify void in parameters if a function does not have any arguments.
a.
True
b.
False
106. Type specifier is optional when declaring a function
a.
True
b.
False
107. Study the following piece of code and choose the best answer int x=5, y=3, z;
a=addition(x,y)
a.
The function addition is called by passing the values b.
The function addition is called by
passing reference
108. In case of arguments passed by values when calling a function such as z=addidion(x,y),
a.
Any modifications to the variables x & y from inside the function will not have any effect
outside the function.b.
The variables x and y will be updated when any modification is done in
the function c.
The variables x and y are passed to the function addition
d.
None of
above are valid.
109. If the type specifier of parameters of a function is followed by an ampersand (&), that function call is
a.
pass by value b.
pass by reference
110. In case of pass by reference
a.
The values of those variables are passed to the function so that it can manipulate them
b.
The location of variable in memory is passed to the function so that it can use the
same memory area for its processing c.
The function declaration should contain ampersand
(&) in its type declaration d.
All of above
111. Overloaded functions are
a.
Very long functions that can hardly run
b.
One function containing another
one or more functions inside it.
c.
Two or more functions with the same name but
different number of parameters or type.
d.
None of above
112. Functions can be declared with default values in parameters. We use default keyword to specify
the value of such parameters.
a.
True
b.
False
113. Examine the following program and determine the output
#include <iostream>
Mrs.J.VANITHA ASST.PROFESSOR/CSE
QUESTION BANK
using namespace std;
int operate (int a, int b)
{
return (a * b);
}
float operate (float a, float b)
{
return (a/b);
}
int main()
{
int x=5, y=2;
float n=5.0, m=2.0;
cout << operate(x,y) <<"\t"; cout << operate (n,m);
}
a.
10.0
5.0 b.
5.0
2.5
c.
10.0
5
II - CSE
return 0;
d.
10
2.5
Answers
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114
c B a b d d
c
a
c
c
a
b
b
a
a
b
b
d
b
d
PART-B
(2 MARKS)
Mrs.J.VANITHA ASST.PROFESSOR/CSE
QUESTION BANK
Unlike mergesort,which divides its input's elements according to their position in the array,
II - CSE
quicksort divides them according to their value. It rearranges elements of a given array
A[0..n-1] to achieve its positional situation where all elements before some
positions 's' are smaller than or equal to A[s]
120.What is a pivot?
In quick sort ,we partition the given array into two sub arrays based on
the value stored in the element called pivot.
121.Give the time efficiency and drawback of merge sort algorithm.
Time efficiency : The best, worst and average case time complexity of merge sort is O(n logn)
The drawbacks : (I) This algorithm requires extra storage to execute this method
(ii) This method is slower than the quick sort method
(iii) This method is complicated to code.
122.Explain briefly how binary search works.
Binary search is remarkably efficient algorithm for searching in a sorted array.
It works by comparing a search key 'K' with the array's middle element A[m].
If they match, the algorithm stops;
Otherwise,the same operation is repeated recursively for the first half of the array
if K < A[m] and for the second half if K > A[m].
123.Write the Binary search algorithm. (A.U.NOV/MAY12)
ALGORITHM Binary Search(A[0..n-1],K)
l <-- 0; r <-- n-1
while l <= r do
m <-- |_ (I + r)/2_|
if K = A[m] return m
else if K < A[m] r <-- m-1
else m <-- m + 1
return -1
124.What is the time complexity of binary search in worst case?
Let the number of comparisons made in binary search algorithm = Cw(n)
We have Cw(n) = Cw(|_n/2_|) + 1 for n > 1, Cw(1) = 1
= Cw(2k/2) + 1
= Cw(2k-1) + 1
= Cw(2k-2) + 2
Let n = 2k
Then
Cw(2k) = k + 1
QUESTION BANK
the left and right sub tree of the root.
II - CSE
if n = 1
O(V2)
QUESTION BANK
To check connectivity and acclivity of graph
II - CSE
(16 MARKS)
130. Write a pseudo code for divide and conquer algorithm for merging two sorted arrays into a
single sorted one. Explain with an example.( A.U.APR09)
131.Design a recursive decrease-by-one algorithm for sorting the n real numbers in an array with
an example and determine the number of key comparisons and time efficiency of the
algorithm.
132.Explain quick sort algorithm with an example.( A.U.APR10)
133.Write an algorithm for Binary search tree and analyzes its efficiency.( A.U.MAY07)
77.Give a suitable example and explain the breadth first search and depth first search algorithms.
(A.U.NOV/DEC10) (A.U.NOV/DEC12)
134.Give an algorithm for selection sort. Analyze your algorithm's(A.U.JUNEO7)
135.Using the bruteforce string matching algorithm match the pattern EXAMPLE
from the text This_IS_A_SIMPLE_EXAMPLE. (A.U.NOV/DEC11)
136.What is the principal idea behind decrease and conquer? Compare and contrast decrease and
and conquer with divide and conquer approach.
137.Compare DFS and BFS.( A.U.APR06) (A.U.NOV/DEC10) (A.U.NOV/DEC12)
Explain in detail the general divide and conquer recurrence.
UNIT-IV (Backtracking)
PART-A
(1 MARKS)
QUESTION BANK
II - CSE
a. \n
b. \t
c. \0
d. \1
148. Identify the correct statement
a. Programmer can use comments to include short explanations within the source code itself.
b.
All lines beginning with two slash signs are considered comments. c.
Comments
very
important effect on the behaviour of the program
d. both
149. The directives for the preprocessors begin with
a. Ampersand symbol (&) b. Two Slashes (//) c. Number Sign (#) d. Less than symbol
(<)
150. The file iostream includes
a. The declarations of the basic standard input-output library.
b. The streams of includes
and outputs of program effect. c. Both of these
d. None of these
151. There is a unique function in C++ program by where all C++ programs start their execution
a. Start()
b. Begin() c. Main()
d. Output()
152. Every function in C++ are followed by
a. Parameters b. Parenthesis
c. Curly braces
d. None of these
152. Which of the following is false?
a. Cout represents the standard output stream in c++.
b. Cout is declared in the iostream
standard file
c. Cout is declared within the std namespace
d. None of above
153. Every statement in C++ program should end with
a. A full stop (.)
b. A Comma (,)
c. A Semicolon (;) d. A colon (:)
154. Which of the following statement is true about preprocessor directives?
a. These are lines read and processed by the pre-processor b. They do not produce any code by
themselves
c. These must be written on their own line d. They end with a semicolon
155. A block comment can be written by
a. Starting every line with double slashes (//)
b. Starting with /* and ending with */
c. Starting with //* and ending with *//
d. Starting with <!- and ending with -!>
156. When writing comments you can
a. Use code and /* comment on the same line
b. Use code and // comments on the same
line
c. Use code and //* comments on the same line
d. Use code and <!- comments on the
same line
Answers
138
139
140
141
142
140
143
144
145
146
147
148
149
150
151
152
153
154
155
156
PART-B
(2 MARKS)
polynomial algorithm
NP
NP is the class of decision problem that can be solved by a non-deterministic
polynomial algorithm
158.Define NP complete(A.U.APR08)
NP complete
A problem that is NP- complete can be solved in polynomial time if all other NP- complete
problems can also in polynomial time
159.Define NP-hard(A.U.NOV/DEC10)
Mrs.J.VANITHA ASST.PROFESSOR/CSE
QUESTION BANK
II - CSE
If an NP-hard problems can be solved in polynomial time then all NP complete problems can
also solved in polynomial time
160.Give the relation among the P,NP,NP-complete and NP-Hard problems
Aliens from anther world come to earth and tells us that the 3-SAT problems is solvable in time
which of the following statements follows
161.What are deterministic algorithms
Deterministic algorithms are the algorithm with uniquely defined results and predictable terms of
output for a certain input
162.What are Nondeterministic algorithm(A.U.NOV/MAY10)
Non deterministic algorithm are the algorithm that allowed containing operations whose
outcomes are limited to a give set of possibilities instead of being uniquely defined
163.Difference between Deterministic and Nondeterministic algorithm(MAY/JUNE07)
Deterministic Algorithm
Nondeterministic Algorithm
deterministic
algorithm
are
the
degree
are
called
tractable algorithm that is there exists a polynomial time algorithm that solves the problems
165.What is called Intractable problems?
Problems whose best-know algorithm are not bounded by polynomial that is non polynomial are
called hard or intractable problems
166.When do problems are said to be polynomial equivalent?
Two problems L1 and L2 are said to be polynomial equivalent if and only if L1,L2 and L2,L1
PART-C
(16 MARKS)
167.Define AVL tree. Explain the construction sequence of AVL tree with a simple example.(
A.U.NOV07)
168.Define spanning tree. Discuss the design steps in Prisms algorithm to construct a minimum
spanning tree with an example. (A.U.NOV/DEC12) (A.U.APR/MAY11)
169.Construct a minimum spanning tree using Kruskal's algorithm with an example.( A.U.MAY09)
170.Solve the all pairs shortest path problem for the digraph with the weight matrix given below :
171.Give a suitable example and explain the breadth first search and depth first search
algorithms. (A.U.NOV/DEC11) (A.U.NOV/DEC12)
172.Give an algorithm for selection sort. Analyze your algorithm's(APR08)
173.Using the bruteforce string matching algorithm match the pattern EXAMPLE
Mrs.J.VANITHA ASST.PROFESSOR/CSE
QUESTION BANK
from the text This_IS_A_SIMPLE_EXAMPLE.
II - CSE
174.What is the principal idea behind decrease and conquer? Compare and contrast decrease and
conquer with divide and conquer approach.
175.Compare DFS and BFS.( A.U.NOV06)
176.Explain in detail the general divide and conquer recurrence. (A.U.NOV/DEC12)
(1 MARKS)
179 Which of the following loader is executed when a system is first turned on or restarted
(A) Boot loader (B) Compile and Go loader(C) Bootstrap loader (D) Relating loader
180 Poor response time is usually caused by
(A) Process busy(B) High I/O rates(C) High paging rates(D) Any of the above
181Throughput of a system is
(A) Number of programs processed by it per unit time
(B) Number of times the program is invoked by the system
(C) Number of requests made to a program by the system (D) None of the above
182 The blocking factor of a file is
(A) The number of blocks accessible to a file
(B) The number of blocks allocated to a file
(C) The number of logical records in one physical record
QUESTION BANK
187 The expansion of nested macro calls follows
(A) FIFO rule.
II - CSE
(C) <symbol>EQU
ANSWERS:
176
177
177
179
180 1
181
182
183
PART-B
184
185
186
187
188
189
190
194
195
(2 MARKS)
Mrs.J.VANITHA ASST.PROFESSOR/CSE
QUESTION BANK
II - CSE
Let L1 and L2 be problems L1 reduces to L2 if and only if there is a way to solve L1 by a deterministic
polynomial time algorithm using a deterministic
Class NP
P is the class of decision problems that NP is the class of decision problems that can be
can
be
solved
by
deterministic solved
by
non-deterministic
polynomial
polynomial algorithm
algorithm
(16 MARKS)
207.Explain subset-sum problem and discuss the possible solution strategies using back tracking.(
A.U.NOV09) (A.U.NOV/DEC12)
Mrs.J.VANITHA ASST.PROFESSOR/CSE
QUESTION BANK
208.Discuss the solution for traveling salesman problem using Brach and bound technique.
II - CSE
WEIGHT
VALUE
$ 40
$42
$25
$12
Mrs.J.VANITHA ASST.PROFESSOR/CSE