0^n 1^n is Not Regular, a Direct Proof

แชร์
ฝัง
  • เผยแพร่เมื่อ 16 ก.ค. 2024
  • Here we show that the language {0^n 1^n : n at least 0} is not regular using a direct proof. We assumed that a DFA exists, and then derive a contradiction purely based on the fact that the DFA must repeat a "long enough" string. If we choose the string carefully, we can derive a string that the DFA accepts but is not in the language. Therefore, the language is not regular.
    One could use the pumping lemma for regular languages, but this direct proof I think is more easily understood compared to a mechanical proof structure like that technique.
    What is the pumping lemma for regular languages? It is a way to help prove that certain languages are not regular (i.e., those languages accepted by a DFA). If a language is regular, then it has certain properties; on the other hand, if it does not have those properties, then it cannot be regular. See • Pumping Lemma for Regu... for more details.
    Patreon: / easytheory
    If you like this content, please consider subscribing to my channel: / @easytheory
    ▶ADDITIONAL QUESTIONS◀
    1. Prove that the language of all strings with the same number of 0s and 1s is not regular (note: this isn't 0^n 1^n!).
    2. (Hard) Prove that the language of all strings with the same number of 01s and 10s with alphabet {0, 1, 2} is not regular (note: if the alphabet is {0, 1}, it is regular!).
    ▶SEND ME THEORY QUESTIONS◀
    ryan.e.dougherty@icloud.com
    ▶ABOUT ME◀
    I am a professor of Computer Science, and am passionate about CS theory. I have taught over 12 courses at Arizona State University, as well as Colgate University, including several sections of undergraduate theory.

ความคิดเห็น • 7