-1

The following language is the complement of a simpler language. Construct a DFA for the simpler language and then use it to give the state diagram of a DFA for the given language where Σ = {a,b}.

L={ w : w does not contain the substring baba}.

I don't know which is the simpler language, can anybody please explain?

BSMP
  • 4,596
  • 8
  • 33
  • 44
nmorsi
  • 23
  • 3

2 Answers2

0

It's been a while since my Logic & Computability class, but my guess is the complement language Lc would be = { w: w contains the substring 'baba'}.

It's probably pretty easy to make a DFA that accepts substrings of 'baba', you'd probably just have states firstB, firstA, secondB, and secondA and so on.

Making a complement DFA then is trivial, just make the accepting states non-accepting and vice versa.

brupbrap
  • 1
  • 4
  • so is what was meant by "simpler language" is { w: w contains the substring 'baba'}. from which i will turn the ccepting states into non-accepting and vice versa as u mentioned?? – nmorsi May 18 '17 at 22:10
0

The automata accepting any word containing the substring 'baba' is:

enter image description here

(it's the simpler language. A regexp for it is : (a|b)*baba(a|b)* )

And we can build the complement DFA by turning accepting states into non-accepting and vice-versa as you mentionned it:

enter image description here

(it has to completed)

Community
  • 1
  • 1
Gerard Rozsavolgyi
  • 4,834
  • 4
  • 32
  • 39