GATE CSE
First time here? Checkout the FAQ!
x
+8 votes
328 views
  1. Given that $A$ is regular and $(A \cup B)$ is regular, does it follow that $B$ is necessarily regular? Justify your answer.

  2. Given two finite automata $M1, M2$, outline an algorithm to decide if $L(M1) \subset L(M2)$. (note: strict subset)

 

asked in Theory of Computation by Veteran (66.2k points) 1154 2199 2523
edited by | 328 views

3 Answers

+18 votes
Best answer

a) A is regular ,    A U B is regular , then B is not necessary regular 

example :- A = (a+b)*      B = anbn n>=0      A U B is (a+b)*       while B is not regular. 

 

b ) we have two machine M 1 and M 2 

draw a DFA using M1 and M2  where start state is, say,  p0q0 (where p0 is start state in M1 and q0 is start state in M2)

∂(p0q0, 0) = ∂(p0, 0) U ∂(q0, 0)  

if L(M1) ⊆ L (M2) 

Then final state of M1 will come together with final state of M2, while Final state of M2 can come alone.

i.e All inputs of M1 is also in machine M2 , and there may be different inputs in M2.

answered by Veteran (54.9k points) 96 246 476
selected by
this should be done on the minimal DFA? Also how to ensure strict subset?
DFA need not be minimal.

To ensure strict subset, there should be atleast one final state of M2 that appears alone.
M1 and M2 even need not to be DFA, they may be NFA , resulting M1 x M2 will be DFA (that may be not minimized).
+1 vote
a) A is regular ,    A U B is regular , then B is not necessary regular

example :- A = (a+b)*      B = Any non regular language    A U B is (a+b)*    ,   while B is not regular.

B)

Algorithm ->

Using DFA for M1 & M2 , create product DFA. Make two copies of it.

Suppose A is final state for M1 & B is final state of M2. Assume that C is some non final state for M1 & D is some non final state for M2.

To check for subset ->

Now make A as final state whenever it is associated with some non final state for M2. If A is associated with final state of M2, then make that product state non final. This way we will calculate M1-M2. This DFA should accept Empty language otherwise L(M1) is not subset of L(M2)

To check for proper subset ->

Make B as final state, whenever it is associated with some non final state of M1. If A is associated with final state of M1, then make that product state non final. This way we will calculate M2-M1. This DFA should accept non Empty language otherwise L(M1) is not proper subset of L(M2)

if both tests pass then we can say L(M1) is proper subset of L(M2).
answered by Veteran (45.7k points) 171 533 843
0 votes
Intersection of M2' and M1 should have no final states AND Intersection of M2 and M1' should have at least one final state.
answered ago by Junior (605 points) 1 2 11


Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
Top Users Oct 2017
  1. Arjun

    23396 Points

  2. Bikram

    17078 Points

  3. Habibkhan

    8158 Points

  4. srestha

    6286 Points

  5. Debashish Deka

    5438 Points

  6. jothee

    4978 Points

  7. Sachin Mittal 1

    4772 Points

  8. joshi_nitish

    4344 Points

  9. sushmita

    3964 Points

  10. Rishi yadav

    3804 Points


Recent Badges

Notable Question Priyanka23
Great Question khushtak
Good Question Ishrat Jahan
Good Answer Arjun
Revival Arjun
Nice Question Kathleen
Nice Answer janakyMurthy
Renewal janakyMurthy
Renewal Bikram
Nice Answer Bikram
27,316 questions
35,169 answers
84,074 comments
33,262 users