Brzozowski Derivatives (aka WTF is a regex derivative?!)

  Рет қаралды 4,566

Easy Theory

Easy Theory

Күн бұрын

Пікірлер: 21
@wayfaringstranger579
@wayfaringstranger579 4 жыл бұрын
thank you so much for making this video!! I don't know how I would pass my discrete maths course without you
@EasyTheory
@EasyTheory 4 жыл бұрын
You're welcome :)
@waynee95
@waynee95 4 жыл бұрын
It's a really cool topic. Cool that you covered it. Not sure if you will cover the "Brzozowski construction" which uses the derivative approach to construct a DFA from a RE. Which will also work for REs containing complement and intersection operations. Which does not work with the traditional route using RE -> NFA -> DFA.
@EasyTheory
@EasyTheory 4 жыл бұрын
Guess what's coming on Friday ;)
@waynee95
@waynee95 4 жыл бұрын
@@EasyTheory Nice!
@selinamartinez8067
@selinamartinez8067 2 жыл бұрын
Just like what you said about when a = b in no.3, I thought that there should be a set only with the empty string in it when a = b in no.1 But it was always empty set. and you said epsilon is not a single character. I thought it is.. I thought that a single character and a single string is the same thing... Then.. is the string a thing consist of each characters?? and empty string is a only exceptation that only can be a string without a character??
@selinamartinez8067
@selinamartinez8067 2 жыл бұрын
Always thank you for your videos!!!
@robharwood3538
@robharwood3538 2 жыл бұрын
You can think of a string as a list of characters, including the possibility that the list of characters is empty. In other words, a list has a 'length', i.e. the number of elements in the list (in this case, the 'elements' are characters); and the length of the list can be any non-negative number, *including* 0. For example, if we use double-quotes to denote the beginning and ending of a string, then "this-is-an-example-string" is a string (a list of characters), and its length is 25 (it contains 25 characters). A string that contains a single character might be "c", a list containing only a single element, the character c, and so this string has a length of 1. And the empty string would simply be two double-quotes with nothing in between, namely "", which is a string of length 0. So, you can think of ε as being in some sense equivalent to "". So ε isn't a character itself. It's a string of length 0! If it helps with understanding, then, you can also think of 'characters' as strings of length 1. E.g. the character c could be written as "c", which is a string (list of characters) of length 1, containing only one character, namely the character c. In this way, you can think of the transitions in an NFA as always being strings, but only strings of length 0 (ε), or of length 1 (a single character). The case of the empty set ∅ -- as opposed to the empty string ε -- can be thought of as 'no string at all!', or 'not even the empty string!', i.e. not even a list (of characters) at all. In a programming language, this is often denoted as a variable with a value of 'null'. So, if we think of a variable t (for 'transition'), then there are three possibilities: 1. t = null, there is no string at all. This corresponds to the empty set ∅. 2. t = "", the empty string (the string of length 0). This is ε. 3. t = "c", a string with a single character (a string of length 1), where 'c' can be any single character. This corresponds to the usual transitions in a DFA, where every transition must use up exactly one character.
@abdelbassetomiri530
@abdelbassetomiri530 3 жыл бұрын
thanks a lot for the video prof extremely helpful can you please explain how one generates the regex's DFA using this method, please.
@agnishom
@agnishom 4 жыл бұрын
Thanks for doing this video!
@EasyTheory
@EasyTheory 4 жыл бұрын
You're welcome!
@tricky778
@tricky778 3 жыл бұрын
why do you use the "raised to the power of minus one" notation?
@EasyTheory
@EasyTheory 3 жыл бұрын
Unfortunately it's because that's what most people use when referring to regex derivatives. I hate the notation too, but the "partial derivative" notation with respect to some string is somewhat cumbersome to write over and over.
@tricky778
@tricky778 3 жыл бұрын
@@EasyTheory oh, it's really supposed to be the reciprocal of the prefix? (uv)(u^-1) = v ? strings are defined such that they're a non-abelian group where the product operator is concatenation, not the additive operator ?
@EasyTheory
@EasyTheory 3 жыл бұрын
@@tricky778 You can think of it that way, yes. But when defined for a language, say u^(-1) L, then it's just the name of the language and doesn't actually mean anything else.
@josejaviermoya-angelergarc6968
@josejaviermoya-angelergarc6968 2 жыл бұрын
great video!🙂
@ssjng
@ssjng 4 жыл бұрын
helped me a lot!!
@PatríciaPalmiradeSousa
@PatríciaPalmiradeSousa Жыл бұрын
thank you so much, i´m portuguese, but your explanation was excellent
@vimalathithand917
@vimalathithand917 Жыл бұрын
A cool topic
@samjudelson
@samjudelson 3 жыл бұрын
Thanks!
@victorvalenciasanchez6756
@victorvalenciasanchez6756 3 жыл бұрын
thanks a lot dude
Derivative of a Regex?! Example (Brzozowski Derivative)
13:10
Easy Theory
Рет қаралды 2,5 М.
NFA to Regular Expression Conversion, and Example
14:46
Easy Theory
Рет қаралды 110 М.
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 700 М.
小丑教训坏蛋 #小丑 #天使 #shorts
00:49
好人小丑
Рет қаралды 54 МЛН
Support each other🤝
00:31
ISSEI / いっせい
Рет қаралды 81 МЛН
Context-Free Grammars (CFGs): 15 Examples
44:11
Easy Theory
Рет қаралды 9 М.
What is Jacobian? | The right way of thinking derivatives and integrals
27:14
Regex is HARD!
5:12
ArjanCodes
Рет қаралды 11 М.
Why Some People Say SHTRONG (the CHRUTH)
10:00
Dr Geoff Lindsey
Рет қаралды 1,2 МЛН
Regular Expressions - Computerphile
17:19
Computerphile
Рет қаралды 249 М.
Regular Expressions (Regexes), what are they?
6:13
Easy Theory
Рет қаралды 4,3 М.
AI Is Making You An Illiterate Programmer
27:22
ThePrimeTime
Рет қаралды 264 М.
how Laplace solved the Gaussian integral
15:01
blackpenredpen
Рет қаралды 768 М.
a student tried to bribe me once
3:17
Easy Theory
Рет қаралды 3,5 М.
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 700 М.