简体   繁体   English

普通语言,L1和L2

[英]Regular language, L1 and L2

Let there be two languages L1 and L2 with the property that L1 ⊆ L2 and L2 ∈ REG then L1 ∈ REG . 假设有两种语言L1L2 ,其属性为L1 ⊆ L2L2 ∈ REG然后L1 ∈ REG I have searched everywhere and I can't find anything, how do you solve this ? 我到处搜寻,却找不到任何东西,您如何解决呢? Can you please provide ample explanation, thank you, 能否请您提供充分的解释,谢谢,

I'm taking this as the question: 我以这个为问题:

If L1 is a subset of L2, and L2 is regular, does it follow that L1 is regular also? 如果L1是L2的子集,并且L2是规则的,是否遵循L1也是规则的?

The answer is no. 答案是不。 The proof is by counterexample. 证明是反例。 Let L2 be the following regular language: all strings over the alphabet. 令L2为以下常规语言:字母上的所有字符串。 Let L1 be the following subset of L2: any non-regular language of the alphabet. 令L1为L2的以下子集:字母的任何非常规语言。 Then L1 is a subset of L2, L2 is regular, and L1 is non-regular. 那么L1是L2的子集,L2是规则的,而L1是不规则的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM