Answer: Language of Automata: DFA Q1, Q2

In summary: State Q3 should be deleted altogether, including all transitions toward it.Then we're left with a nice and deterministic state machine. ;)
  • #1
mathmari
Gold Member
MHB
5,049
7
Hi! Could you help me finding the language that is accepted by the DFA with the following state diagram?

___| a ____ b
Q1 | Q2 __ Q1
Q2 | Q2 __ Q3
Q3 | Q3 __ Q3

final states: Q1, Q2
 
Technology news on Phys.org
  • #2
mathmari said:
Hi! Could you help me finding the language that is accepted by the DFA with the following state diagram?

___| a ____ b
Q1 | Q2 __ Q1
Q2 | Q2 __ Q3
Q3 | Q3 __ Q3

final states: Q1, Q2

Hi mathmari!

What is your start state?

If Q3 is not a final state, you can never go to Q3, since you can never go back.
Is that what you intended?

How do you want your language?
As a regular expression?
In BNF syntax? Or EBNF?

If you start in state Q1, the words you can form are $b*a*$, where $*$ denotes zero or more.
Starting from state Q2, you can only form $a*$, which is already included.
 
  • #3
I like Serena said:
Hi mathmari!

What is your start state?

If Q3 is not a final state, you can never go to Q3, since you can never go back.
Is that what you intended?

How do you want your language?
As a regular expression?
In BNF syntax? Or EBNF?

If you start in state Q1, the words you can form are $b*a*$, where $*$ denotes zero or more.
Starting from state Q2, you can only form $a*$, which is already included.

The start state is Q1.
I want the language as a regular expression.
 
  • #4
mathmari said:
The start state is Q1.
I want the language as a regular expression.

Then I guess I've already answered your question...
 
  • #5
I like Serena said:
If you start in state Q1, the words you can form are $b*a*$, where $*$ denotes zero or more.

Starting in state Q1, couldn't the words be also $ a*b*$ ?
 
  • #6
mathmari said:
Starting in state Q1, couldn't the words be also $ a*b*$ ?

After you accept the first $a$, accepting a $b$ would bring you to state Q3.
And from state Q3 you can never get to a final state anymore.

It is a bit weird though that you would have a state that doesn't go anywhere.
Are you sure that is right?
 
  • #7
I like Serena said:
After you accept the first $a$, accepting a $b$ would bring you to state Q3.
And from state Q3 you can never get to a final state anymore.

It is a bit weird though that you would have a state that doesn't go anywhere.
Are you sure that is right?

Now I looked at the exercise again and realized that the state Q2 with $b$ goes to the state Q1 and to the state Q3.
 
  • #8
mathmari said:
Now I looked at the exercise again and realized that the state Q2 with $b$ goes to the state Q1 and to the state Q3.

So your transition table is incomplete?
But still no other transitions starting from state Q3?
 
  • #9
I like Serena said:
So your transition table is incomplete?
But still no other transitions starting from state Q3?

Starting from Q3 with $a$ or $b$ it goes to the state Q3 again...
 
  • #10
How can the state Q2 go with b to the state Q1 and also to the state Q3? :confused:
 
  • #11
mathmari said:
How can the state Q2 go with b to the state Q1 and also to the state Q3? :confused:

Now that you mention it, that's not really deterministic is it?
However, if it would go to state Q3, it can never reach a final state anymore.

In my opinion, your state machine is screwed up.
State Q3 should be deleted altogether, including all transitions toward it.
Then we're left with a nice and deterministic state machine. ;)
 

Q1: What is a DFA?

A DFA, or Deterministic Finite Automaton, is a mathematical model used to represent and analyze the behavior of a finite state machine. It is a type of automaton that recognizes patterns in strings of input symbols.

Q2: What is the language of automata?

The language of automata refers to the set of all possible inputs that a particular automaton can recognize and accept. It is a formal language composed of strings of symbols defined by the automaton's alphabet and its rules for accepting or rejecting inputs.

Q3: How is a DFA different from an NFA?

A DFA is a type of automaton in which each input leads to one and only one state transition, while an NFA (Non-deterministic Finite Automaton) allows for multiple possible state transitions for a given input. This makes DFAs easier to construct and analyze, but NFAs are more powerful in terms of the languages they can recognize.

Q4: What is the significance of Q1 and Q2 in a DFA?

Q1 and Q2 refer to the set of states in a DFA. Q1 represents the initial state, or the starting point for the automaton, while Q2 represents the set of final (or accepting) states, where the automaton will end up if it successfully recognizes an input string.

Q5: How is a DFA constructed?

A DFA is constructed by defining its alphabet, set of states, initial state, and final states. Then, a transition table is created to map out the state transitions for each input symbol. This can also be represented graphically using a directed graph known as a state diagram.

Similar threads

  • Introductory Physics Homework Help
Replies
9
Views
1K
  • Introductory Physics Homework Help
Replies
17
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
2K
  • Programming and Computer Science
Replies
23
Views
1K
  • Introductory Physics Homework Help
Replies
2
Views
1K
Replies
3
Views
244
Replies
2
Views
1K
  • Introductory Physics Homework Help
Replies
8
Views
2K
  • Introductory Physics Homework Help
Replies
17
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
1K
Back
Top