Union of languages-verification

  • Context: MHB 
  • Thread starter Thread starter evinda
  • Start date Start date
  • Tags Tags
    Union
Click For Summary

Discussion Overview

The discussion centers on the properties of specific formal languages, particularly the context-freeness of the language $L_{1}=\{w \in \{a,b\}^{*}:w \neq a^{r}b^r, r \geq 0\}$ and its relationship to other languages. Participants explore various formulations and representations of these languages, debating their correctness and implications.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • Some participants propose using the language $L_{2}=\{w \in \{a,b\}^{*}:w=a^{r}b^{k},r \neq k\}$ to demonstrate that $L_{1}$ is context-free.
  • Concerns are raised about the validity of the expression $L_{1}=(\{b\}^{*} \cdot L_{2}) U (L_{2} \cdot \{a\}^{*})$, with examples provided to illustrate that certain strings belong to $L_{1}$ but not to the proposed union.
  • Participants suggest alternative formulations, such as $\{a^{m}b^{n}: m \neq n\} U \{ \{a\}^{*} \cdot \{b\}^{+} \cdot \{a\}^{+} \cdot \{b\}^{*}\}$, but these are also challenged based on similar reasoning regarding membership in $L_{1}$.
  • One participant proposes a new formulation $\{a^{m}b^{n}: m \neq n\}U\{(a|b)^{*}b(a|b)^{*}a(a|b)^{*}\}$, which receives positive feedback from others.
  • There is a discussion about whether the language $\{(a|b)^{*}b(a|b)^{*}a(a|b)^{*}\}$ is regular, with references to regular expressions and theorems regarding regular languages.

Areas of Agreement / Disagreement

Participants express differing views on the correctness of various formulations related to $L_{1}$ and $L_{2}$. While some formulations receive support, others are contested, indicating that no consensus has been reached on the best representation of these languages.

Contextual Notes

Participants rely on specific definitions and properties of formal languages, but there are unresolved questions about the implications of their proposed formulations and whether certain strings belong to the languages in question.

Who May Find This Useful

Readers interested in formal language theory, context-free languages, and the properties of regular expressions may find this discussion relevant.

evinda
Gold Member
MHB
Messages
3,741
Reaction score
0
Hello again! ;)
I have also an other question.In order to show that the language $L_{1}=\{w \in \{a,b\}^{*}:w \neq a^{r}b^r, r \geq 0\}$ is context-free, could I use the language $L_{2}=\{w \in \{a,b\}^{*}:w=a^{r}b^{k},r \neq k\} $ ?Isn't it like that:$L_{1}=(\{b\}^{*} \cdot L_{2}) U (L_{2} \cdot \{a\}^{*}) $ ?
 
Technology news on Phys.org
evinda said:
In order to show that the language $L_{1}=\{w \in \{a,b\}^{*}:w \neq a^{r}b^r, r \geq 0\}$ is context-free, could I use the language $L_{2}=\{w \in \{a,b\}^{*}:w=a^{r}b^{k},r \neq k\} $ ?Isn't it like that:$L_{1}=(\{b\}^{*} \cdot L_{2}) U (L_{2} \cdot \{a\}^{*}) $ ?
No, $(ab)^2\in L_1$, but $(ab)^2\notin\{b\}^*\cdot L_2\cup L_2\cdot\{a\}^*$.
 
Evgeny.Makarov said:
No, $(ab)^2\in L_1$, but $(ab)^2\notin\{b\}^*\cdot L_2\cup L_2\cdot\{a\}^*$.

I have tried it again,but I am not really sure if it is right :confused: That's what I did:
$$\{a^{m}b^{n}: m \neq n\} U \{ \{a\}^{*} \cdot \{b\}^{+} \cdot \{a\}^{+} \cdot \{b\}^{*}\}$$

How do you find my idea? :confused:
 
evinda said:
That's what I did:
$$\{a^{m}b^{n}: m \neq n\} U \{ \{a\}^{*} \cdot \{b\}^{+} \cdot \{a\}^{+} \cdot \{b\}^{*}\}$$
It would be nice to remind that this is supposed to be equal to $L_1$ from post #1.

No, this does not work either because $(ab)^3\in L_1$, but it does not belong to the set above.
 
Evgeny.Makarov said:
It would be nice to remind that this is supposed to be equal to $L_1$ from post #1.

No, this does not work either because $(ab)^3\in L_1$, but it does not belong to the set above.

So,rethinking about it,shouldn't it be like that:
$$\{a^{m}b^{n}: m \neq n\}U\{(a|b)^{*}b(a|b)^{*}a(a|b)^{*}\} $$ ?Or am I wrong again? :o
 
evinda said:
So,rethinking about it,shouldn't it be like that:
$$\{a^{m}b^{n}: m \neq n\}U\{(a|b)^{*}b(a|b)^{*}a(a|b)^{*}\} $$ ?Or am I wrong again? :o

That looks right! Good! :D
 
I like Serena said:
That looks right! Good! :D

Thank you!
 
I like Serena said:
That looks right! Good! :D

And do I have to show that the language $\{(a|b)^{*}b(a|b)^{*}a(a|b)^{*}\} $ is regular?If yes,how can I do this? :confused:
 
evinda said:
And do I have to show that the language $\{(a|b)^{*}b(a|b)^{*}a(a|b)^{*}\} $ is regular?If yes,how can I do this?
$(a|b)^{*}b(a|b)^{*}a(a|b)^{*}$ is a regular expression, isn't it?
 
  • #10
Evgeny.Makarov said:
$(a|b)^{*}b(a|b)^{*}a(a|b)^{*}$ is a regular expression, isn't it?

So,the language is regular,because it is defined by a regular expression?
 
  • #11
evinda said:
So,the language is regular,because it is defined by a regular expression?
I think you would benefit by finding the answer to this question yourself.
 
  • #12
Evgeny.Makarov said:
I think you would benefit by finding the answer to this question yourself.

Yes,we can say it,according to the Theorem:"A language is regular if and only if some regular expression describes it".Right?
 
  • #13
evinda said:
Yes,we can say it,according to the Theorem:"A language is regular if and only if some regular expression describes it".Right?
Yes.
 
  • #14
Evgeny.Makarov said:
Yes.

Nice,thank you very much! :)
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 29 ·
Replies
29
Views
5K
  • · Replies 9 ·
Replies
9
Views
8K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 53 ·
2
Replies
53
Views
9K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 33 ·
2
Replies
33
Views
9K