APSET JULY 2012 QUESTION PAPER WITH ANSWER KEY COMPUTER SCIENCE

Recommend US on google

If you like the blog, Please click on recommend us on google button below

Followers

Automata Theory

Theory of computation



Multiple Choice Questions (Set I)

In each of the following questions, choose the correct answer from the four choices provided.
1.The following grammar
G = (N, T, P, S)
N = {S, A, B}
T = {a, b, c}
P : S → aSa
S → aAa
A → bB
B → bB
B → c is
  1. is type 3
  2. is type 2 but not type 3
  3. is type 1 but not type 2
  4. is type 0 but not type 1
2.The following grammar
G = (N, T, P, S)
N = {S, A, B, C, D, E}
T = {a, b, c}
P : S → aAB
AB→CD
CD→CE
C→aC
C→b
bE→bc is

  1. is type 3
  2. is type 2 but not type 3
  3. is type 1 but not type 2
  4. is type 0 but not type 1
3.The following grammar
G = (N, T, P, S)
N = {S, A, B, C}
T = {a, b, c}
P : S → aS
A → bB
B → cC
C → a is
  1. is type 3
  2. is type 2 but not type 3
  3. is type 1 but not type 2
  4. is type 0 but not type 1
4.The following grammar
G = (N, T, P, S)
N = {S, A, B, C, D, E}
T = (a, b, c}
P : S → ABCD
BCD→DE
D→aD
D→a
E→bE
E→c is

  1. is type 3
  2. is type 2 but not type 3
  3. is type 1 but not type 2
  4. is type 0 but not type 1
5.Consider the following CFG
S → aBS → bA
B → bA → a
B → bSA → aS
B → aBBA → bAA

Consider the following derivation
S⇒aB
⇒aaBB
⇒aaBb
⇒aabSb
⇒aabbAb
⇒aabbab

This derivation is
  1. a leftmost derivation
  2. a rightmost derivation
  3. both leftmost and rightmost derivation
  4. neither leftmost nor rightmost derivation
6.Consider the following language
L = {anbncndn|n ≥ 1}
L is
  1. CFL but not regular
  2. CSL but not CFL
  3. regular
  4. type 0 language but not type 1
7.Consider the following language
L = {anbn|n ≥ 1}
L is
  1. CFL but not regular
  2. CSL but not CFL
  3. regular
  4. type 0 language but not type 1
8.Consider the following language
L = {anbmcpdq|n, m, p, q ≥ 1}
L is
  1. CFL but not regular
  2. CSL but not CFL
  3. regular
  4. type 0 language but not type 1
9.The following CFG is in
S → AB
B → CD
B → AD
B → b
D → AD
D → d
A → a
C → a
  1. Chomsky normal form but not strong Chomsky normal form
  2. Weak Chomsky normal form but not Chomsky normal form
  3. Strong Chomsky normal form
  4. Greibach normal form
10.The following CFG is in
S → aBB
B → bAA
A → a
B → b
  1. Chomsky normal form but not strong Chomsky normal form
  2. Weak Chomsky normal form but not Chomsky normal form
  3. Strong Chomsky normal form
  4. Greibach normal form


Answers

1.b
2.c
3.a
4.d
5.d
6.b
7.a
8.c
9.c
10.d

Next

3 comments:

  1. HI Bhanu, I think answer for 6 question is A, please cross check once.

    ReplyDelete
    Replies
    1. if answer is (a) , that means it is CFL.... if a language is in CFL then it should be in CSL and RE. so answer (b) is correct.

      Delete
  2. The correct answer for question 1 is b.

    ReplyDelete