Self Studies

Theory of Computation Test 4

Result Self Studies

Theory of Computation Test 4
  • Score

    -

    out of -
  • Rank

    -

    out of -
TIME Taken - -
Self Studies

SHARING IS CARING

If our Website helped you a little, then kindly spread our voice using Social Networks. Spread our word to your readers, friends, teachers, students & all those close ones who deserve to know what you know now.

Self Studies Self Studies
Weekly Quiz Competition
  • Question 1
    1 / -0

    Which one of the following is FALSE?

    Solution

    (i) TRUE: Set of all regular language has a bijection with set of all minimal DFAs.

    (ii) TRUE: Every NFA is a PDA.

    (iii). TRUE: Recursive languages are closed under complementation.

    (iv). FALSE: Set of all DPDAs is a proper subset of set of all NPDAs.

  • Question 2
    1 / -0
    If L(G) is accepted by pushdown automaton and 'S' is a string of length 16 in L(G), how long is a derivative of x in G, if G is Chomsky normal form?
    Solution

    Chomsky normal form

    S → AB

    A → a

    B → b

    Length of string = |S| = 16

    Length of the derivate of string x in context free grammar:

    2|16| – 1 = 2 × 16 - 1 = 31

    Note:
    Question say steps needed to generated string of 10 length

    e.g. if we need to generate ab (string of length 2)

    S → AB

    S → aB

    S → ab

    Number of steps = 2× 2 – 1 = 3

  • Question 3
    1 / -0
    If L1 and L2 are context free language, then which of the following is always accepted by pushdown automaton (PDA)? 
    Solution
    • Operation under which context free language is closed: Union, Kleene Closure and Concatenation.
    • \({L_1}\;U\;{L_2}\) is context free language ∴ it is accepted by PDA
    • Operation under which context free language is not closed: Intersection, complementation, set difference
    • \({L_1} - \;{L_2},\) \({L_1} \cap \;{L_2}\) and \(\overline {{L_1}\;U\;{L_2}}\) is not a free language ∴ it is not accepted by PDA. 
  • Question 4
    1 / -0

    Consider the languages L1, L2 and L3 as given below

    L1 = {0p1q0p | p, q ϵ N}

    L2 = {0p1q | p, q ϵ N and p < q} and

    L3 = {0p1q0r | p, q, r ϵ N and p = q = r}

    Which of the following statements is NOT TRUE?

    Solution

    TRUE: A DPDA can recognize L1 but not an FA because a stack with finite automata is required to recognize L1.

    FALSE: A DPDA can also recognize L2 as one stack with deterministic finite automata can recognize l2.

    TRUE: As L3 is CSL a PDA can not recognize it, it will require a LBA.

  • Question 5
    1 / -0

    If A is a deterministic context free language and B is also deterministic context language then which of the following will not be accepted by Deterministic Pushdown Automata?

    I. A ∪ B

    II. A̅ 

    III. A ∩ B

    IV. A U B̅ 

    Solution
    • Operation under which deterministic context-free language is closed: Complementation, Inverse Homomorphism, Intersection with regular language. CFL is accepted by PDA. Only A̅  is accepted by DPDA
    • Operation under which deterministic context-free language is not closed: Union, Intersection, set difference, etc
    • Only I, III, and IV are not accepted by DPDA.

    NOTE

    Deterministic Pushdown Automata → DPDA

  • Question 6
    1 / -0

    Consider the following languages:

    L= ab3c5n | n ≥ 1 and m ≥ 1

    L2 = a2m bp c2dq | m = n and p = q where m, n, p, q ≥ 0

    L3 = an bp cdr | p = q = r where n, p, q, r ≥ 0

    Which of the following is/are incorrect?

    I. L1 can be accepted by deterministic pushdown automaton.

    II. L2 can be accepted by the non-deterministic pushdown automaton

    III. L3 is a context-free language 

    Solution
    • If L = abckn   where k is constant, then it is a deterministic context-free language ∴ L1= ab3c5n can be accepted by deterministic pushdown automaton.
    • L2 = a2m bp c2dq  | m = n and p = q then L3 = L2 = a2m bp c2dp  it not is a context free language ∴  L2 = a2m bp c2dp cannot be accepted by non-deterministic pushdown automaton.
    • L= an bp cd| p = q = r then L= an bp cdp  it is not a context free grammar.
  • Question 7
    1 / -0

    Which of the following is true over {0, 1}?

    I. \(L_1={1^{50n}}\;|\;n \ge 1\)

    II. \(L_2 ={ {2^{{n}}}\;|\;n \ge3}\) 

    Lis written in the binary form where the given language is in decimal.

    Solution
    • \(L_1={1^{50n}}\;|\;n ≥ 1\) (4n ≥ 1) is in Arithmetic progression ∴ it a regular language and every regular language is accepted by PDA if it is accepted by FA then it is accepted PDA. Regular expression for L1 (1111...50 times)1*
    • \(L_2={2^{n}}\;|\;n ≥ 3\)  it is accepted by FA and hence it is accepted by PDA.
    • L2 = {1000(8), 10000(16), 100000 (32), 1000000, ....}. Regular expression for L2 is 10000*

    NOTE:

    PDA stands for pushdown automaton

    FA stands for finite automaton

Self Studies
User
Question Analysis
  • Correct -

  • Wrong -

  • Skipped -

My Perfomance
  • Score

    -

    out of -
  • Rank

    -

    out of -
Re-Attempt Weekly Quiz Competition
Selfstudy
Selfstudy
Self Studies Get latest Exam Updates
& Study Material Alerts!
No, Thanks
Self Studies
Click on Allow to receive notifications
Allow Notification
Self Studies
Self Studies Self Studies
To enable notifications follow this 2 steps:
  • First Click on Secure Icon Self Studies
  • Second click on the toggle icon
Allow Notification
Get latest Exam Updates & FREE Study Material Alerts!
Self Studies ×
Open Now