1
GATE CSE 2015 Set 1
Numerical
+2
-0
Consider the following C program segment.
while(first <= last) 
{ 
    if (array[middle] < search) 
        first = middle + 1; 
    else if (array[middle] == search) 
              found = TRUE; 
          else last = middle - 1; 
    middle = (first + last)/2; 
}
 if (first > last) notPresent = TRUE; 
The cyclomatic complexity of the program segment is ________.
Your input ____
2
GATE CSE 2015 Set 1
MCQ (Single Correct Answer)
+1
-0.3

For any two languages L1 and L2 such that L1 is context-free and L2 is recursively enumerable but not recursive, which of the following is/are necessarily true?

I. $${\overline L _1}$$ (complement of L1) is recursive
II. $${\overline L _2}$$ (complement of L2) is recursive
III. $${\overline L _1}$$ is context-free
IV. $${\overline L _1} \cup {L_2}$$ is recursively enumerable
A
I only
B
III only
C
III and IV only
D
I and IV only
3
GATE CSE 2015 Set 1
MCQ (Single Correct Answer)
+2
-0.6
Consider the NPDA $$\left\langle {Q = \left\{ {{q_0},{q_1},{q_2}} \right\}} \right.,$$ $$\Sigma = \left \{ 0, 1 \right \},$$ $$\Gamma = \left \{ 0, 1, \perp \right \},$$ $$\delta, q_{0}, \perp,$$ $$\left. {F = \left\{ {{q_2}} \right\}} \right\rangle $$ , where (as per usual convention) $$Q$$ is the set of states, $$\Sigma$$ is the input alphabet, $$\Gamma$$ is the stack alphabet, $$\delta $$ is the state transition function q0 is the initial state, $$\perp$$ is the initial stack symbol, and F is the set of accepting states. The state transition is as follows: GATE CSE 2015 Set 1 Theory of Computation - Finite Automata and Regular Language Question 21 English

Which one of the following sequences must follow the string 101100 so that the overall string is accepted by the automaton?

A
10110
B
10010
C
01010
D
01001
4
GATE CSE 2015 Set 1
Numerical
+2
-0
GATE CSE 2015 Set 1 Theory of Computation - Finite Automata and Regular Language Question 22 English

Consider the DFAs M and N given above. The number of states in a minimal DFA that accepts the language L(M) ∩ L(N) is___________.

Your input ____
EXAM MAP
Medical
NEET
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
CBSE
Class 12