Regular Expressions Help: Find Language for DFA Drawing

  • Context: MHB 
  • Thread starter Thread starter evinda
  • Start date Start date
  • Tags Tags
    Expressions Regular
Click For Summary
SUMMARY

This discussion focuses on constructing Deterministic Finite Automata (DFA) from specific regular expressions, particularly {1^*\{00,010,\varnothing\}(01)^{*}} and (\{\{1,0\}^{*},(\varnothing,2)^*\})^{*}. Participants clarify that while finite languages can be explicitly defined, infinite languages require a finite description. The conversation emphasizes the importance of understanding notation differences in regular expressions, such as the use of commas for alternation and the implications of curly braces versus parentheses. The final consensus is that DFAs can be drawn based on these expressions, but attention must be paid to transitions and state definitions.

PREREQUISITES
  • Understanding of Deterministic Finite Automata (DFA)
  • Familiarity with regular expressions and their syntax
  • Knowledge of finite automaton transitions and states
  • Basic concepts of language theory in computer science
NEXT STEPS
  • Study the construction of DFAs from regular expressions using tools like JFLAP
  • Learn about the implications of different notations in regular expressions
  • Explore the concept of ε-transitions and their role in non-deterministic finite automata
  • Research the relationship between regular expressions and first-order logic representations
USEFUL FOR

This discussion is beneficial for computer science students, software engineers, and anyone involved in automata theory or formal language processing.

evinda
Gold Member
MHB
Messages
3,741
Reaction score
0
Hello!
I have to draw the DFA of the language of the following expressions:
a){1^*\{00,010,\varnothing\}(01)^{*}}
b)(\{\{1,0\}^{*},(\varnothing,2)^*\})^{*}

Could you help me to find the languages that are meant,so I can draw the DFAs?
 
Technology news on Phys.org
evinda said:
Hello!
I have to draw the DFA of the language of the following expressions:
a){1^*\{00,010,\varnothing\}(01)^{*}}
b)(\{\{1,0\}^{*},(\varnothing,2)^*\})^{*}

Could you help me to find the languages that are meant,so I can draw the DFAs?

Hi evinda! :)

Effort?
What do you already know about DFA's and what they look like?
 
I like Serena said:
Hi evinda! :)

Effort?
What do you already know about DFA's and what they look like?

I know how to draw DFAs when I have a language,but I don't know how to find the language that is represented from the expressions above. :confused:

For example,if I had to draw the DFA,that accepts the language that contains the substring 001,I would do it like that: View attachment 1765
 

Attachments

  • dfa_001.jpg
    dfa_001.jpg
    16.5 KB · Views: 125
How can I find,in general,the language of a regular expression?? :confused:
 
evinda said:
How can I find,in general,the language of a regular expression??
This is just a remark (and a way to subscribe to the thread). There is no such thing as "finding the language" unless the language is finite. If the language is infinite, you cannot communicate or learn it as a set of words. Instead, you have to communicate some finite description of the language. Now, there is no canonical representation of a regular language. It can be described by a finite automaton, a regular expression, or a formula in first-order logic, and none of these is a priori better than the rest. For example, as you get familiar with regular expressions, they may become your preferred representation of regular languages.
 
Evgeny.Makarov said:
This is just a remark (and a way to subscribe to the thread). There is no such thing as "finding the language" unless the language is finite. If the language is infinite, you cannot communicate or learn it as a set of words. Instead, you have to communicate some finite description of the language. Now, there is no canonical representation of a regular language. It can be described by a finite automaton, a regular expression, or a formula in first-order logic, and none of these is a priori better than the rest. For example, as you get familiar with regular expressions, they may become your preferred representation of regular languages.

I understood...I tried to draw the finite automaton of the regular expression {1^*\{00,010,\varnothing\}(01)^{*}} and that's what I did.Is this right? :)
View attachment 1767
 

Attachments

  • aut.jpg
    aut.jpg
    31.7 KB · Views: 117
Last edited:
Or am I wrong?If we have this: \{00,010,\varnothing\},do the automaton has to read all of these: 00,010,\varnothing\ or just one of them?
 
evinda said:
I tried to draw the finite automaton of the regular expression {1^*\{00,010,\varnothing\}(01)^{*}} and that's what I did.Is this right?
Notations for regular expressions differ. Does comma denote alternation? Is there a difference between curly braces and parentheses? Why is the complete expression surrounded by curly braces?
 
Evgeny.Makarov said:
Notations for regular expressions differ. Does comma denote alternation? Is there a difference between curly braces and parentheses? Why is the complete expression surrounded by curly braces?

Oh sorry, the complete expression is not surrounded by curly braces. It is: 1^*\{00,010,\varnothing\}(01)^{*}.

With the parentheses I think that it is meant that $0$ is followed by $1$ and this sequence appears $n$ times with $n \geq 0$.

And in the curly braces the comma may denote the alternation.
 
  • #10
evinda said:
Oh sorry, the complete expression is not surrounded by curly braces. It is: 1^*\{00,010,\varnothing\}(01)^{*}.

With the parentheses I think that it is meant that $0$ is followed by $1$ and this sequence appears $n$ times with $n \geq 0$.

And in the curly braces the comma may denote the alternation.

Looks like your off in the right direction! :D

Except... that with the commas between {} that mean alternation, your graph should be slightly different...
 
  • #11

Attachments

  • f_a.jpg
    f_a.jpg
    32.3 KB · Views: 120
  • #12
Looking good! ;)

One problem left. There is no such thing as an $\varepsilon$ transition.
It would be "no-input", which would not be deterministic.

Can you think of another (deterministic) transition that accepts either a '0' or a '1' that will show the same behavior?
And/or perhaps no transition at all, but marking the state as a final state?
 
  • #13
Here is my version.

automaton4.png


Missing arrows lead to sink.

Edit: Made the initial state to be also accepting in order to accept 1*. Still no warranty. :)
 
Last edited:
  • #14
Thank you very much! :rolleyes:
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 10 ·
Replies
10
Views
7K
Replies
6
Views
3K
Replies
12
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 18 ·
Replies
18
Views
3K