You are on page 1of 3

Choose from chapter 6,7,8

i. The bad match table symbol d, is computed by the Boyer-Moore algorithm which can be by the
formula of _______________.

(a) d1 =max{t1 (c) K,1} (b) d1 =max{t1 (c) - K,1}


(c) d1 =max{t1 (c) + K,1} (d) d1 =max{t1 (c) * K,1}

ii. In a Horspool’s algorithm, when searching a pattern with some text, if there is an mismatch, we

need to shift the pattern to _____________________.

(a) left position (b) middle position


(c) right position (d) recurrence

iii. Floyd’s algorithms is convenient to record the length of shortest path in an n-by-n matrix is
called ________________.

(a) Distance matrix (b) Adjacency matrix

(c) Incident matrix (d) matrix multiplication


iv. Transformation to an instance of a different problem for which an algorithm is already available
we term it _____________________.

(a) problem reduction (b) problem change


(c) problem instance (d) problem representation

v. Evaluate the polynomial equation f(X)= 2x3 -6x2+2x-1 at a given point x=3 by Horner’s rule, the
remainder is f(3) = ______.

(a) 3 (b) 4
(c) x3 (d) 5
vi. Dynamic programming is technique used for solving problems with _____________sub
problems.

(a) occurrence (b) overlapping


(c) sequence (d) none of these

vii. Given a directed graph, if a vertex j is reachable from another vertex i for all vertex pairs (i, j)
in the given graph. The reach-ability matrix is called the ___________ of a graph

(a) adjacency matrix (b) boolean matrix


(c) digraph (d) transitive closure 

viii. The time efficiency of Floyd’s algorithm is _______ for the all-pairs shortest-paths problem

(a) square (b) cubic


(c) quadratic (d) none of these

ix. _______________ formula for computing the transitive closure of warshall’s algorithm.

(a) (R(k-1) [i,k] and R(k-1)[k,j]) (b) (R(k-1)[i,k] or R(k-1)[k,j]))


(c) (R(k-1)[i,j] and R(k-1)[i,j]) (d) (R(k-1)[i,k] and R(k-1)[k,j])

x. The time efficiency of warshall’s algorithm for computing the transitive closure is ________.

(a) (n3) (b) (n2)


(c) (n) (d) (1)

You might also like