How can I continue to find a regular expression?

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

The discussion centers on determining whether the language defined by the set $\{0^{m}1^{n}:m+n \geq 2\}$ is regular. Participants concluded that the regular expression can be expressed as $\{0^{*} \cdot 00 \cdot 1^{*}|0^{*} \cdot 01 \cdot 1^{*}|0^{*} \cdot 11 \cdot 1^{*}\}$. This expression correctly captures all words in the language, as it allows for an arbitrary number of leading zeroes and trailing ones, ensuring that all combinations of 0s and 1s that meet the criteria are included.

PREREQUISITES
  • Understanding of formal languages and automata theory
  • Familiarity with regular expressions and their syntax
  • Knowledge of the concept of concatenation in string manipulation
  • Basic understanding of the symbols used in mathematical notation for languages
NEXT STEPS
  • Study the properties of regular languages and their closure under operations
  • Learn about the construction of finite automata from regular expressions
  • Explore the pumping lemma for regular languages to understand language properties
  • Investigate other forms of language representation, such as context-free grammars
USEFUL FOR

This discussion is beneficial for computer science students, linguists, and software developers interested in formal language theory, particularly those working with regular expressions and automata.

evinda
Gold Member
MHB
Messages
3,741
Reaction score
0
Hello! :)
I have a question:
Suppose that $\Sigma=\{0,1\}$.Is the language $\{0^{m}1^{n}:m+n \geq 2\}$ regular?
I tried to find a regular expression.I checked the case $m+n=2$ and I found that the possible words are $00,01,11$ .But..how can I continue? :confused:
 
Technology news on Phys.org
Re: How can I continue?

evinda said:
Hello! :)
I have a question:
Suppose that $\Sigma=\{0,1\}$.Is the language $\{0^{m}1^{n}:m+n \geq 2\}$ regular?
I tried to find a regular expression.I checked the case $m+n=2$ and I found that the possible words are $00,01,11$ .But..how can I continue? :confused:

Perhaps you can concatenate an arbitrary number of zeroes to the left side of each of those possible words?
And also concatenate an arbitrary number of ones on the right side?
 
Re: How can I continue?

I like Serena said:
Perhaps you can concatenate an arbitrary number of zeroes to the left side of each of those possible words?
And also concatenate an arbitrary number of ones on the right side?

So,you mean that the regular expression is
$$ \{0^{*} \cdot 00 \cdot 1^{*}|0^{*} \cdot 01 \cdot 1^{*}|0^{*} \cdot 11 \cdot 1^{*}\}$$
?
 
Re: How can I continue?

evinda said:
So,you mean that the regular expression is
$$ \{0^{*} \cdot 00 \cdot 1^{*}|0^{*} \cdot 01 \cdot 1^{*}|0^{*} \cdot 11 \cdot 1^{*}\}$$
?

We'll have to verify! (Wondering)
All words in the regular expression should be contained in the language, and conversely all words in the language should match with the regular expression.

Are all words formed by the regular expression part of the language?

For the other direction, suppose we pick m=0, that is, no zeroes, are all words with only $1$'s matched by the regular expression?
How about m=1, m=2, and m>2?
 
Re: How can I continue?

I like Serena said:
We'll have to verify! (Wondering)
All words in the regular expression should be contained in the language, and conversely all words in the language should match with the regular expression.

Are all words formed by the regular expression part of the language?
Since,each word has at least 2 symbols and the sequence of $0$ precedes the sequence of $1$,all words formed by the regular expression are part of the language.Or am I wrong? :confused:

I like Serena said:
For the other direction, suppose we pick m=0, that is, no zeroes, are all words with only $1$'s matched by the regular expression?
How about m=1, m=2, and m>2?

When $m=0$,we get a sequence only of $1$'s,from $0^{*} \cdot 11 \cdot 1^{*}$,for $m=1$ we get a word from $0^{*} \cdot 01 \cdot 1^{*}$ or from $0^{*} \cdot 11 \cdot 1^{*}$, for $m \geq 2$ we get a word from $0^{*} \cdot 00 \cdot 1^{*} $ or from $0^{*} \cdot 01 \cdot 1^{*}$ or from $0^{*} \cdot 11 \cdot 1^{*}$ .

So,the expression is correct?? :confused:
 
Re: How can I continue?

evinda said:
Since,each word has at least 2 symbols and the sequence of $0$ precedes the sequence of $1$,all words formed by the regular expression are part of the language.Or am I wrong? :confused:
When $m=0$,we get a sequence only of $1$'s,from $0^{*} \cdot 11 \cdot 1^{*}$,for $m=1$ we get a word from $0^{*} \cdot 01 \cdot 1^{*}$ or from $0^{*} \cdot 11 \cdot 1^{*}$, for $m \geq 2$ we get a word from $0^{*} \cdot 00 \cdot 1^{*} $ or from $0^{*} \cdot 01 \cdot 1^{*}$ or from $0^{*} \cdot 11 \cdot 1^{*}$ .

So,the expression is correct?? :confused:

Without the :confused: sentences it is all correct. :p
 
Re: How can I continue?

I like Serena said:
Without the :confused: sentences it is all correct. :p

Great! ;)

So,could I write it like that?
The possible words with length 2 are $00,01,11$.
To have words with length greater than 2,we concatenate an arbitrary number of zeroes to the left side of each of those possible words and an arbitrary number of ones on the right side.So,the expression is $\{0^{*} \cdot 00 \cdot 1^{*}|0^{*} \cdot 01 \cdot 1^{*}| 0^{*}\cdot 11 \cdot 1^{*} \}$ and then I will show that it is valid?
 
Re: How can I continue?

evinda said:
Great! ;)

So,could I write it like that?
The possible words with length 2 are $00,01,11$.
To have words with length greater than 2,we concatenate an arbitrary number of zeroes to the left side of each of those possible words and an arbitrary number of ones on the right side.So,the expression is $\{0^{*} \cdot 00 \cdot 1^{*}|0^{*} \cdot 01 \cdot 1^{*}| 0^{*}\cdot 11 \cdot 1^{*} \}$ and then I will show that it is valid?

Yep! (Whew)
 
Re: How can I continue?

I like Serena said:
Yep! (Whew)

Nice!Thank you very much for your help! :)
 

Similar threads

  • · Replies 15 ·
Replies
15
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
1
Views
2K
  • · Replies 13 ·
Replies
13
Views
4K
  • · Replies 10 ·
Replies
10
Views
7K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
1
Views
2K
Replies
9
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 11 ·
Replies
11
Views
4K