Sail E0 Webinar

MCQs

Total Questions : 9
Question 1. A connected planar graph having 6 vertices, 7 edges contains _____________ regions.
  1.    15
  2.    3
  3.    1
  4.    11
 Discuss Question
Answer: Option B. -> 3


By euler's formula the relation between vertices(n), edges(q) and regions(r) is given by n-q+r=2.


Question 2. Assuming value of every weight to be greater than 10, in which of the following cases the shortest path of a directed weighted graph from 2 vertices u and v will never change?
  1.    add all values by 10
  2.    subtract 10 from all the values
  3.    multiply all values by 10
  4.    In both the cases of multiplying and adding by 10
 Discuss Question
Answer: Option C. -> multiply all values by 10


In case of addition or subtraction the shortest path may change because the number of edges between different paths may be different, while in case of multiplication path wont change.


Question 3. If there are more than 1 topological sorting of a DAG is possible, which of the following is true.
  1.    Many Hamiltonian paths are possible
  2.    No Hamiltonian path is possible
  3.    Exactly 1 Hamiltonian path is possible
  4.    Given information is insufficient to comment anything
 Discuss Question
Answer: Option B. -> No Hamiltonian path is possible


For a Hamiltonian path to exist all the vertices must be connected with a path, had that happened there would have been a unique topological sort.


Question 4. On which of the following statements does the time complexity of checking if an edge exists between two particular vertices is not, depends?
  1.    Depends on the number of edges
  2.    Depends on the number of vertices
  3.    Is independent of both the number of edges and vertices
  4.    It depends on both the number of edges and vertices
 Discuss Question
Answer: Option C. -> Is independent of both the number of edges and vertices


To check if there is an edge between to vertices i and j, it is enough to see if the value of A[i][j] is 1 or 0, here A is the adjacency matrix.


Question 5. What is the maximum number of possible non zero values in an adjacency matrix of a simple graph with n vertices?
  1.    (n*(n-1))/2
  2.    (n*(n+1))/2
  3.    n*(n-1)
  4.    n*(n+1)
 Discuss Question
Answer: Option C. -> n*(n-1)


Out of n*n possible values for a simple graph the diagonal values will always be zero.


Question 6. If a connected Graph (G) contains n vertices what would be the rank of its incidence matrix?
  1.    n-1
  2.    values greater than n are possible
  3.    values less than n-1 are possible
  4.    Insufficient Information is given
 Discuss Question
Answer: Option A. -> n-1


Every column of the incidence matrix may contain only +1 and -1 as non zero entries rank would be less than n.


Question 7. What is time complexity to check if a string(length S1) is a substring of another string(length S2) stored in a Directed Acyclic Word Graph, given S2 is greater than S1?
  1.    O(S1)
  2.    O(S2)
  3.    O(S1+S2)
  4.    O(1)
 Discuss Question
Answer: Option A. -> O(S1)


For each check of a word of length S1, we need to follow at most S1 edges.


Question 8. What is the number of vertices of degree 2 in a path graph having n vertices,here n>2.
  1.    n-2
  2.    n
  3.    2
  4.    0
 Discuss Question
Answer: Option A. -> n-2


Only the first and the last vertex would have degree 1, others would be of degree 2.


Question 9. Possible number of labelled simple Directed, Pseudo and Multigarphs exist having 2 vertices?
  1.    3, Infinite, 4
  2.    4, 3, Infinite
  3.    4, Infinite, infinite
  4.    4, Infinite, Infinite
 Discuss Question
Answer: Option D. -> 4, Infinite, Infinite


MultiGraphs and PseudoGraphs may have infinite number of edges, while 4 possible simple graphs exist.


Latest Videos

Latest Test Papers