Brzozowski Derivatives (aka WTF is a regex derivative?!)
Here we introduce the idea of a "derivative" of a regular expression (regex). The idea is to "divide" out the string that you're using out of the strings that are generated by the regex. We give a definition of what a derivative of a language is, and prove that the properties hold when considering a regex. The purpose of these derivatives (called "Brzozowski Derivatives") is that one can determine whether or not a regex can generate a string by repeatedly applying a derivative to each character of the string.
▶ADDITIONAL QUESTIONS◀ 1. What if we permitted additional operations for regexes, such as complement or intersection?
▶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 many courses at several different universities, including several sections of undergraduate and graduate theory-level classes. ... https://www.youtube.com/watch?v=s9EPoy9r-ok
Here we show how to create a CFG for the language (0 U 1)*.
Easy Theory Website: https://www.easytheory.org
Discord: https://discord.gg/SD4U3hs
If you like this content, please consider subscribing to my channel: https://www.youtube.com/channel/UC3VY6RTXegnoSD_q446oBdg?sub_confirmation=1
▶ABOUT ME◀
I am a professor of Computer Science, and am passionate about it. I have taught many courses at several different universities, including several sections of undergraduate and graduate theory-level classes.
The views expressed in this video are not reflective of any of my current or former employers.
...
https://www.youtube.com/watch?v=xFxtsgNouI4
Here we show that the problem of determining whether an arbitrary Turing Machine moves left three times in a row is undecidable, but checking if such a machine moves left *at all* IS decidable! There is a very fine line between decidable and undecidable here. The trick with the decidable part is to run the machine "long enough" before you know that it will never move left; and for the undecidable part, encoding each transition to always interject a Right move and then a Left move, and force 3 lefts in a row at the end. (Update: it IS decidable to check if the Turing Machine moves left TWICE in a row; try to prove why this is.)
Thanks to the following supporters of the channel for helping support this video. If you want to contribute, links are below. Names are listed in alphabetical order by surname.
Platinum: Micah Wood
Silver: Josh Hibschman, Timmy Gy, Patrik Keinonen, Travis Schnider, and Tao Su
Timeline:
0:00 - Intro
1:45 - Moving Left At Least Once is Decidable
5:06 - Moving Left 3 Times in a Row is Undecidable
Easy Theory Website: https://www.easytheory.org
Become a member: https://www.youtube.com/channel/UC3VY6RTXegnoSD_q446oBdg/join
Donation (appears on streams): https://streamlabs.com/easytheory1/tip
Paypal: https://paypal.me/easytheory
Patreon: https://www.patreon.com/easytheory
Discord: https://discord.gg/SD4U3hs
Youtube Live Streaming (Sundays) - subscribe for when these occur.
Merch:
Language Hierarchy Apparel: https://teespring.com/language-hierarchy?pid=2&cid=2122
Pumping Lemma Apparel: https://teespring.com/pumping-lemma-for-regular-lang
If you like this content, please consider subscribing to my channel: https://www.youtube.com/channel/UC3VY6RTXegnoSD_q446oBdg?sub_confirmation=1
▶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 many courses at several different universities, including several sections of undergraduate and graduate theory-level classes.
...
https://www.youtube.com/watch?v=64b_O8ryoNA
Here we look at more of my Java code for creating a Triangle class as well as a collection of these Triangles. Let's say that I'm out of shape on this one.
Easy Theory Website: https://www.easytheory.org
Discord: https://discord.gg/SD4U3hs
If you like this content, please consider subscribing to my channel: https://www.youtube.com/channel/UC3VY6RTXegnoSD_q446oBdg?sub_confirmation=1
▶ABOUT ME◀
I am a professor of Computer Science, and am passionate about it. I have taught many courses at several different universities, including several sections of undergraduate and graduate theory-level classes.
The views expressed in this video are not reflective of any of my current or former employers.
...
https://www.youtube.com/watch?v=qsHC5ly2kRw
Easy Theory Website: https://www.easytheory.org
Become a member: https://www.youtube.com/channel/UC3VY6RTXegnoSD_q446oBdg/join
Donation (appears on streams): https://streamlabs.com/easytheory1/tip
Paypal: https://paypal.me/easytheory
Patreon: https://www.patreon.com/easytheory
Discord: https://discord.gg/SD4U3hs
#easytheory #gate #theory
Youtube Live Streaming (Sundays) - subscribe for when these occur.
Social Media:
Facebook Page: https://www.facebook.com/easytheory/
Facebook group: https://www.facebook.com/groups/easytheory/
Twitter: https://twitter.com/EasyTheory
Merch:
Language Hierarchy Apparel: https://teespring.com/language-hierarchy?pid=2&cid=2122
Pumping Lemma Apparel: https://teespring.com/pumping-lemma-for-regular-lang
If you like this content, please consider subscribing to my channel: https://www.youtube.com/channel/UC3VY6RTXegnoSD_q446oBdg?sub_confirmation=1
Gold Supporters: Micah Wood
Silver Supporters: Timmy Gy
▶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 many courses at several different universities, including several sections of undergraduate and graduate theory-level classes.
...
https://www.youtube.com/watch?v=KkiVE49i-Kw
Here we look at Tom Scott's "sorting algorithms and big-O notation" video and assess its accuracy, as well as give some additional insight. His video is here: https://www.youtube.com/watch?v=RGuJga2Gl_k&ab_channel=TomScott. He goes over algorithms to sort items, and why certain algorithms are "slower" than others in a certain sense. The algorithms he mentions are: bubble sort, insertion sort, quicksort, and bogosort (like, why even?), and gives animations to each. I mention several (more esoteric) others. Big-O is important, but only gives a "mostly true" picture of how algorithms behave compared to each other.
Thanks to the following supporters of the channel for helping support this video. If you want to contribute, links are below. Names are listed in alphabetical order by surname.
Platinum: Micah Wood
Silver: Timmy Gy, Josh Hibschman, Patrik Keinonen, Travis Schnider, and Tao Su
--------------------------------------------------------------------------------------------------------------
If you need help, here are some relevant links:
Big-O: https://www.youtube.com/watch?v=rP5peOkXsbY&ab_channel=EasyTheory
Algorithms Playlist: https://www.youtube.com/watch?v=sT3ImMy0fRE&list=PLylTVsqZiRXNArM--1hbcrlJyZn7EpNJU&index=1&ab_channel=EasyTheory
--------------------------------------------------------------------------------------------------------------
Easy Theory Website: https://www.easytheory.org
Become a member: https://www.youtube.com/channel/UC3VY6RTXegnoSD_q446oBdg/join
Donation (appears on streams): https://streamlabs.com/easytheory1/tip
Paypal: https://paypal.me/easytheory
Patreon: https://www.patreon.com/easytheory
Discord: https://discord.gg/SD4U3hs
Youtube Live Streaming (Sundays) - subscribe for when these occur.
Merch:
Language Hierarchy Apparel: https://teespring.com/language-hierarchy?pid=2&cid=2122
Pumping Lemma Apparel: https://teespring.com/pumping-lemma-for-regular-lang
If you like this content, please consider subscribing to my channel: https://www.youtube.com/channel/UC3VY6RTXegnoSD_q446oBdg?sub_confirmation=1
▶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 many courses at several different universities, including several sections of undergraduate and graduate theory-level classes.
...
https://www.youtube.com/watch?v=YvBw_M6Dboc
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 https://www.youtube.com/watch?v=x2J5kaf6gjg&ab_channel=EasyTheory for more details.
Patreon: https://www.patreon.com/easytheory
If you like this content, please consider subscribing to my channel: https://www.youtube.com/channel/UC3VY6RTXegnoSD_q446oBdg?sub_confirmation=1
▶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.
...
https://www.youtube.com/watch?v=5GG8goBW9gw
Here we do a weekly livestream in creating a textbook for theory of computation.
Donation (appears on streams): https://streamlabs.com/easytheory1/tip
Paypal: https://paypal.me/easytheory
Patreon: https://www.patreon.com/easytheory
Discord: https://discord.gg/SD4U3hs
Youtube Live Streaming (Sundays) - subscribe for when these occur.
Merch:
Language Hierarchy Apparel: https://teespring.com/language-hierarchy?pid=2&cid=2122
Pumping Lemma Apparel: https://teespring.com/pumping-lemma-for-regular-lang
If you like this content, please consider subscribing to my channel: https://www.youtube.com/channel/UC3VY6RTXegnoSD_q446oBdg?sub_confirmation=1
▶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 many courses at several different universities, including several sections of undergraduate and graduate theory-level classes.
...
https://www.youtube.com/watch?v=fNGtYfhuyP8
Here we make a simple context free grammar for palindromes over {0,1}, by breaking up the string into "base cases" and "inductive cases". We make a rule for the base cases, and then consider how to use the variable to "recurse" for the inductive cases.
What is a context-free grammar? It is a set of 4 items: a set of "variables," a set of "terminals," a "start variable," and a set of rules. Each rule must involve a single variable on its "left side", and any combination of variables and terminals on its right side. See https://www.youtube.com/watch?v=h1OSmLSacNA&ab_channel=EasyTheory for more details.
Patreon: https://www.patreon.com/easytheory
If you like this content, please consider subscribing to my channel: https://www.youtube.com/channel/UC3VY6RTXegnoSD_q446oBdg?sub_confirmation=1
▶ADDITIONAL QUESTIONS◀
1. What about strings of the form ww?
2. What about all even length palindromes?
3. What about strings that start with a 0 and end with a 1, and the "middle" part is a palindrome?
▶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.
...
https://www.youtube.com/watch?v=Kwa8XF38WrY
Here we show that a finite number of strings added or removed from any language will not change the main "property" of the language.
Easy Theory Website: https://www.easytheory.org
Become a member: https://www.youtube.com/channel/UC3VY6RTXegnoSD_q446oBdg/join
Donation (appears on streams): https://streamlabs.com/easytheory1/tip
Paypal: https://paypal.me/easytheory
Patreon: https://www.patreon.com/easytheory
Discord: https://discord.gg/SD4U3hs
#easytheory
Youtube Live Streaming (Sundays) - subscribe for when these occur.
Social Media:
Facebook Page: https://www.facebook.com/easytheory/
Facebook group: https://www.facebook.com/groups/easytheory/
Twitter: https://twitter.com/EasyTheory
Merch:
Language Hierarchy Apparel: https://teespring.com/language-hierarchy?pid=2&cid=2122
Pumping Lemma Apparel: https://teespring.com/pumping-lemma-for-regular-lang
If you like this content, please consider subscribing to my channel: https://www.youtube.com/channel/UC3VY6RTXegnoSD_q446oBdg?sub_confirmation=1
▶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 many courses at several different universities, including several sections of undergraduate and graduate theory-level classes.
...
https://www.youtube.com/watch?v=sXoLZCtYHAE