Comp Sci DFA that accepts either ab or ba as substring?

  • Thread starter Thread starter shivajikobardan
  • Start date Start date
  • Tags Tags
    Computation Dfa
Click For Summary
The discussion centers on the design of a DFA that accepts strings containing either "ab" or "ba" as substrings. There is confusion regarding whether the requirement is an inclusive or exclusive condition, leading to the DFA incorrectly accepting "abba." Clarification is provided that if interpreted as inclusive, the DFA is correct, but if exclusive, it needs revision. The participant is encouraged to explore both interpretations and submit their findings. The alphabet in question is confirmed to be {a, b}.
shivajikobardan
Messages
637
Reaction score
54
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
 
Physics news on Phys.org
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:
Thread 'Why wasn’t gravity included in the potential energy for this problem?'
I’m looking at the attached vibration problem. The solution in the manual includes the spring potential energy but does NOT include the gravitational potential energy of the hanging mass. Can someone explain why gravitational potential energy is not included when deriving the equation of motion? I tried asking ChatGPT but kept going in circles and couldn't figure out. Thanks!

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 17 ·
Replies
17
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 20 ·
Replies
20
Views
3K
  • · Replies 2 ·
Replies
2
Views
1K
Replies
8
Views
2K
  • · Replies 140 ·
5
Replies
140
Views
11K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K