1
GATE CSE 2020
Numerical
+2
-0
Consider the following C functions.
int fun1 (int n) {
     static int i = 0;
     if (n > 0) {
            ++i;
            fun1(n-1);
     }
     return (i);
}

___________________
int fun2 (int n) {
     static int i = 0;
     if (n > 0) {
            i = i + fun1 (n);
            fun2(n-1);
     }
     return (i);
}

The return value of fun2 (5) is _______.
Your input ____
2
GATE CSE 2020
MCQ (Single Correct Answer)
+2
-0.67

Consider the following languages.

L1 = {wxyx | w, x, y ∈ (0 + 1)+}

L2 = {xy | x, y ∈ (a + b)*, |x| = |y|, x ≠ y}

Which one of the following is TRUE?

A
L1 is regular and L2 is context-free.
B
L1 is context-free but not regular and L2 is context-free.
C
Neither L1 nor L2 is context-free.
D
L1 is context-free but L2 is not context-free.
3
GATE CSE 2020
MCQ (Single Correct Answer)
+2
-0.67
Which of the following languages are undecidable? Note that $$\langle M\rangle $$ indicates encoding of the Turing machine M.

L1 = $$\left\{ {\langle M\rangle |L\left( M \right) = \phi } \right\}$$
L2 = $$\{ \langle M,w,q\rangle |$$ M on input w reaches state q in exactly 100 steps }
L3 = { $$\langle M\rangle |$$ L(M) is not recursive }
L4 = { $$\langle M\rangle |$$ L(M) contains at least 21 members }
A
L2 and L3 only
B
L1 and L3 only
C
L2, L3 and L4 only
D
L1, L3 and L4 only
4
GATE CSE 2020
Numerical
+2
-0.67
Consider the following language.

L = {x $$ \in $$ {a, b}* | number of a’s in x is divisible by 2 but not divisible by 3}

The minimum number of states in a DFA that accepts L is ______.
Your input ____
EXAM MAP
Medical
NEETAIIMS
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
Civil Services
UPSC Civil Service
Defence
NDA
Staff Selection Commission
SSC CGL Tier I
CBSE
Class 12