GATE 2013 Computer Science and Information Technology (CS) Questions with Solutions

GATE 2013

80 questions

MCQ 801-mark 38 · 2-mark 42

Questions 31–35 of 80

Q31Asymptotic Notation2 marksMCQ−0.67 if wrong
Consider the following function:
 int unknown(int n){
   int i, j, k=0;
   for (i=n/2; i<=n; i++)
        for (j=2; j<=n; j=j*2)
             k = k + n/2;
    return (k);
} 
The return value of the function is

Q32Shortest Path1 markMCQ−0.33 if wrong
What is the time complexity of Bellman-Ford single-source shortest path algorithm on a complete graph of n vertices?

Q33Finite Automata2 marksMCQ−0.67 if wrong
Consider the DFA A given below.
10010,1
Which of the following are FALSE?
1. Complement of L(A) is context-free.
2. L(A) = L((11*0+0) (0+1)*0*1*)
3. For the language accepted by A, A is the minimal DFA.
4. A accepts all strings over {0, 1} of length at least 2.

Q34Regular Language1 markMCQ−0.33 if wrong
Consider the languages L1=ϕL_{1}=\phi and L2={a}L_{2}=\{a\}. Which one of the following represents L1L2∗∪L1∗L_{1} L_{2}^{*} \cup L_{1}^{*}?

Q35Context Free Language2 marksMCQ−0.67 if wrong
Consider the following languages. L1={0p1q0r∣p,q,r≥0}L_{1}=\{0^{p}1^{q}0^{r}|p,q,r\geq 0\}
L2={0p1q0r∣p,q,r≥0,p≠r}L_{2}=\{0^{p}1^{q}0^{r} | p,q,r \geq 0, p \neq r \}
Which one of the following statements is FALSE?