Does this DFA satisfy the complement of the given language?

I got this challenge:

Given 𝐿 = { 𝑤 ∊ {0, 1}* : 01 is a substring of 𝑤 }

Show 𝐿 compliment is regular.

My understanding is that a DFA for the compliment of this language would need to reject 01 substrings.

Here is my DFA for L(M) = L compliment:

MY DFA

Does my DFA correctly accept the compliment language?

  • 1

    Might be better suited to cs.stackexchange.com

    – 

  • my bad I had no clue that was a thing, isn’t stack overflow for CS in the first place? new to all this

    – 

  • No probs, it’s considered good form to put a link back here if you ask elsewhere…

    – 

  • not sure if you’d be able to help with this, but I’m attempting to post the question on cs.stackexchange, however each time I click post it scrolls to the top and doesn’t actually post. wasn’t able to google a fix

    – 

  • Not sure what’s going on with the other site, maybe some field isn’t validating? Maybe check up the page for errors and try and fix them… think you solution looks about right, though if you get points for minimizing the graph, I think you could drop a state

    – 

It looks fine, except that it wouldn’t accept an empty input, which to my understanding should be accepted.

With that modification there is no reason any more to distinguish between q0 and q2: they can be merged into an accepted state:

enter image description here

Leave a Comment