I'm reading the following paragraph in the Foundations of Machine learning book https://cs.nyu.edu/~mohri/mlbook/ on page 362 (of the book).
Now i'm fairly new to the concept of DFA but i have some experience. I have some questions over the paragraph.
Why do they want a deterministic automata that accepts the positively labeled string "a" or "b"? Surely you would want to reject $"b"$ since it is negatively labelled?
Is "a" meant to be a string of characters ie a = 01010101 or is it a single letter itself?
What is the minimal two state automata that accepts "a" or "b" could someone describe it? Also i'm unsure how it differs from the single state machine they describe next for the language a*? Could someone explicitly describe both? I don't see what the difference between the two cases is and maybe thats why i don't understand why one has two states and the other a single state.
I would really appreciate any help as i'm really trying to understand the concepts they talk about.
The smallest DFA which accepts 'a' and rejects 'b' actually has two states, if you use the standard conventions that dead states must be represented and all transitions must be shown:
+--a--+
| |
----->q0<----+
|
b
|
V
q1<----+
| |
+-a,b-+
In the above DFA, q0 is accepting. No smaller DFA accepts 'a' and rejects 'b'. You know this since the DFA must have an accepting state to accept anything, and a non-accepting state to reject anything, and since a state can't be both simultaneously, we need two. Now, the distinction the quoted passage is getting at is that the DFA that accepts the language {'a'} is larger (because it excludes everything except 'a', not just 'b'):
----->q0--a-->q1
| |
b a,b
| |
| V
+------>q2<---+
| |
+-a,b-+
Here, q1 is accepting. Notice that we needed an extra state to avoid accepting longer strings of 'a's.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.