31.  A certain tree has two vertices of degree 4, one vertex of degree 3 and one vertex of degree 2. If the other vertices have degree 1, how many vertices are there in the graph? 
a.  5 
b.  n3 
c.  20 
d.  11 
View Answer Report Discuss Too Difficult! Search Google 
Answer: (d).11

32.  Consider a set A {1, 2, 3,……… 1000}. How many members of A shall be divisible by 3 or by 5 or by both 3 and 5? 
a.  533 
b.  599 
c.  467 
d.  66 
View Answer Report Discuss Too Difficult! Search Google 
Answer: (c).467

33.  A computer program selects an integer in the set {k : 1 < k < 10,00,000} at random and prints out the result. This process is repeated 1 million times. What is the probability that the value k = 1 appears in the printout at least once? 
a.  0.5 
b.  0.704 
c.  0.632121 
d.  0.68 
View Answer Report Discuss Too Difficult! Search Google 
Answer: (c).0.632121

34.  Which one of the following is used to compute cyclomatic complexity? 
a.  The number of regions  1 
b.  E  N + 1, where E is the number of flow graph edges and N is the number of flow graph nodes 
c.  P – 1, where P is the number of predicate nodes in the flow graph G 
d.  P + 1, where P is the number of predicate nodes in the flow graph G 
View Answer Report Discuss Too Difficult! Search Google 
Answer: (d).P + 1, where P is the number of predicate nodes in the flow graph G

35.  If we define the functions f, g and h that map R into R by : f(x) = x4, g(x) = √x2 + 1, h(x) = x2 + 72, then the value of the composite functions ho(gof) and (hog)of are given as 
a.  x^8  71 and x^8  71 
b.  x^8  73 and x^8  73 
c.  x^8 + 71 and x^8 + 71 
d.  x^8 + 73 and x^8 + 73 
View Answer Report Discuss Too Difficult! Search Google 
Answer: (d).x^8 + 73 and x^8 + 73

36.  Dijkstra algorithm, which solves the singlesource shortestpaths problem, is a_______________, and the FloydWarshall algorithm, which finds shortest paths between all pairs of vertices, is a _____________. 
a.  Greedy algorithm, Divideconquer algorithm 
b.  Divideconquer algorithm, Greedy algorithm 
c.  Greedy algorithm, Dynamic programming algorithm 
d.  Dynamic programming algorithm, Greedy algorithm 
View Answer Report Discuss Too Difficult! Search Google 
Answer: (d).Dynamic programming algorithm, Greedy algorithm

37.  Equivalent logical expression for the Well Formed Formula (WFF), ~(∀ x)F[x] is 
a.  (∀ x) ~F[x] 
b.  ~( ∃ x) F[x] 
c.  ( ∃ x)~ ( F[x]) 
d.  (∀ x)F[x] 
View Answer Report Discuss Too Difficult! Search Google 
Answer: (c).( ∃ x)~ ( F[x])

38.  An A * algorithm is a heuristic search technique which 
a.  is like a depthfirst search where most promising child is selected for expansion 
b.  generates all successor nodes and computes an estimate of distance (cost) from start node to a goal node through each of the successors. It then chooses the successor with shortest cost 
c.  saves all path lengths (costs) from start node to all generated nodes and chooses shortest path for further expansion 
d.  None of the above 
View Answer Report Discuss Too Difficult! Search Google 
Answer: (b).generates all successor nodes and computes an estimate of distance (cost) from start node to a goal node through each of the successors. It then chooses the successor with shortest cost

39.  The resolvent of the set of clauses (A v B, ~ A v D, C v ~B) is 
a.  A v B 
b.  C v D 
c.  A v C 
d.  A v D 
View Answer Report Discuss Too Difficult! Search Google 
Answer: (b).C v D

40.  How many strings of 5 digits have the property that the sum of their digits is 7 ? 
a.  66 
b.  330 
c.  495 
d.  99 
View Answer Report Discuss Too Difficult! Search Google 
Answer: (b).330
