DFA that accepts either ab or ba as substring?

  • #1
shivajikobardan
544
34
Homework Statement:
I need to create a DFA that contains substrings either ab or ba
Relevant Equations:
Deterministic finite automata no equations
Attempt at solution-:

1635769064071.png

Now this dfa will also accept abba which in my inituition it should not accept. But it does accept it. What is going here? Please guide
 

Answers and Replies

  • #2
lewando
Homework Helper
Gold Member
1,367
144
The English language statement "contains either the substrings ab or ba" is the issue. If you read this as an "inclusive or" then your DFA looks okay. If you read it as an "exclusive or" then it is not okay. Since you are a student and you recognize this potential ambiguity, figure out the "exclusive or" case. Submit both variations and your professor will be delighted!

Is the alphabet { a, b } ?
 
Last edited:

Suggested for: DFA that accepts either ab or ba as substring?

  • Last Post
Replies
1
Views
363
Replies
1
Views
277
Replies
5
Views
314
Replies
25
Views
2K
  • Last Post
Replies
1
Views
1K
Replies
2
Views
446
  • Last Post
Replies
5
Views
2K
Replies
1
Views
875
Replies
1
Views
691
  • Last Post
Replies
6
Views
646
Top