0

Consider the following languages over = {0, 1},

A = {2 : w contains 011 as a substring} B = the language matched by the regular expression 0(0 + 1)*1

Let M(B) be the DFA obtained by converting N(B) using the subset construction with all unnecessary states removed. Let ¬M(B) be the DFA obtained by swapping the final and non-final states of MB. Let M be the product of M(A) and ¬M(B) with all unnecessary state removed.

How many states would M have? How many final states would M have? How many states does M(B) have? This question has been boggling me, I have spent a few hours on jFlap putting together the intersection of these two DFA, for A and ¬B. No success. Thank you.

Braithe Warnock
  • 37
  • 1
  • 10
  • Formatting is messed up for your definition of A; do you mean w^2 such that w contains 011? Your regular expression for B describes exactly two strings: 001 and 011. Is this intentional? Once you have machines for A and B, just convert them to minimal DFAs, compute the product and then minimize the result. – Patrick87 Sep 30 '14 at 19:59
  • W2 is typo , it's just w. These are two very simple languages – Braithe Warnock Oct 01 '14 at 04:36
  • wont the language be an empty language? M(A) = containing substring 011 ¬M(B) = not containing 001 and 011 intersection of the above 2 languages will be empty, i guess – Haris Oct 01 '14 at 06:24
  • Thats exactly what I thought, but apparently it is possible to create the intersection of these two. My gripe was that an accept or final state would have to be at the start state, which would conflict with the requirements of the DFA for A – Braithe Warnock Oct 02 '14 at 15:41

1 Answers1

0

The language M has to satisfy 2 conditions,

1) M(A) - has to have a substring 011

2) ¬M(B) - should not start with 0 and end with 1

You can solve this by breaking the language M into 2 parts,

1) that starts with 0 but does not end with 1 and having substring 001

2) and another that starts with 1 and having substring 001

Therefore the DFA for M would be something like this

The DFA

The states from 2-5 takes care of part 1, and states from 6-9 takes care of part 2

Haris
  • 12,120
  • 6
  • 43
  • 70