search
Log In

Recent questions and answers in Theory of Computation

38 votes
5 answers
1
Consider the following languages: $L_{1}=\left\{a^{n}b^{m}c^{n+m}:m, n\geq 1\right\}$ $L_{2}=\left\{a^{n}b^{n}c^{2n} :n\geq 1\right\}$ Which one of the following is TRUE? Both $L_{1}$ and $L_{2}$ are context-free. $L_{1}$ is context-free while $L_{2}$ is not context-free. $L_{2}$ is context-free while $L_{1}$ is not context-free. Neither $L_{1}$ nor $L_{2}$ is context-free.
answered Jul 14 in Theory of Computation raja11sep 11.8k views
0 votes
1 answer
2
Informally describe multitape Turing machines that enumerate the following sets of integers, in the sense that started with blank tapes, it prints on one of its tapes $10^{i_{1}}10^{i_{2}}1\cdot\cdot\cdot$ ... be simulated for at least $s$ steps, then we shall eventually discover each $M_{i}$ that accepts $w_{i}$ and enumerate $i$.
answered Jul 14 in Theory of Computation waqasmugal05 257 views
15 votes
5 answers
3
$L= \{\langle M\rangle \mid L(M)\text{ is infinite}\}$ $L$ is RE but $L'$ is not RE Both $L$ and $L'$ are RE $L$ is not RE but $L'$ is RE Both $L$ and $L'$ are not RE
answered Jul 12 in Theory of Computation rish1602 2.9k views
2 votes
2 answers
4
Let $L=\{0^n1^n|n\ge 0\}$ be a context free language. Which of the following is correct? $\overline L$ is context free and $L^k$ is not context free for any $k\ge1$ $\overline L$ is not context free and $L^k$ is context free for any $k\ge1$ Both $\overline L$ and $L^k$ for any $k\ge1$ are context free Both $\overline L$ and $L^k$ for any $k\ge1$ are not context free
answered Jul 12 in Theory of Computation rish1602 174 views
18 votes
3 answers
5
Which of the following regular expressions describes the language over$\{0, 1\}$ consisting of strings that contain exactly two $1$'s? $(0 + 1)^ * \ 11(0 + 1) ^*$ $0 ^* \ 110 ^*$ $0 ^* 10 ^* 10 ^*$ $(0 + 1) ^* 1(0 + 1) ^* 1 (0 + 1) ^*$
answered Jul 12 in Theory of Computation Manu Shaurya 5.2k views
26 votes
2 answers
6
Which of the following are regular sets? $\left\{a^nb^{2m} \mid n \geq 0, m \geq 0 \right\}$ $\left\{a^nb^m \mid n =2m \right\}$ $\left\{a^nb^m \mid n \neq m \right\}$ $\left\{xcy \mid x, y, \in \left\{a, b\right\} ^* \right\}$ I and IV only I and III only I only IV only
answered Jul 11 in Theory of Computation raja11sep 5.7k views
3 votes
2 answers
8
2 votes
2 answers
9
Let $G_1$ and $G_2$ be arbitrary context free languages and $R$ an arbitrary regular language. Consider the following problems: Is $L(G_1)=L(G_2)$? Is $L(G_2) \leq L(G_1)$? Is $L(G_1)=R$? Which of the problems are undecidable? Choose the correct answer from the options given below: $(a)$ only $(b)$ only $(a)$ and $(b)$ only $(a)$, $(b)$ and $(c)$
answered Jul 5 in Theory of Computation rish1602 272 views
43 votes
3 answers
10
$L_1$ is a recursively enumerable language over $\Sigma$. An algorithm $A$ effectively enumerates its words as $\omega_1, \omega_2, \omega_3, \dots .$ Define another language $L_2$ over $\Sigma \cup \left\{\text{#}\right\}$ ... $S_1$ is true but $S_2$ is not necessarily true $S_2$ is true but $S_1$ is not necessarily true Neither is necessarily true
answered Jul 5 in Theory of Computation rish1602 6.9k views
24 votes
5 answers
11
Which two of the following four regular expressions are equivalent? ($\varepsilon$ is the empty string). $(00)^ * (\varepsilon +0)$ $(00)^*$ $0^*$ $0(00)^*$ (i) and (ii) (ii) and (iii) (i) and (iii) (iii) and (iv)
answered Jul 4 in Theory of Computation adad20 5.7k views
35 votes
4 answers
12
Let $M=(K, Σ, \sigma, s, F)$ be a finite state automaton, where $K = \{A, B\}, Σ = \{a, b\}, s = A, F = \{B\},$ $\sigma(A, a) = A, \sigma(A, b) = B, \sigma(B, a) = B \text{ and} \ \sigma(B, b) = A$ A grammar to generate the language accepted by $M$ ... $\{A → bB, A → aB, B → aA, B → bA, B → \epsilon)$ $\{A → aA, A → bA, B → aB, B → bA, A → \epsilon)$
answered Jul 2 in Theory of Computation raja11sep 3.9k views
45 votes
3 answers
13
Which of the following set can be recognized by a Deterministic Finite state Automaton? The numbers $1, 2, 4, 8, \dots 2^n, \dots$ written in binary The numbers $1, 2, 4, 8,\dots 2^n, \dots$ written in unary The set of binary string in which the number of zeros is the same as the number of ones. The set $\{1, 101, 11011, 1110111, \dots\}$
answered Jul 1 in Theory of Computation raja11sep 9.4k views
3 votes
2 answers
14
Whether the given languages are recursive, recursively enumerable or non RE 1) $L = \left \{ <M> | <M> \ accepts \ all \ strings \ of \ length \ at \ most \ 5 \right \}$ 2) $L = \left \{ <M> | <M> \ accepts \ strings \ of \ length \ at \ most \ 5 \right \}$
answered Jul 1 in Theory of Computation rish1602 404 views
1 vote
3 answers
15
5 votes
2 answers
16
Let G be a grammar in CFG and Let W1 and W2 is element of G such that |w1| = |w2| then which of the following is true? A. Any derivation of W1 has exactly the same number of steps as any derivation of W2 B. Different derivation have different length C.Some derivation of W1 may be shorter that derivation of W2 D. None of the options
answered Jun 28 in Theory of Computation Pvkarma 2k views
0 votes
3 answers
19
Can someone show how we can systematically come up with regular expression for language not containing string 101 on alphabet {0,1} by first creating DFA and then converting it to regular expression?
answered Jun 26 in Theory of Computation Amartya 3.8k views
51 votes
4 answers
22
Consider the regular grammar: $S \rightarrow Xa \mid Ya$ $X \rightarrow Za$ $Z \rightarrow Sa \mid \epsilon$ $Y \rightarrow Wa$ $W \rightarrow Sa$ where $S$ is the starting symbol, the set of terminals is $\{a\}$ ... deterministic finite automaton (DFA) to recognize the same language. What is the minimum number of states required for the DFA? $2$ $3$ $4$ $5$
answered Jun 24 in Theory of Computation Ashley Varghese Joy 6.4k views
34 votes
8 answers
23
Consider the following languages over the alphabet $\sum = \left \{ a, b, c \right \}$. Let $L_{1} = \left \{ a^{n}b^{n}c^{m}|m,n \geq 0 \right \}$ and $L_{2} = \left \{ a^{m}b^{n}c^{n}|m,n \geq 0 \right \}$. Which of the following are context-free languages? $L_{1} \cup L_{2}$ $L_{1} \cap L_{2}$ I only II only I and II Neither I nor II
answered Jun 23 in Theory of Computation rish1602 8.5k views
39 votes
5 answers
24
Let $L$ be the language represented by the regular expression $\Sigma^*0011\Sigma^*$ where $\Sigma = \{0, 1\}$. What is the minimum number of states in a DFA that recognizes $\bar{L}$ (complement of $L$)? $4$ $5$ $6$ $8$
answered Jun 23 in Theory of Computation rish1602 10k views
33 votes
6 answers
25
Let $L$ be a context-free language and $M$ a regular language. Then the language $L ∩ M$ is always regular never regular always a deterministic context-free language always a context-free language
answered Jun 22 in Theory of Computation varunrajarathnam 5.5k views
24 votes
7 answers
26
54 votes
13 answers
28
What is the complement of the language accepted by the NFA shown below? Assume $\Sigma = \{a\}$ and $\epsilon$ is the empty string. $\phi$ $\{\epsilon\}$ $a^*$ $\{a , \epsilon\}$
answered Jun 21 in Theory of Computation rish1602 10.9k views
32 votes
5 answers
29
Let $\Sigma$ be the set of all bijections from $\{1, \dots , 5\}$ to $\{1, \dots , 5 \}$, where $id$ denotes the identity function, i.e. $id(j)=j, \forall j$. Let $\circ$ ... $L=\{x \in \Sigma^* \mid \pi (x) =id\}$. The minimum number of states in any DFA accepting $L$ is _______
answered Jun 19 in Theory of Computation rish1602 10.4k views
4 votes
3 answers
30
1 vote
2 answers
32
Consider the following regular expressions: $r=a(b+a)^*$ $s=a(a+b)^*$ $t=aa^*b$ Choose the correct answer from the options given below based on the relation between the languages generated by the regular expressions above: $L(r) \subseteq L(s) \subseteq L(t)$ $L(r) \supseteq L(s) \supseteq L(t)$ $L(r) \supseteq L(t) \supseteq L(s)$ $L(s) \supseteq L(t) \supseteq L(r)$
answered Jun 19 in Theory of Computation cherrywood55 320 views
1 vote
4 answers
33
Let $L_1$ and $L_2$ be languages over $\Sigma = \{a,b\}$ represented by the regular expressions $(a^* +b)^*$ and $(a+b)^*$ respectively. Which of the following is true with respect to the two languages? $L_1 \subset L_2$ $L_2 \subset L_1$ $L_1 = L_2$ $L_1 \cap L_2 = \phi$
answered Jun 19 in Theory of Computation cherrywood55 445 views
46 votes
11 answers
34
Consider the alphabet $\Sigma = \{0, 1\}$, the null/empty string $\lambda$ and the set of strings $X_0, X_1, \text{ and } X_2$ generated by the corresponding non-terminals of a regular grammar. $X_0, X_1, \text{ and } X_2$ are related as follows. $X_0 = 1 X_1$ $X_1 = 0 X_1 + 1 X_2$ ... in $X_0$? $10(0^*+(10)^*)1$ $10(0^*+(10)^*)^*1$ $1(0+10)^*1$ $10(0+10)^*1 +110(0+10)^*1$
answered Jun 15 in Theory of Computation rish1602 10.7k views
52 votes
9 answers
35
Let $w$ be any string of length $n$ in $\{0,1\}^*$. Let $L$ be the set of all substrings of $w$. What is the minimum number of states in non-deterministic finite automation that accepts $L$? $n-1$ $n$ $n+1$ $2^{n-1}$
answered Jun 15 in Theory of Computation rish1602 13.2k views
46 votes
5 answers
36
Consider the following two finite automata. $M_1$ accepts $L_1$ and $M_2$ accepts $L_2$. $M_1$ $M_2$ Which one of the following is TRUE? $L_1 = L_2$ $L_1 \subset L_2$ $L_1 \cap L_{2}^{C} = \varnothing $ $L_1 \cup L_2 \neq L_1$
answered Jun 15 in Theory of Computation rish1602 6.5k views
35 votes
12 answers
37
70 votes
8 answers
38
59 votes
3 answers
39
State True or False with one line explanation A FSM (Finite State Machine) can be designed to add two integers of any arbitrary length (arbitrary number of digits).
answered Jun 1 in Theory of Computation rish1602 8.9k views
59 votes
8 answers
40
Consider the following context-free grammar over the alphabet $\Sigma = \{a,b,c\}$ with $S$ as the start symbol:$S \rightarrow abScT \mid abcT$$T \rightarrow bT \mid b$ ... $\{\left ( ab \right )^{n}\left ( cb^{n} \right )^{m} \mid m,n \geq 1 \}$
answered Jun 1 in Theory of Computation rish1602 12.9k views
To see more, click for all the questions in this category.
...