Self Studies

Theory of Computation Test 2

Result Self Studies

Theory of Computation Test 2
  • 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
    The string 1101 does not belong to the set represented by:
    Solution

    Option 1: (00 + (11)*0)

    This regular expression generates the strings like:

    {0, 00, 000, 110, 11011, 11110, 11000, …} .

    It is not generating 1101 because after every 11 there is a single 0 possible but a single 1 is not possible in any case.

    Option 2: 1(0 + 1)*101

    It is generating strings of type: {1101, 10101, 11101, 101101, ………}.

    It contains the string 1101, so not the correct answer.

    Option 3: (10)* (00 + 11)* (01)*

    This regular expression is generating strings of type: {ϵ, 10, 00, 11, 01, 1000, 1011, 1001, 1101…….}.

    It is possible to get 1101 in this expression. So, it is the not correct answer.

    Option 4: 110*(0 + 1)

    In this, set of strings that are possible are: {110, 111, 1100, 1101, 11001,……..}.

    So it is generating the string 1101. So, it is not the correct answer.
  • Question 2
    1 / -0
    Let P, Q R be a regular expression over ∑ If P does not contain null string, then R = Q + RP has a unique solution ____
    Solution

    Concept:

    We will solve the above equation R = Q + RP using Arden’s Theorem

    Explanation-

    In order to find out a regular expression of a Finite Automaton, we use Arden’s Theorem along with the properties of regular expressions.

    Statement

    Let P and Q be two regular expressions.

    If P does not contain null string, then R = Q + RP has a unique solution that is R = QP*

    Proof:

    R = Q + (Q + RP) P [After putting the value R = Q + RP]

    = Q + QP + RPP

    When we put the value of R recursively again and again, we get the following equation −

    R = Q + QP + QP2 + QP3…..

    R = Q (ε + P + P2 + P3 + ….)

    R = QP* [As P* represents (ε + P + P2 + P3 + ….)]

  • Question 3
    1 / -0
    Which of the following regular expression is equal to (r1 + r2)*?
    Solution

    Concept:

    Two regular expression are equivalent if languages that are generated by them are also equal.

    Explanation:

    Given regular expression: (r1 + r2)*

    It means 0 or any sequence of r1 and r2

    Check all the options one by one:

    Option 1: r1* r2*

    In this it can generate any no. of r1 and r2. But r1 is followed by r2.

    Option 2: (r1r2)*

    It generates all the strings in which r1r2 are together. It generates any number of r1r2.

    We cannot generate single r1 and r2.

    Option 3: r1*r2* + r1r2

    It cannot generate the same language as that of given regular expression. It cannot generate null string.

    Option 4: (r1*r2*)*

    It is equivalent to (r1 + r2)*. It can generate null string and any combination of r1 and r2. Hence it is equal to the given regular expression.
  • Question 4
    1 / -0

    Which of the following is equivalent regular expressions?

    (i) ((01)*(10)*)*

    (ii) (10 + 01)*

    (iii) (01)* + (11)*

    (iv) (0* + (11)* + 0*)*)
    Solution

    (i) ((01)*(10)*)*

    It generates the strings of type {ϵ, 01, 10, 0110, 0101, 1001, 1010, 010110, 01011010,……..}

    (ii) (10 + 01)*

    Set of strings that are generated by the regular expression:

    { ϵ , 10, 01, 1010, 0101, 0110, 1001, 101010, 010101,………..}

    (iii) (01)* + (11)*

    Strings that are generates with this expression are:

    { ϵ , 01, 11, 0101, 1111, 010101, 111111,………. }

    (iv) (0* + (11)* + 0*)*)

    Strings that are generated with this regular expression:

    { ϵ , 0, 11, 00, 000, 011, 110, 0110, 00110, 01100,……….}

    Regular expression of first two options are equal, both these regular expressions generate same set of strings.
  • Question 5
    1 / -0

    Let L, M be any two context-free languages and X be any regular language. 

    I. M – X is context-free

    II. L ∪ M is context-free

    which of the following from the above statement is/are CORRECT?

    Solution

    Concept: Property of context-free languages is:

    Context-free languages are closed under union and difference but not closed under complementation and intersection.

    Explanation:

    Option 1) M – X is context-free

    As a difference of a context-free language with regular is context-free. So, it is correct.

    Option 2) L ∪ M is context-free

    As context-free languages are closed under union. So it is correct.

    Confusion Point:

    If two languages are context-free language, then it is not closed under set difference operation, but if one language is regular and other is context-free than it is closed under set difference operation.

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