question archive Construct a DFA for the language {w E E* | w contains the word cocoa as a substring}
Subject:MathPrice: Bought3
Construct a DFA for the language {w E E* | w contains the word cocoa as a substring}. For example, mmcocoamm E L and cocoa E L, but c & L, chocolate & L (though cocoa is a subsequence of chocolate. it's not a substring), and e & L Fun fact: DFAs and their variants are often used in string-processing algorithms and data structures. Take CS166 for more details! Test your automaton thoroughly. This one has some tricky edge cases.