Union of languages-verification

  • MHB
  • Thread starter evinda
  • Start date
  • Tags
    Union
In summary, the conversation discusses the use of language $L_{2}=\{w \in \{a,b\}^{*}:w=a^{r}b^{k},r \neq k\}$ to show that the language $L_{1}=\{w \in \{a,b\}^{*}:w \neq a^{r}b^r, r \geq 0\}$ is context-free. After some attempts, it is determined that the correct way to express $L_{1}$ is $\{a^{m}b^{n}: m \neq n\}U\{(a|b)^{*}b(a|b)^{*}a(a|b)^
  • #1
evinda
Gold Member
MHB
3,836
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
  • #2
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\}^*$.
 
  • #3
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:
 
  • #4
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.
 
  • #5
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? :eek:
 
  • #6
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? :eek:

That looks right! Good! :D
 
  • #7
I like Serena said:
That looks right! Good! :D

Thank you!
 
  • #8
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:
 
  • #9
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! :)
 

FAQ: Union of languages-verification

What is the Union of Languages-verification?

The Union of Languages-verification is a concept in computer science and linguistics that refers to the process of combining multiple programming languages or natural languages into a single system for verification and analysis.

How is the Union of Languages-verification used in scientific research?

The Union of Languages-verification is commonly used in scientific research to analyze and verify the correctness of complex systems that involve multiple languages. This allows researchers to identify and correct potential errors or inconsistencies within the system.

What are the benefits of using the Union of Languages-verification?

The Union of Languages-verification allows for a more comprehensive and efficient analysis of complex systems that involve multiple languages. It also helps to identify potential errors or discrepancies that may be missed by using a single language for verification.

Are there any challenges in implementing the Union of Languages-verification?

Yes, there can be challenges in implementing the Union of Languages-verification, such as the need for specialized tools and techniques to handle multiple languages, as well as potential compatibility issues between different languages. Additionally, a thorough understanding of each language is necessary to ensure accurate analysis and verification.

How does the Union of Languages-verification contribute to the field of linguistics?

The Union of Languages-verification allows for a deeper understanding and analysis of the structure and syntax of different languages, as well as their interactions within a complex system. This can help linguists to identify patterns and relationships between languages and improve our understanding of language as a whole.

Similar threads

Replies
6
Views
2K
Replies
9
Views
7K
Replies
4
Views
2K
Replies
53
Views
9K
Replies
1
Views
630
Replies
33
Views
8K
Back
Top