Is the DFA of the language L correct?

  • Context: MHB 
  • Thread starter Thread starter mathmari
  • Start date Start date
  • Tags Tags
    Dfa Language
Click For Summary

Discussion Overview

The discussion revolves around the construction and correctness of a Deterministic Finite Automaton (DFA) for the language $L=\{w \in \{a,b\}^*: \text{ each } "a" \text{ of the word w is appeared only after and before a } "b"\}$. Participants explore the interpretation of the language's requirements and the implications for the DFA design.

Discussion Character

  • Debate/contested
  • Technical explanation
  • Mathematical reasoning

Main Points Raised

  • Some participants question whether the DFA correctly represents the language, particularly regarding the placement of 'a' in relation to 'b'.
  • There is uncertainty about whether 'a' can appear with symbols in between 'b's or must be immediately adjacent.
  • Some participants argue that strings like $bba$ or $abbb$ should not be allowed, as 'a' is not surrounded by 'b's.
  • One participant suggests that the empty word should be acceptable since there are no 'a's to violate the surrounding condition.
  • Concerns are raised about the transitions in the DFA, particularly regarding the handling of 'a' and the necessity of additional accepting states.
  • Participants propose modifications to the DFA, including adding arrows for 'a' and 'b' from certain states back to themselves.

Areas of Agreement / Disagreement

Participants express differing interpretations of the language's requirements and the DFA's structure. There is no consensus on the correct interpretation or the DFA's design, indicating multiple competing views.

Contextual Notes

Limitations include unclear definitions of how 'a' and 'b' can be arranged in strings, as well as unresolved questions about the transitions and states within the DFA.

mathmari
Gold Member
MHB
Messages
4,984
Reaction score
7
Hello! :o

I have to construct the DFA of the language $L=\{w \in \{a,b\}^*: \text{ each } "a" \text{ of the word w is appeared only after and before a } "b"\}$.

I tried the following...Could you tell if it's right?
But is it deterministic? From the second state where do we go with $a$ ?
 

Attachments

  • bab.png
    bab.png
    2.7 KB · Views: 121
Last edited by a moderator:
Technology news on Phys.org
Re: Is the DFA of the language $L$ correct?

mathmari said:
I have to construct the DFA of the language $L=\{w \in \{a,b\}^*: \text{ each } "a" \text{ of the word w is appeared only after and before a } "b"\}$.
Immediately after and before a b, or can there be symbols between them?

mathmari said:
I tried the following...Could you tell if it's right?
This automaton accepts ab where a is not preceeded by a b..

mathmari said:
But is it deterministic? From the second state where do we go with $a$ ?
If consecutives a's are not allowed then there should an arrow to the "sink" state that is not accepting and from which there is no escape.
 
Re: Is the DFA of the language $L$ correct?

Evgeny.Makarov said:
Immediately after and before a b, or can there be symbols between them?

This automaton accepts ab where a is not preceeded by a b..

This is the pronunciation of the exercise.
What I understand is that $aa $ is not allowed but $bb$ or $bba$ or $abbb$ or $babb$ is allowed..
Am I wrong?
 
Re: Is the DFA of the language $L$ correct?

mathmari said:
This is the pronunciation of the exercise.
...
Am I wrong?
In general, we can only help with mathematical questions. I can't help clarify what a certain person meant when he/she devised a particular exercise, especially if there is a chance that there is a language barrier.

To me, the most natural way to interpret the exercise is that each a must be immediately preceded and immediately followed by a b.

mathmari said:
What I understand is that $aa $ is not allowed but $bb$ or $bba$ or $abbb$ or $babb$ is allowed.
The strings $bba$ or $abbb$ should not be allowed because a is not surrounded by b's.
 
Re: Is the DFA of the language $L$ correct?

Evgeny.Makarov said:
In general, we can only help with mathematical questions. I can't help clarify what a certain person meant when he/she devised a particular exercise, especially if there is a chance that there is a language barrier.

To me, the most natural way to interpret the exercise is that each a must be immediately preceded and immediately followed by a b.

The strings $bba$ or $abbb$ should not be allowed because a is not surrounded by b's.

Ok...I tried it again... Is it now correct?
 

Attachments

  • bab.png
    bab.png
    3.2 KB · Views: 110
Re: Is the DFA of the language $L$ correct?

I believe that the empty word should be acceptable because every $a$ (there is none) is surrounded by $b$'s. Also, there is still no arrow to the sink state when $a$ is read in the third state. Finally, why not make $b$ go from the third state back to the second one? Why do you need another accepting state?
 
Evgeny.Makarov said:
I believe that the empty word should be acceptable because every $a$ (there is none) is surrounded by $b$'s. Also, there is still no arrow to the sink state when $a$ is read in the third state. Finally, why not make $b$ go from the third state back to the second one? Why do you need another accepting state?

Do you mean something like that?
 

Attachments

  • bab.png
    bab.png
    3.1 KB · Views: 121
Yes. And the arrows for $a$ and $b$ from the bottom state to itself.
 
Evgeny.Makarov said:
Yes. And the arrows for $a$ and $b$ from the bottom state to itself.

Nice! Thanks a lot for your help! :o
 

Similar threads

Replies
2
Views
2K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 13 ·
Replies
13
Views
4K
Replies
12
Views
3K
  • · Replies 18 ·
Replies
18
Views
3K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 43 ·
2
Replies
43
Views
8K
  • · Replies 24 ·
Replies
24
Views
4K