So, there are some topics like Bode diagram for example, that is there in the syllabus, but we are we do not have any lectures on that. And so, I thought we will just go through this and there are also some other things like RC circuits, RLT circuits which are not explicitly in these lectures, but it may be useful to at least go through some of those as well if there is time. So, let us start with Bode plots and the sequential circuits we will just postpone to tomorrow. So, if you are talking about Bode plot, first of all what is decibel? That is the first thing that the students need to know about. The unit decibel is deci means one ten and it is used to represent, deci means ten. It is used to represent quantities on a logarithmic scale. And while logarithmic scale, there is a good reason for that. Because of the log scale, dB is convenient for representing numbers that vary in a wide range. So, that is why we use this unit, bell or decibel. And how wide is this range that we will see soon. And the other reason, very important reason is that this log scaling roughly corresponds to human perception of sound and light. So, we actually are able to see or hear other things which vary very widely in intensity. And that is why this log scaling actually helps to quantify the sound. What is another advantage of a log scale? That it has lost multiplication and division to be replaced by plus and minus. It is much simpler that way. If you want to multiply 4.2 and 3.7, instead of multiplying, if you have the log of those available, you can just add those and then take the anti-log. So, sometimes it is much easier to understand. So, little history, it is always good to do some little historical details to students because they know, that way they know what happened then. So, the unit bell was actually developed in the 1920s by bell laboratories, engineers. And why did they do this? Because they wanted to quantify the attenuation of an audio signal over one mile of cable. In those days, we did not have mobile phones and wireless and so on. And all signals used to be sent on cables. And so, they wanted to know exactly how much a signal attenuates in one mile of cable. And that is why this unit was invented by Santis Stubbell in the 1920s. So, this is also a very important detail to know. Interesting facts, this is just on the side. So, Alexander Graham Bell, who invented the telephone in 1876, all of you know that, could never talk to his wife on the phone because she was there. That is one interesting fact. Imagine that today, if wife and husband cannot talk to each other on the mobile, the mobile companies will just close down. Bell considered the telephone an intrusion and refused to put one in his office. That is another interesting fact. So, Bell invented this telephone, but he thought it was a nuisance and he never wanted to put one in his office. Anyway, these are just on the side. This is not really technical. Interesting to know for students. So, what happened is this unit called bell, B-E-L. It turned out to be too large in practice. And that is why we have this unit called one tenth of a bell or decibel. So, a dB is a unit that describes the quantity on log scale with respect to a reference quantity. Now, this is very important and we see a lot of confusion about this amongst students sometimes. So, whenever we talk about dB, it always has a reference. That is extremely important. So, x, suppose we are talking about some quantity x. In dB, it will be 10 times log of that x divided by some reference x. So, that reference is extremely important. Without that, there is no meaning to this quantity. And why are we multiplying by this 10? That is because this decibel is one tenth of a bell. So, the bell is log of x times x. So, if you have so many bells, you will have 10 times so many decibels and that is why we need to multiply by 10. So, all of these things I am saying because students, if they are just given the formula 20 log V 2 by V etcetera, they do not often appreciate what is why how it came about and they do not really apply it properly. For example, if you have two powers, one is 20 watts and one is 1 watt and you want to know and if your reference is 1 watt that is this p-ref here, then this power P 1 in dB will be given by 10 times log of 20 watts divided by 1 watt and that turns out to be 13 dB as an example. Now, this is a very important point and it must be made very clear to the students. For voltages or currents, the ratio of squares is taken and in fact, there was also a question on this on Moodle. Why 0.707 about it had to do with the filter response, why 0.707 for the half weight and so on. So, it is all of these things are connected and this is because if you have a voltage applied across a resistor, then the power in that resistor is V squared by R or the power in that resistor absorbed by the resistor is I squared times R. Now, if your R is fixed and if you go on apply different voltages, then the powers will go as basically V squared or I squared and that is. So, let us see what it implies. For example, if V 1 is 1.2 volts and V ref is 1 millivolt, then the power that corresponds to 1 millivolt is 1 millivolt squared and power that corresponds to V 1 is 1.2 volts squared. So, now when you actually take the ratio of powers, you need to take 1.2 by 1 millivolt volt squared and that is how that 10 log of that becomes 20 log of the ratio of the voltages. Now, this dBm is an important unit and that means dB with respect to 1 millivolt as a reference and that is what is shown over here. So, very often students do not really make this distinction, they always write dB and they do not really know what that is. Now, very often the students will see the voltage gain of an amplifier described in dB and then I might just wonder why what is the reference over here. So, the reference here actually is the input voltage. So, it is the ratio of the output voltage to the input voltage and that we are multiplied by 20 and why 20 because for the same reason as this one described here. So, the V i the input voltage here actually serves as the reference voltage, very important to point it out. So, here is a simple example, maybe the font is not appropriate, but I would say that you just go through this later. It says that the input voltage is given as 2.5 millivolt and the output and the gain is given in dB and you are asked to find Bo the output voltage in dBm as well as in millivolt. So, you can go through this example later and see how it is done. So, there are two methods of doing it, one you convert the gain into a dimensionless number, second you use the gain as it is in dBm and convert your input to a dB value. Both of these are fine and they will of course be the same. Now, although this audio normally is not covered in a basic electronic score, it is good to know what audio, how audio things are, how audio intensity is actually characterised. So, and then that dB is sort of it essentially is the same, but it has different connotations because then it has to do with sound intensity and not electrical power. So, let us just take a quick look at this. So, when sound intensity is specified in dB, the reference pressure is P ref, that is the reference pressure that is 20 micro Pascal's. And that is why is that taken as the reference pressure because that is roughly over the hearing threshold. We cannot hear things which are waves, sound waves which have less pressure than that. Now, if the pressure corresponding to the sound being measured is P, we say that it is 20 times log of P by P ref dB. So, remember this is like voltage, the square of this is actually the power and that is why we have a 20 here as well. Now, although this is not in the electrical engineering domain, this is very interesting to know and it gives students a feel for this decibel unit as used in audio. So, some interesting numbers, if we have a sound proof number, so what is 0 dB exactly? So, that corresponds to this scenario, let us say you have a sound proof of room and you have a mosquito in that same room about 3 meters away from you. And you can just barely hear that and that is why it is that corresponds to 0 dB or that corresponds to a sound wave which is 20 micro Pascal's, which has a pressure of 20 micro Pascal's. So, that is a mosquito, a whisper is 20 dB, normal conversation is 60 to 70 dB, noisy factory is 90 to 100 dB and of course, there are strict laws which are not always followed about all of these things. Loud thunder is 110 dB, loudest sound that human ear can tolerate is 120 dB and if you have sound or above this level, your ear drum might actually get damaged and that is what happens if there is an explosion and so on. Okay, windows break, if you have glass windows and if there is an explosion, the sound waves can be so strong that of course you have to exceed this limit and that is the time when windows break. So, if you see old pictures of Hiroshima, Nagasaki, you will see many buildings without the windows, that is what happened at that time. Okay, all of that is on the side. Now, Bode plots, what is the Bode plot? So, there is an input, there is an output and if you cannot see the soldier, read it out for you. So, there is a V i of S where S is j omega, there is a V o of S which is V of j omega and there is an H which is a transfer function of S and what we are interested in is the transfer function H of S which is V o of S divided by V i of S and so this is, Bode plots are basically used to describe these transfer functions. For example, H of S is k over 1 plus H times tau. So, this is an example of a transfer function. We have of course more complicated transfer function. Now, remember that H of j omega is a complex number and therefore, a Bode plot will require both the magnitude and the phase of H of j omega and we, a Bode plot will require this information, the magnitude information versus omega and the phase information versus omega, both of these, only then the description is complete. So, Bode gave simple rules which allow construction of the above Bode plots in an approximate or asymptotic manner and that is why these plots are called Bode plots. So, here is a simple transfer function. Now, instead of just describing Bode plots theoretically, it is good to always take real example like an R C circuit and show all, where all this comes from. So, for this one you can actually derive V o over V i expression that turns out to be 1 over 1 plus H R C or 1 over 1 plus j omega by omega naught, where omega naught is 1 over R C. So, this circuit behaves like a low pass filter, we all know that. So, if omega is very small H tends to 1 and if omega is very large as much larger than omega 0, then what happens is that this 1 becomes small and this magnitude goes simply as 1 over omega. So, the magnitude and phase of H of j omega exactly are given by these expressions here and at the Bode plot would be approximate representation of these two quantities. So, we are generally interested in the large variation in omega, several orders and it is effect on mod of H as well as angle of H and this is very important. We are interested in the variation of H over a very large frequency range and that could be several orders that is we are interested from 10 hertz to 1 mega hertz for example, that is several orders in frequency and that is why as we will see that is why we use log scale. But, if you just show the students from Bode plot and just show the log axis and without explaining why log is required and so on, then the students can actually not get much out of that. The magnitude H varies by orders of magnitude as well and that is also very clear. For example, here it goes as 1 over square root of 1 plus omega by omega not squared. So, imagine omega equal to 1 hertz and omega equal to 10 is to 6, the magnitude definitely is going to vary by orders of magnitude. On the other end, the phase varies in a limited scale. So, in this example, the phase can go from tan inverse of 0 to minus tan inverse of infinity which is pi by 2. So, it can only go from 0 to minus pi by 2. So, the phase actually varies in a limited range whereas the magnitude can vary in a wide range. So, here as I was saying it is important to actually describe why we need to use log scale. So, it is the same example as before for which we have already the transfer function and here is the magnitude of that transfer function. Now, if I use the linear scale from we are interested in the variation from let us say up to 10 raise to 6 hertz. So, this is 10 raise to 6 and if you do not if you cannot see that it has do not worry you can just look up the slides later and this is also on linear scale. So, this is 0 and this is 1 and the plot is the magnitude of h versus frequency. Now, if I just take both of these on a linear scale, the entire plot gets confined to this small region here and it is basically it looks like 0 all over here and we really cannot resolve the plot very well. Suppose I ask what is the value at 10 raise to 2 for example, 10 raise to 2 would be here, what is the value of 10 raise to 3 that would also be very close to this point and so on. So, therefore, the resolution is not correct. So, what we can do is to make the magnitude of axis logarithmic. So, now we have a better resolution. So, now I can say this is 10 raise to minus 3, this is 10 raise to minus 2 and so on which I could not do in this plot, but even that is not enough because all the small frequencies all small frequencies like 10 raise to 2, 10 raise to 3, 10 raise to 4 even they will all be concentrated on this axis. So, therefore, it is very important to also use the x axis as a logarithm only then you get a reasonable resolution. So, now with this and this is actually what a body plot will look like except that this is a exact and that will be a plot. So, here what we have is the frequencies on the dialogue scale. So, this corresponds to 10 raise to 0, this corresponds to 10 raise to 1, 10 raise to 2 and so on. We also have the mod of h on the log scale, this is 10 raise to 0, this 10 raise to minus 1, 10 raise to minus 2 and so on. Now, if somebody ask you what is the magnitude of 10 raise to 1, I can see what it is, what is the magnitude of 10 raise to 3, I can read it out, what is the magnitude of 10 raise to 4, I can read that out and so on or any number in between and that is why it is very important to show this give the students some idea of what goes wrong if you do not use logarithmic axis, where you often students have this confusion in mind, whether a logarithmic axis is the same as the d b, it is actually the same and these two figures, they both show a mod of h, this is mod of h in log scale like 10 raise to 0 here, 10 raise to minus 1, 10 raise to minus 2 and so on and because the decibel is already has log in it, the shape of this will actually remain the same. So, this point is you can say this 10 raise to 0 or it is the same as 0 d b, this point is 10 raise to minus 1, the same as minus 20 d b and so on. So, therefore, these two plots will have essentially identical nature, no difference and so it is good to explain this as well. All right, what happens if I change, if I use radians per second or hertz, very little difference except that this, the plot will just get a little shifted because the frequency in radians per second is 2 pi times frequency in hertz and so again that is important point out because students do have this confusion for time. So, this plot now shows the phase of the transfer function for the same example and if I have to use a linear frequency axis, I really cannot make out the information at low frequencies and therefore, once again we use the log scale for frequency and we use and this case the phase does not really change very widely, it goes from 0 to minus 90 degrees and therefore, you can continue to use the linear scale on the y axis and you can get a very good resolution. I can read off any, read off the phase at any given frequency using this plot. So, therefore, the frequency axis or the phase axis is linear, unlike the magnitude axis. So, one important now finally after all this introduction, we finally come to body plot and how do we construct body plot? So, for example, you might have a general body plot like a function like this k times some 0s divided by some 4. So, how do you represent this in graphically? So, this z 1, z 2 etcetera are called the 0s of h of s to be precise minus z 1, minus z 2 and so on and this minus p 1, minus p 2 etcetera are called the poles of h of s. Now, in addition we will often have terms like s and s square and so on in the numerator and in it can things can get actually more complicated because some of these 0s or poles can come in complex conjugate pairs, but in this particular presentation we will take a stick to the simple case where these are real and distinct. So, what does the construction of body plot involve? It involves computing approximate contribution from each of these terms like this term and this term and this term and so on and then adding them up together, combining the various contributions to obtain h and mod of h and angle of h, okay. So, always good to take this simple example and show that show how it comes about. So, here is a contribution of a single pole, okay or so h of 0 omega is that and mod of h is 1 over square root of 1 plus omega by p square. So, body plot basically come through asymptotic approximation and so we need to consider the two different asymptotes in this case, asymptote 1 is when omega is much smaller than 1, okay. What happens then is this becomes almost 0 compared to this 1 and therefore h of 0 omega becomes constant equal to 1 and when if you take log of that then you get 0 to p. So, that is 1 asymptote and that is shown in over here in the red line which you may not be able to see right now, but you can see it later. Asymptote 2 is when omega becomes much larger than this pole value, okay. So, in that case your transfer function looks like 1 over omega over p because this one is then negligible or that is the same as p over omega. If you take mod, if you take h and db then you get 20 log of p minus 20 log of omega. Now, very often people students do not quite understand why this 20 db per decade where it comes about, okay. So, now this is an explanation of that. So, if I change omega from omega 1 to 10 times omega 1, okay, the mod of h will change by 20 db and that is why this 20 db per decade are slow. Also important to point out that this asymptotes actually differ from the actual exact calculation at omega 0 by 1 over square root 2 and that corresponds to minus 3 db and that is why that point is also called 3 db point, alright. So, well there is a contribution to phase as well and we will skip this, we will just take an example of a function which has multiple 0s and poles and then see how that is that is constructed and then after that I just wanted to give you, show you a tool which we can use in class, okay. So, the rest of the presentation just shows what is the contribution of s and s squared and so on and finally there is an example in this example. So, in this example what we have is term s in the numerator and we have two poles, one at 10 raise to 2, one at 10 raise to pi and how basically how to go about constructing the body plot systematically. So, here is the contribution of each of these terms, this is just the constant 10, this is the term s in the numerator, this is the term, this is the first pole, this is the second pole and then how all of these combine in the log plot to give you this final picture and then finally we also show how the exact one differs from the asymptotic one, okay. Then there is a similar plot plot for the page, that is right. So, I suggest that you can go through all of these later but we find that body plot is not something that is well understood. So, when you are teaching in a class it will be good to actually spend some time and give some examples, all right. So, for today I think we will stop here but I want to show you one's tool that you can use for body plot in particular. So, can we share the desktop, okay. If you go to the SQL URL that we announced earlier, that we wrote on the paper here earlier, you will find the link for E101 and there are some exercises there and then there are some animations there. So, you can look at body plots one, okay and you will get this, so they can see this now, all right. So, this actually can help the students to check out if their understanding is correct or not. For example, if you select this particular form of H of S and let us say I have A0 equal to A1 equal to 0.0 or let us say A0 is equal to, yeah. Let us say the pole is at 100 radians per second. So, that means A1 would be 0.01, okay. If I do that, I can plot the magnitude and I can also plot the phase. Now, what this does is can they, they should be able to see this, okay. So, what this shows is actually the asymptotic plot as well as the exact plot, okay and that is something that most of these packages like MATLAB will not show you. For example, the phase here is the asymptotic plot like that and here is the exact plot like that. So, let us take something more complicated. Let us say we select this function here, 1 0 and 1 pole. Let us say the pole is at 100 and sorry the 0 is at 100 and then the pole is at some other higher frequency. And then let us see what happens then, okay. There is some information, let me take some other example, sorry I am typing at the wrong, sorry I was making a mistake there. So, let me take this one, okay. So, if I have a 1 0 and 1 pole, this is what the asymptotic function looks like and that is the exact one. So, plot the phase, that is what the phase looks like. So, this will also help the students to know how accurate the approximation is for the given transfer function. So, the phase for example, you can see that this there is a considerable error in this particular case where you use the phase approximation. You can also use this other one, which has got similar format, but it has got the poles and 0s explicitly written like this, s minus z 1, s minus z 2 and so on. So, you can also use this and take it out. Alright. So, I think we will stop at this point. I will take a few questions. NIT Warangal, you have a question. We prefer NAND gate implementation rather than NOR gate. Can you explain the reason? NAND gate implementation rather than NOR gate. The question is whether you prefer NAND gate implementation over NOR gate implementation. Actually, there is no such thing. I mean it, for some functions the number of NOR gates required will be less than number of NAND gates. So, for some other functions, it will be just the reverse. So, in a realistic situation, actually you do not have a choice. You have a chip which has got thousands of NOR gates or you have a chip which has got thousands of NAND gates and you have no choice but to use NAND gates or NOR gates. That is how it is in real life. So, you normally do not choose, no make this choice between NOR and NAND depending on the function, but you just use, do all your functions with either NOR gates or NAND gates because you want to use one chip only. Is there any power consumption difference while implementing with NAND or NOR? Is there any power consumption difference in implementing NAND or NOR? This would actually depend on the, first of all it will depend on the number of gates that you require and therefore the number of function. Secondly, it will also require, it will also depend on which technology you are using, whether you are using CMOS, whether you are using TTL, etc. So, I think this question, let us raise this question again when Professor John covers these gates and if it is not covered at that time, let us just put it up on Moodle and then we will see. We can try to give a generic answer to that question, but it will depend on the technology. Mufakam Jha College, go ahead with your question. Sir, my question is, what is the application of Bode plot and what is the importance? Bode plot, okay. What is the question is, what is the application of Bode plots? Applications are many. For example, if you have an amplifier, let us say you have two amplifiers and you are designing a two-stage amplifier to get a larger gain, for example, and now you want to find out whether this combined amplifier, the amplifier with larger gain is going to be stable or not stable, right. So, that is where Bode plots can be immediately useful. For example, if you know the pole zero information about both of these amplifiers, then you can plot Bode plots and get the pole zero and you can get the gain margin, phase margin of the combined amplifier. That will immediately tell you whether the combined amplifier is going to be stable or not stable. So, that is a very important application. Control systems, any control system Bode plots are always useful, okay. We will go to the next center. Srinivas Institute, Takenada, go ahead with your question. My question is, in most logic gates, why the low state is approximately zero volts, why the high is approximately five volts? Okay. The question is why is the low level approximately zero volts and why is the high level approximately five volts in most logic gates? First of all, this is not true anymore. It used to be five volts like five, ten years ago. Now, these days people are talking about 1.5 volts, even about one volt of VDD. So, these voltages actually are coming down and there is a good reason for doing that because if you bring down the voltage, the power dissipation will reduce dramatically and that is how we can increase the packing density and all kinds of related advantages. But these levels will actually depend on, again, technology, whether you are using TTL or ECL or MOS and these days, most of these digital gates will use MOS because they are obvious packing density advantages. But the voltages have come down. Over. Okay. Jayachand Rajendra, Karnataka College, go ahead with your question. Over. Hello, sir. How to calculate the delay between input and output signals of digital logic circuit? Can you explain with an example, sir? Okay. The question is how to calculate the delay between an input and output of a digital circuit? And can you explain with an example? So, let us take a very simple example. So, there is an inverter and you always have a, in most cases, you always have a capacity load at the output and you have an input here. So, there is an input, there is a gate and there is a capacitor. So, now let us say that your input is perfect, that it is making a very sharp transition at t equal to 0. Now, the output if you plot, it will be high in the beginning and then it might become low and it might take some time to do that. And so, therefore, there is some delay involved between these two and that is the question. How do you calculate this delay? Okay. Now, this delay will of course, definitely depend on the technology and if you are familiar with CMOS technology, let us say what, let us see what happens in a CMOS technology. So, this inverter in fact is nothing but this circuit and let us see now what is happening if your, if this input voltage goes from 0 to 1. So, when this input voltage was 0, this transistor was on and this transistor was off. Now, when this goes high, this is going to turn on and this is going to turn off. What happens to the capacitor? The capacitor was earlier at logic level 1 that is let us say VDD and then this is going down to 0 volts. So, where does this charge go? This charge will actually go through this transistor. And also there is an in-between period when both of these transistors are conducted. So, now in order to, so this, this current is finite, the current that this transistor can conduct is finite and therefore there is some delay involved in discharging this capacitor and that is what basically we are going to see over here. Now, the details of these calculations Professor John will cover in this lecture on CMOS and TTL and so on. So, let us wait until then and if it is not clear at that time, we can just take it upon model again. So, essentially it has to do with the discharging or charging of this capacitor through the transistors. Or if you have any other questions, go ahead. Can you please explain fan in and fan out of a logic circuit with an example? So, the question is, can we explain fan in and fan out of a logic gate? Alright, now this question actually is a little difficult to answer in general. Again we should take an example and let us take the same CMOS example. Let us say there is an inverter which is driving some other inverters or some other gates. Let us just take for simplicity again inverters. Let us say this is driving two different, two other inverters. So, we in E O and E O 1 and E O 2 etcetera. Alright, so what is the impact of this connecting one more load here or let us say 2, 3, 4, 5 more different loads? Essentially what happens is that this the node, this output node here is seeing an effective capacitance and this capacitance will depend on how many gates you connected the output.  And if your capacitance becomes large, then obviously you are going to take larger time to charge or discharge this capacitor and your delays are going to increase. So, that is one consideration. In CMOS I think that would be a dominant consideration. Other in other technologies like TTL for example, they will also be DC current. That means even if this, even in steady state all of these gates will actually consume some, will take some current and then your output stage of this gate will have to be able to supply all that current. So, that is another consideration that can come in. And CMOS of course, the DC current is not there. So, that we do not need to worry about. Again this will also be something that will be addressed in the next week's lectures. Over. Sir, while manufacturing the gates, which type of logic family is more used, sir? And is there that TTL is more advantageous compared to other logic families? Okay, the question is while manufacturing gates which type of technology is used and whether TTL is advantageous. Okay, the answer is that these days all complex digital circuits are essentially fabricated with CMOS technology because they have this big advantage of low power and very high packing density and that beats the bipolar technology way down. TTL gates are still used, especially if you have an application where you just need, you know, a few gates, then the TTL can be considered. And sometimes these decisions are based on convenience. For example, what is the voltage level you are using and that kind of thing. And how much current you want to drive, want the gate to drive. If you are going to drive some LEDs, a large number of LEDs, for example, and whether the CMOS gate will be able to deliver that much current or not. In that sense, it is TTL advantages and so on. So all of these considerations will be used. But for all large circuits these days CMOS is the only technology that is used. Okay, over. Do you have a question? So my question is regarding the combination logic that we actually say that we are having the mean terms and we call it, it is a product. Whereas it's not in actual, it is an end, end of the terms. But we call it as product. And in the similar way, the max terms, we call they are in sum, but they are actually in OR. Doesn't it create learning ambiguity? Awesome. All right. The question is that why are we using the terms product and sum to describe logical operations like AND and OR. I am not sure about the historical development of this topic, but I think it is just that people felt comfortable with this terminology. And but really one has to go into history and see what, for example, in the Boolean algebra what they used and if there is an explanation given to that. So let's see, I'll try to find an answer and then I'll post it on model. As of now, it's just that some of these things like we have seen some of the laws, they look very similar to the laws that you would write it for real numbers if you use dot for the AND and plus for OR. So in that sense, things look familiar if you use those symbols. I think that may be right now the only explanation, but if I find more information, I'll take it over. How to explain the difference between demultiplexer and decoder with IC74138, which is used as a 3S28 decoder. How to explain the difference between, I think the best way is to, I mean just go back to the basic definitions of this demultiplexer and decoder and a demultiplexer will have this control pins, whereas decoder will not. So that is, I mean in that sense there is a major difference between these two and therefore if you just explain that to the students, they will know that there is something external which is controlling the information flow in a demultiplexer, whereas there is nothing external that is controlling information flow in a decoder, because the information flow itself depends on the input there. That would be my answer, but just post this on model and if we have some other views from Professor Sherma or Professor John, they will also add to it. They are not here right now. Over. Thank you, sir. Over. Thank you. So I will see you tomorrow.


But yeah, let's boldly go forward and I can tell you the worst is already behind you or the most complex things are already behind you. Thank you, looking forward to it. All right, okay, without further ado, let's move on. Again, this is the slide that I'm repeating everywhere because I have no way of knowing how many people are dropping in or dropping out. So any questions, et cetera, write me an email, ping me on Twitter and you can also find the slides and additional information on this website. There's also workshop going on, but let's discuss this in the last lecture maybe. So quick recap, what did we see? What did we try to understand? We wanted to distinguish between topological objects and for this we used the bitty numbers which essentially count the number of high dimensional holes in an object. So it's a very coarse calculation. It's a very coarse invariant, but it's something that turns out to be really, really useful. But the calculation requires a simple complex and some linear algebra. And so now let's see, in this lecture, let's try to bridge theory and practice. So let's, first of all, let's look at how can we bring this into the real world? So real world objects are typically not described in terms of a simple- Sorry? Yeah. I think you're not sharing a screen. Oh, whoa, whoa, whoa. This is a very good point. This is a very good point. Okay, so you missed the cool bridge. Anyway, we're going to bridge this gap in this lecture and we're trying to figure out how real world objects work and how we can describe them in terms of simple- So complexes. All right. So here's an example. This is what we typically get when we work with real world data or well, contrived real world data that someone invented for a lecture. What we want or what we see as humans is we see this torus, right? So this is what we get. This is what we see or what we want to see. So we want to understand why this is a torus or why this point cloud is likely to have been sampled from a torus. But this is really hard to say. So how can we get there? Moving from a point cloud to a simple- This is actually something that goes back a long time. So like over, I think over a hundred years now. So even then, back then before computers, people thought about these things. So we will calculate something called a vitoris rips complex. And we will see a lot of examples of it for this. Given some set of points, x1 to xn, in a metric space and a metric itself, such as the Euclidean distance, we can pick a threshold epsilon and we build a vitoris rips complex defined as all the subsets of x, such that the distance between all the points of the subset is less than or equal to epsilon. So we just take a look at the pairwise distances in every subset. And if the subset satisfies that all the distances are less than or equal to epsilon, then we add the subset to the complex. Notice that this has a nesting property, which we will formalize in a second because if this holds for let's say five points, if five points satisfy this in a pairwise fashion, then of course all their subsets will also satisfy it because going down is easy, going up is hard. Equivalently, you can think of it like this. The vitoris rips complex v epsilon contains all the simplices whose diameter, so the maximum distance between them is less than or equal to epsilon. And notice that on this slide, I make my life a little bit easier, so I will only write v epsilon to indicate a vitoris rips complex of some space and I will hope that it's pretty clear which space it's calculated from. All right, so first example, how does that look in practice? So we take those, we take this point out here, we take certain epsilon values and I'm indicating those as discs or as balls around the individual points and whenever two of them intersect, we draw an edge or we draw the corresponding simplex. So when two of those spheres intersect, we draw an edge, when three of them intersect, we draw a triangle and so on and so forth. And you can see that as we modify this threshold, the point cloud becomes progressively more triangulated and progressively higher dimensional simplices are being added. So here we only add those edges and here we add some triangles because we have the first intersections with three things and then we add more and more and it gets higher dimension. Just a second, I saw a question pop up on the chat so then I should open this again. Okay, now it works, okay. So essentially, we just draw these Euclidean balls of a diameter epsilon and we create a case simplex sigma for each subset of K plus one points that intersect in a pairwise fashion. And the cool thing is you can already see that this looks roughly circular, I would say for most people and if you have the right threshold, you see the circular structure here in the simplisher complex because this is a simplisher complex that has, and we will validate this of course, that has one hole like a circle and this hole remains here and then at some point it's being closed. This is the whole idea of this calculation. And I just have to mention this because it's so awesome. So it dates back to a 1927 article by Leopold Vietoris über den höheren Zusammenhang kompakter Rheume und eine Klasse von Zusammenhangstreuenabbildung which is still readable today if you speak German of course. And this is, this was the first mathematician who described this sort of calculation for for metric spaces. And then it took until 2010 and a paper by Afra Zamorodian to describe several construction albums. So that would be the paper fast construction of the Vietoris Rips complex. The basic idea for this is we built higher dimensional simplices inductively from lower dimensional ones. So we first have to get away with the neighbors and then we have to take a look at whether those neighbors intersect in the right way to build a high dimensional simplex and so on and so forth. I also have to stress that in the worst case this complex will contain all two to the power and subsets of the underlying point cloud X. So it's not the most efficient way of describing a space, but it is one of the most efficient ways if you want to calculate stuff with it because it just requires a distance or a metric and a set of points and everything else goes automatically from there. All right, so now let's couple this with the, with the Betty numbers that we have in just a second I have to drink something. It's kind of tough to talk all the time. Anyway, coming back to this example the, let's look at the Betty numbers of the Vietoris Rips complex. So let's connect what we learned earlier in the first lecture to this calculation here. So we only have to take a look, we could look at Betty numbers in dimension zero as well, so at the connected components but let's only take a look at the tunnels. And again, let's do this intuitively. So let's not just, let's not calculate stuff but let's just say that whenever we find this cycle here this circle, then we say, okay we have a Betty number of one and whenever we lose this circle we say, okay the Betty number now drops again. So this is the only thing we are looking for now. And you can see that as we move along these different thresholds here you can see that at some point for epsilon zero point two the Betty number jumps from zero to one because at this threshold here finally all the points are connected with each other and they are forming a circular, a circular structure cycle. And this cycle remains for quite some time until at epsilon zero point one it is closed again because everything is now connected to everything else. So there is no tunnel anymore, no cycles anymore, no nothing anymore, so it drops back to zero. So this already tells you, gives you a rough glimpse as to what we wanna do namely evaluating Betty numbers alongside this complex for all thresholds. But there are certain issues with this approach. So the first obvious issue is that how can we pick this epsilon parameter? Because there might not be one correct value for epsilon. If do we want to pick epsilon zero point two? Do we want to pick zero point two point one? Do we want to move even higher? Do we want to pick something that is as close to one as possible? So in essence, it's also it's very hard and it's very intractable also because we would technically have to calculate this matrix reduction algorithm that we learned about in the last lecture or that at least we glimpsed in the last lecture. This has to be performed for every simple initial complex that we get. So for every value of epsilon here, this is really not smart, it's really inefficient. But so nonetheless, what can we do now? The answer may surprise you. We just calculate topological features for all possible scales. So for all epsilon parameters at the same time. And this might sound crazy because why should this be more efficient than doing it individually? But it actually is at least because we can constrain the calculations somehow. So let me give you an intuition here without going into the details of what all of this will mean. We will of course discuss it subsequently. Let's just say we have such a point out here. It also looks a little bit like a yummy bagel and we just start growing a simplicial complex, growing a vitorious rips complex by having this epsilon threshold and we let it grow and grow and grow. And we always take a look at what the resulting simplicial complex has in terms of topological features. So now if we can do this, if we can go through all these potential scales and track topological features, then at some point we can end up with a descriptor that tells us at which scale is a topological feature created and at which scale is it destroyed? And this is, we will make this much more formal and we will make this much more clear, but the underlying intuition is nothing but that. We just go through all the scales and we look at which scale a feature occurs and at which scale it disappears. So if you go back to this example with a cycle, at some point the cycle has been filled and then it is destroyed again, right?  So why does this work? It works because as I already insinuated, the vitorious rips complex is nested. It has a nesting property. So given two distant thresholds, epsilon one and epsilon two, we have that the vitorious rips complex of epsilon one is a subset or equal to the vitorious rips complex at epsilon two. And this nesting property is the key towards these improved calculations. So essentially you can see it like this. This complex, and I repeat the same here to tell you that they do not necessarily have to differ by additional simplicity. It's also perfectly fine if we just keep repeating the same complex. But this complex is definitely a subset or equal to this complex here. This complex is a subset or equal to this complex here because we just add some edges. And likewise here going from here to here, we just add some more triangles maybe and going from this guy here to this guy here, we add even more triangles and even more simplices. And so they're all of them are nested. And again, I'm showing these Betty calculations here on the bottom. For all these thresholds, we can calculate the Betty number and at some point it will remain for a while. It will remain, we will have this whole and at some point everything is closed and then it will go down. So this is the idea of this nesting relationship and it leads us to something that is called a filtration. So recall that this Betty number of the data, it persists over a range of this threshold parameter. So there's quite a big range of the threshold parameter epsilon here for which the Betty number has the right and I'm using air quotes here, the right value because we would expect such a point cloud, we would expect a point cloud like this to be roughly circular at least if we look at it from certain scales, right? So for a long range of the threshold parameter epsilon, it has the right value. So how can we formalize this? How can we formalize that a topological feature like the cycle persists over a range of the parameters? To formalize this, we make a very, very simplifying assumption. Namely, we assume that the simplicies in the vatorious rips complex are added one after the other. So we just pick some ordering of the simplicies and add them in one after the other. And this gives rise to a filtration to a sequence of nested simplicial complexes, K zero, nested K one and so on and so forth until we end up with the original vatorious rips complex. And each of those Ki in this sequence is a valid simplicial sub-complex of the vatorious rips complex. And that kind of makes sense. We saw that if we increase the distance threshold, more and more simplices will be added, right? So in a way, there is always a valid value of a valid simplicial complex in there regardless of which threshold we pick. And now if we have this... Why would these all be nested? I mean, if I have one, for example, some points are making a complex because of my epsilon and some other are making a complex somewhere else. I mean, how is one nested inside the other? Let's say we have two points very much to the right and three points very much to the left then they are not really nested now, are they? And they all make one vatorious rips complex. They are nested if we just keep growing the threshold parameter. So if we start with a very low distance threshold and we just start to connect points that are very close to each other, and if we increase this parameter, then more and more points will be connected to each other. This is what I mean by nesting. Also K zero and K one are not, are those v epsilon that came for a smaller epsilon? Exactly, yeah. So if we increase the epsilon parameter, then we also add more and more information but we never lose any information that is part of a lower dimensional vatorious rips, not lower dimensional pardon me. Not, we never lose any information that comes from a lower threshold because once a simplex has been added to the vatorious rips complex, it can never be removed because its vertices satisfy a pair-wise distance less than or equal to epsilon. And if we increase epsilon now, then the smaller scale simplices that we've already seen they remain there because if something is connected already for a threshold of let's say 0.2, then it will of course also be connected for a threshold of 0.5. So this is just the consequence of the ordering, right? If something is less than or equal to 0.2, it's also less than or equal to 0.5, right? So it doesn't, so what I mean is that we never lose information that we've already seen at a lower scale. This is what I mean by the nesting. And this is what this graphic two slides before show shows? Yes, yes. So when we, when we- No, no, one, one, one before. Yes. This auto to the right, no, one slide, go. One slide back? No, forward, forward, forward. Forward, okay. Okay. One more. One more. Okay, now the one to the destruction creation one. This is what is each dot, is this? Each dot is a topological feature. This is just an intuitive view. We will formalize this later. Okay, sure. Each topological feature, each cycle, for example, could be created at one threshold, at one creation threshold, and it could be destroyed at one distraction threshold. So the point I'm just making here is that we can track topological features alongside this filtration. All right. So moving on. Oh, whoa. One question. Is every KI necessarily a Vittorius-Ribs complex? This filtration? In this filtration, yes. Because you can always find a parameter that gives you a Vittorius-Ribs complex for this. Although of course there's this simplifying assumption that it only differs by one simplex, but we can leave that away for practical purposes and we can just pretend that these are all the Vittorius-Ribs complexes that have been calculated for a certain threshold. We will see later on that we actually don't need this. This is more like the formal, the syntactical sugar in a sense to make these computations work. But in essence, later on we will never have to calculate more than one Vittorius-Ribs complex. We'll only have to calculate a big one and we will get the smaller ones automatically. This is kind of the intuition or the takeaway message from this sort of theorem. Since everything's nested, you get all the information already on the right-hand side. You don't have to look at all those individual complexes here. It's still confusing that these are called K and the other one is called V. Oh yeah, but this is by design here to be honest, because I want K to stand for an arbitrary simplification complex and I want V to represent a Vittorius-Ribs complex for a certain threshold. But I agree. The V is the big one. The K are the ones we get for free. Yeah, the K are the ones that we get for free, exactly. Yeah, that's a very good point. So I hope that I give lectures of this kind, maybe some at some other conferences as well. And then I should probably change this and make it a V throughout or something like that. That's a good point. So anyway, before we can finally reap the fruits of our labor, we have to make one jump back but maybe I'll skim a little bit over this because if you say that this was very confusing in the algebraic topology setting then it's not going to be a lot easier in this setting now but bear with me for at least a few slides. I'm just formalizing what we get essentially. So since we observed that these simplification complexes are nested in the filtration, so K i is a subset or equal to K j for i less than or equal to j. We also obtain a sequence of homomorphisms connecting the homology groups of essential complex, right? So what we learned in the last lecture is we could apply homology group calculations to all these individual simplisher complexes. This is why they're called K i because they are just a simplisher complex and we can calculate their homology groups. But they are also nested and this gives rise to a sequence of homology groups that are connected over this filtration. So they give, so you have two indices i and j here referring to the fact that you can connect the homology group in dimension P of the simplisher complex K i to the homology group in dimension P of the simplex K j. And so again, this works and we can reformulate this. And I thought about how an audience might perceive this and this looks a lot like abstract nonsense maybe, but the fact that we can reformulate these concepts that we already observed and we can reformulate them in the context of filtration, this illustrates that this is a very generic formulation that we are talking about. So we really, this makes a lot of sense and it's just a way to like formalize the idea of subset relations and of invariance between different maps. And I would urge everyone to look at this excellent blog post by Ty Dana Bradley. It's called, what is a functor? And this is an excellent explanation of what we're actually looking at here. And it's also, functors are also increasingly becoming important in machine learning by the way. But anyway, to finally to sort of describe what is actually going on here, we can now define a so-called persistent homology group along the filtration. So we take two indices E less than or equal to J and we define the persistent homology group H P index by I and J as the cycle group coming from K i modulo, the boundary group coming from K j intersected with the cycle group coming from K i. And again, now we see why I try to add this vocabulary in the previous lecture. This can only be read or only understood if you know what these boundaries and cycles actually mean. But for us, this should just mean that we have all the homology classes, all the topological features of the simple structure complex K i that are still present in the simplicial complex K j during the filtration. So the running example in your head should always be this cycle that gets increasingly closed by high dimensional simplices. And so while this process happens, while these cycles grow, you can calculate topological features and you can see how long they survive in a sense over the filtration. And the implication of this formulation is that we can calculate a new set of these homology groups alongside the filtration and assign each topological feature a duration. So previously, to make this loop back, previously we were only able to count, we could say, ah, this is a torus. It has, let's say, one connected component. But now we also have a duration since we have this concept of a scale at which to look at the simplicial complex, we suddenly incorporate geometrical information that was previously not available. But now we can say, ah, we have a point cloud. And if we view this point cloud at a certain scale, we can say that at this scale, it has this kind of topological features. And this is the novelty. This is the new thing that will help us to actually describe real-world datasets because real-world datasets don't come with proper scale information attached. We will always have to guess the scale somehow. But this guessing is not a mug's game. This guessing is smart because we assume that most of the real-world datasets that we encounter are actually samples from some unknown high-dimensional manifold, right? That's the whole hypothesis in deep learning or in image processing, for example. It's the fact that the things that we observe come from some unknown manifold. We just see the discrete samples, but we're interested in describing them. We're interested in figuring out their topological features. And for this, we need this scale representation. And this is where this persistence comes in, this persistent homology group. So not gonna torture you with any more details, but the takeaway message here should be, we can assign every topological feature, every class here that is created in some complex K i and destroyed in some other complex K j because, for example, the cycle was closed because there are too many high-dimensional simplities. We define the persistence as the difference in weights of the jth-simplisher complex and the i-th-simplisher complex. And we take the absolute value for good measure because we wanna make sure that this is always a positive number. And w in this case is just some weight function that assigns each simplisher complex of the filtration, but here described via its index, a weight. And this weight, you can think of this weight as, for example, the associated distance. So if we have this distance parameter epsilon, then wj could just be one epsilon parameter for one simplisher complex. And the idea is that the persistence of a topological feature measures the scale at which a certain topological feature occurs or at which it kind of endures or persists in this simplisher complex. And I'm not making this up this terminology. This is actually the people who invented this in particular one mathematics professor from Austria, his name is Herbert Edelsbrunner. He actually had this image in mind with this persisting. So this is why it's called persistence because the classes or the topological features, they persist over a range of thresholds over a scale of different thresholds. All right, so before we look at how to calculate this in practice, let me discuss two or three standard filtrations here. Most of them you already know, they're super easy to implement and they're super easy to extend to a simplisher setting. So that's really no problem at all. It's more like creating a shared vocabulary. So given a distance metric dist, such as the Euclidean metric, the distance filtration assigns weights based on pairwise distances between points. So if we take a simplex sigma, then we give it a weight of zero if this simplex is a vertex because a vertex does not have an assigned distance. So in essence, all the vertices are there at the beginning of the filtration for a threshold of zero. Whereas if we have an edge, so sigma is an edge between two vertices, U and V, we assign it a weight of the distance between U and V. And if for any higher dimensional simplex, we take the maximum weight of all the subsets of that simplex. So essentially, once we have defined the distances between pairs of vertices, we just extend that with a maximum to higher dimensions. And this gives us a simple way to sort simplices. Namely, we can use the ascending order of the weights. And in case of a tie, faces should precede co-faces. What I mean by this is, I mean to say that the lower dimension comes first. So if we have an edge, so one simplex and a triangle, a two simplex, and they have the same weight, then the edge must come first and then the triangle. This ensures that our simplex complex is built in a consistent manner because the idea is that you first have to add all the edges before you're allowed to add the triangles of the same scale. Think that kind of makes sense, right? It's the intuitive way as to how you would build your object. And just as a side note, this distance filtration has some very neat properties. It's very related to things like the Johnson-Lindenstrauss lemma, for example. So persistent homology turns out to be capable of preserving distances under random projections. This is kind of a very neat result from Donald Sheehy. There's also a different kind of filtration that you will encounter later on, in particular for the graph setting. So if we have a scalar function, f, that goes from the vertices of the simplex complex to somewhere else to the real numbers, for example. It could be a temperature measurement, but it could also be a degree. Then the sublevel set filtration propagates those weights through a simplex complex by setting the weight of a vertex to the function value at this point. And the weight of any higher dimensional simplex is set to the maximum weight of its faces. So it's, again, this is a way to ensure consistency of the complex. And again, we can sort simplices in ascending order of the weights, and in case of a tie, faces proceed co-faces. Conversely, so this is called the sublevel set filtration because it grows in this direction. Conversely, you can also calculate a sublevel set filtration by using a minimum instead of a maximum and sorting simplices in descending order of the weights. So this is the neat thing. There's all kinds of dualities happening in persistent homology or in algebraic topology. By duality, I mean that oftentimes flipping the sign of an operation will change the underlying computations, of course, but it will not change the meaning too much. But again, we won't have time to go into this, but I'm at least dropping some hints in the slides so that you can look this up in case you're interested. All right. So now we return to our previous example. It turns out that it's super easy to extend the boundary matrix calculation alongside a filtration because we can just calculate this while we add the additional simplices. So just as in the previous case, and just start adding simplices, we can see that it's a vertex so it doesn't have anything in its boundary. We add an edge, AB, it has two vertices on its boundary, and we do this for the other vertices as well, pardon me, the other edges as well, and so on and so forth. And here we added a triangle simplex, so a two simplex, and it has three edges on its boundary. So also notice that there is a neat shift going on in this calculation. So the two simplices have a boundary that consists of one simplices. So it always goes one dimension down. And this is our boundary matrix calculation. And now we can also take a look at how to reduce this boundary matrix by column operations. So it becomes, interestingly, let me give a brief side remark here. In the previous setting of computational topology, everything, or in algebraic topology, it was a little bit complicated, if you recall these calculations, was like, oh yeah, it's spanned by these simplices and we have to calculate this and that. But here it's, here this additional information of the filtration makes everything a lot easier. So we have one big boundary matrix to look at and we can just reduce it by a very simple algorithm that just takes a look at the lowest entry in every column, the lowest non-zero entry in every column. And the algorithm works like this. We start with a boundary matrix, M. And then we just repeat this while we find, as long as we want, as long as we find pairs to calculate, as long as we find columns to calculate, we just repeat this again. So as long as there exists a column I prime that is less than I, such that the lowest one in column I prime is the lowest one in column I and it's non-zero, then we just add the column I prime to the column I. But we do this addition again over the field of the coefficient zero and one. So if we add one plus one, we get zero. So this is why I have this strange O plus notation here and not the regular plus notation. This also works for different coefficient fields, as mentioned in the previous lecture, but we do it for this field here and because it's easier. So let's take a look at how this works. So a little bit too fast there. So we first take a look at this matrix. Let's see where we can find two columns that satisfy this. So here are two of those columns. So the lowest one in this column is the same as the lowest one in this column. But of course, this column here precedes this column here. So what we do is following this algorithm, we add this column to this column, modulo two coefficients. So if you do this, you can see the one gets canceled and the other one gets transferred here. So this is what we end up with. Again, this column is untouched. Now let's see whether we can find another of those pairs. There we have it. This column here has a lowest one here. This column here is a lowest one here. So now we add these two columns together. And as you can probably imagine, they will cancel each other out because they are the same. So this column vanishes completely. And now we don't have any other of those columns anymore. So we obtained a reduced boundary matrix. And this is the matrix from which we can now finally read off all the information about the filtration, all the information about the simplicial complex. And it's a very simple way of reading off these things. Namely, we look at the column I. If the column I is empty, then the corresponding simplex is a so-called positive simplex that creates a topological feature. So in this example, simplex A is positive. Simplex B is positive. Simplex C is positive. Simplex AC is also positive. So they all create topological features. I should have said that by empty, I mean that there is no one in there. There is no other simplex in there. So this is just an empty simplex chain, right? Because it doesn't consist of any simplices. There are no values in there. If column J on the other hand is non-empty and the lowest one of column J is K, then we call sigma J a negative simplex that destroys the topological feature created by sigma K. So in this case, simplex AB, for example, is a negative simplex. It destroys a feature and it destroys the feature created by, let's look in the lowest column, created by B. Or as another example, the simplex ABC destroys a topological feature created by AC. So again, notice this nice duality. AC is a positive simplex because it has no entries in its column. And ABC is a negative simplex that destroys the feature created by this simplex. Intuitively, this means the following. The addition of the simplex- I think both of you- Please go ahead. So the areas will not work. Sorry, I don't get that. Okay, maybe, sorry, I don't hear anything. Maybe let's move this question maybe to the Q and A if you want. Okay, so what I mean by this example is that the addition of the triangle, so of the simplex AB and C, destroys the cycle that we've previously seen. So in a sense, this closes the hole that we have seen. So if we only have the edges of the triangle, so only the skeleton of the triangle, then it has a hole. But if we add the triangle itself into the simplex complex, then this hole vanishes. And this is what this notation expresses. And notice that the algorithm is very simple to do. It just involves matrix operations, right? It just involves addition of columns. It can be super easily implemented and it just requires this boundary matrix implementation. So again, let's use an illustrative example and let's calculate the persistence of some features so that we can connect this. So here, our topological feature is the circle that underlies this point cloud here. And since this persists from 0.2 to 1.0, its persistence is 1.0 minus 0.2 is 0.8. So this circle has a persistence of 0.8 alongside this filtration because it's available here and it's not available here anymore. You have to believe me that it would be available for any smaller parameter than 1.0, but let's just assume that this is the case. So now let's formalize this maybe and let's see how to track those topological features correctly. So again, we saw that there are different types of topological features. We saw that there is in dimension zero, we have the connected components in dimension one, we have the cycles and in dimension two, we have the voids. So whenever we have a topological feature with associated simple shell complexes K, I, and K, J, so the creator and the destroyer of this feature, we store a point, WI is the weight function and WJ in a descriptor called a persistence diagram. We will see an example of this in a second, but first notice that it's possible that a feature is never destroyed. It's possible that a feature persists until the end of the filtration because of course, no one forces us to add a triangle, for example, to our simple shell complex. So in some simple shell complexes, there are holes that we can never close. And if that's the case, we assign such a feature a weight of positive infinity. There's also other ways of assigning it weights, but this is the simplest one. So how does that look in practice? So for our simple filtration here, we would take a point at 0.2 on the x-axis and 1.0 on the y-axis, meaning to indicate that this cycle here is created at a threshold of epsilon 0.2 here and destroyed at a threshold of epsilon equals 1.0. So this is all there is to it. This descriptor can carry all the information of all the topological features in all the dimensions if we wanted to. Of course, here we only have a single topological feature, but as you saw previously, there can also be more and it's kind of easy to extend this. Let's take another look at an illustrative example that only requires counting of connected components and of cycles. So suppose we have the following graph here and I really hope that I counted this correctly. So let's assume that it's right. If not, this has to be updated. But anyway, for epsilon equals zero, we have 16 connected components and nothing to do here. For epsilon 0.25, there's only 11 connected components because let's assume that those things are connected already. So we have to mark the destruction of certain connected components in this persistence diagram. All of them were created at epsilon equals zero. So now we just add a few points at epsilon at the coordinate zero comma 0.25. You can also see one disadvantage of the persistence diagram here, namely we have multiple points that we would have to add here, but the multiplicity is not apparent here. We'll talk about how to circumvent this later on, but for now we just see that there's like, there appears to be a single dot. The multiplicity is actually higher. Now let's move on. At epsilon 0.5, we have only one connected component. So again, we have to mark this here. We have 0.5 and we have 12 cycles. So I marked this here at the persistence diagram on the right-hand side with the dashed line indicating that at this threshold, suddenly cycles are being created. And if we now move on, we get even more cycles. We get more cycles, 57. And at some point, we don't know where to put them because now we're done with our filtration, but we only have a single connected component, but 57 cycles still. And so technically they should all be added at positive infinity, but positive infinity is a little bit too large for these slides. So I added all the cycles at a destruction threshold of epsilon equals one. And I set their creation threshold to be the dashed line. So moving back, we can see that at epsilon 0.5, some cycles are being created, hence a line here at epsilon 0.75, cycles are being created here. And at epsilon 1.0, other cycles are created. So again, a dashed line here. And since we're now done with the filtration, I'm setting all those destruction thresholds at a value slightly higher than one, or maybe it's one, depends on how you look at. So this is essentially the whole magic that is happening or the whole descriptor that is happening for a simple graph. We just take a look at how many topological features we have. And whenever this number changes at certain thresholds, we mark it in this persistence diagram. And the great thing is that in contrast to the way that we were doing this right now in an illustrative fashion, we can actually do this by just reducing this complete boundary matrix of the simplicial complex. So there's no need to actually count individual topological features for every one of those complexes, but we can get the whole reduction scheme by reducing one big matrix. So these red dots were created. These red dots are the points itself when we did not have any edges? Yes, every point creates a connected component. And at some threshold, I should say, because point is a little bit overloaded now. So every vertex creates a connected component. And if that vertex is connected to another connected component using an edge, we have to decide which connected component persists. So from two connected components, if you connect them with an edge, then there will only be one connected component. We make the decision based on some arbitrary criterion, but this can also be formalized. And then we add a point to the persistence diagram. So in case this might get a little bit confusing, but the cool thing about this diagram here is that its entries will always be points. So it will always be a two-dimensional diagram, potentially with infinity for the second axis. But everything that will be added here can be represented as a point in this plane. Does that answer your question? Yes, you could scale the epsilon axis to such a way that you transform it such that one is infinity. Yeah, you could also. I don't know whether that makes sense, but use a function then you could put it in there. Yeah, yeah, that would also work, yeah. And in fact, it's also, so this is just a convention, people said that, let's say the topologists are calling for using this infinity notation in order to distinguish between what they call essential features of a simplicial complex and non-essential features. But in data analysis, when we're dealing with real-world data, it actually makes no sense to think in that way because we almost never know what kind of manifold gave rise to the data set. So in some sense, all features are essential or all features are non-essential, right? So this is why most people just use a value that is beyond the normal filtration value to indicate the high dimensional, to indicate the features that cannot be destroyed in this filtration. But there are also filtration that automatically do this for you in a sense by doing different passes through the simplicial complex. There's a little bit more complex even. And so I did not add this here, but just bear in mind that all of this is possible. And of course, in data analysis, we have to make certain adjustments. But we will later on encounter a deep learning approach that actually makes use of those guys here. So it actually just takes the essential features and it handles them in a different fashion than the non-essential ones. So people have thought about this and it actually is really easy nowadays to integrate into deep learning architectures. We'll see that in a second. Anyway, moving on a little bit. So how does that work in practice? And I urge every one of you to try out this implementation because it's really fast, it's really great. The calculations for persistent homology for this V-toys-RUPS complex, they're essentially bounded by matrix reduction complexity. So since we have to reduce a matrix, there is no way to get around a certain worst case threshold. And in fact, you can calculate or generate examples that take a long time. But in practice, there are certain speed ups that you can make and smart implementations of this calculation really make a difference. So it's not, some people in the early beginnings of persistent homology or computation topology, people scoffed at that and they said, ah, well, a matrix has to be reduced. So we are at, let's say, O to the power of, no, pardon, we're at O, N cubed, where N is the number of simplices and so this will never scale. But this just turns out not to be true because in practice smart implementations make a difference and you can always gain some other speed ups by reducing your simplisher complex or by reducing yourself to certain features in certain dimensions. So you could say, oh, I only calculate features until dimension two, even though I have 10-dimensional data or whatnot. So in practice, this can be done and it works. And Ulrich Bauer created a very efficient tool that is a single C++ library called Ripsa and it's extremely fast. It even has a web interface so you can try it out yourself. There are certain speed ups that I won't go into details here, but essentially they involve different smarter orderings for the column reduction steps. So the idea being that if you figure out which columns you have to reduce in a certain manner, then you can also reduce them from your cache. And so the whole algorithm is faster because it doesn't have to jump between different locations in your cache. Then there are also implicit representations of this simplicial chains and those can be made much more efficient than explicit ones and much more. So there's really been now a lot of thought going into these calculations, I would say approximately 10 or maybe even more years of research. And it really is at a point where it scales relatively nicely, at least if we constrain the dimension two, let's say five, 10 or something like that. And in fact, in practice, it turns out that for graph classification, you don't need to go higher than dimension two, which we will see in the third or fourth lecture. So practically it's already there and it can already be used. Of course, deep learning itself, maybe something like a convolutional net scales, of course, much better because you have this embarrassingly parallel calculation that you can do over different GPUs, things like this. But I think it's only a matter of time before these sort of things are coming to the persistence realm. And I just wanted to drop this paper here because it's really remarkable. There's also Python bindings now, but I'm not sure whether they are endorsed by the author of this package because Ulrich took a lot of effort into making the C++ code really efficient. And I think if you compile that incorrectly, then it might be not so efficient anymore, but that's beside the point. All right, I wanna end on something for this lecture that is very dear to my heart, namely there are also ways to calculate topological features of non-simplical domains. So previously we only saw this triangular setting, right? So we added a triangle and then we added a tetrahedron and so on and so forth. But it's also possible to define a filtration over cubicle domains. I modeled this so-called cubicle complex here after Robert Grice's excellent book, Elementary Applied Topology. This is also something that I would recommend to anyone. I will also link it in the notes of this lecture. And in fact, it's free to read or something like 20 bucks on Amazon. So I would do both essentially. And these cubicle formulations or these cubicle filtration, they actually crop up in a lot of other domains in there. So there are potentially a lot of data sources, namely any image with pixels is a cubicle complex essentially or any finite element simulation that numerical analysts do is a cubicle domain or voxel-based spaces. So fMRI data or MRI data is a voxel space. And in fact, I even have a preprint out which you might wanna look at which does that sort of thing. So it shows you how to calculate topological features over cubicle domains and thus assess things that are going on in fMRI data. And the nice thing is that, and this is where again, you have to believe me but it all works. So all the considerations and all the concepts apply virtually unchanged. So of course, the fact that this works is surprising and should be celebrated. But it's also really good to know that all of these concepts translate over to other domains and you just have to remember this idea of calculating topological features at different scales. And this is all you get whether it's a cubicle complex, whether it's a simplicial complex, this is all you get in the end. All right, so with this, I wanna give you two current research directions in this field because these are questions that I get a lot. There are two things that people are most interested right now. One is the properties of filtration. So are there filtration that are more robust to noise that are easier to calculate that are more expressive? We'll see some examples of these issues in the next lecture. But there's also this other important question which always comes back to bite you when you're doing deep learning. Namely, can we find a sparse representation? So not all the simplices, not all the things that we calculate are equally important and there might not be sufficient memory to represent all of them. So can we find sparse filtrations that have fewer simplices but essentially the same topological features? Because if we could find those, then we could scale up the calculations to massive amounts of data and we could profit a lot. We could scale persistent homology to really big data sets and at a fraction of the cost that we currently have because I wanna be honest with you, of course. Despite the advances in complexity, there are still some very strange things happening as you move into deep learning, for example, with topology. So we'll encounter some of those in the fourth lecture where I'm showing off some work on topological autoencoders and there we have a very strange scaling property but more about this later. So the takeaway message and then we can move into the Q and A and into a short break. So point clouds can be converted into simplificial complexes and what we can get out of there is something called persistent homology. It's the multi-scale equivalent of simplificial homology that we saw. So instead of counting the number of topological features, we take a look at the scales at which they appear and we track them over different scales. And again, calculation of persistent homology also boils down to linear algebra. In fact, it's even easier for some reason. That's really neat if you think about it that making the underlying representation more complex makes the algorithm more easy. There should be a word for that. I don't know, the word I would use is surprising and essentially filtration, so these orderings are the key for tracking topological features. So again, that's all I have for you. Take a look at the website if you're interested in more and I would now open the floor for a brief Q and A. Yeah, sorry. I'm still confused about the filtrations and the relation to the rhetorical thrift complexes. So for example, on your slide 20, which is a bundle of a few slides, but if you go to the one, for example, which has A and B connected and C just being a vertex. Yeah, how is that? So I don't quite understand how this could be a notorious rips complex because I don't think I can find an epsilon such that I can connect A and B but not C. You are absolutely right. This is an example of where I said you have to think of adding simplices in some order and you have to define, you have to, in case of a tie, you have to add one simplex after the other. So I'm using this example, you're absolutely right. All these edges will be added at the same time in a sense at the same epsilon, this is what you mean. They will all be, let's assume that the triangle is really an equilateral, then they will all be added at the same scale. This is what you mean, right? Yeah, so I mean, I see how it's a value of filtration but I don't see if you add one at a time but I don't see how it could, how, yeah, I have a filtration only consisting of value of notorious rips complexes. Yes, no, you're absolutely right. This is where my sort of hand-waving explanation breaks down a little bit. I just wanted to make this easier for the listener. So of course there is a threshold that makes it into a notorious rips complex but the notorious rips complex contains all the edges of the triangle, that's true. Nevertheless, if we have a filtration, we can pretend in a sense that these simplices are all that, right? And we have to define, we just have to define which simplex precedes which other simplex. And then we can still do this calculation, right? Of course it's a matter of preference whether AB comes before BC, for example, that's still a matter of preference. But notice that this does not change the end result of the calculations. But you're absolutely right. It's like, this is where this intuition breaks down, yeah. Okay, thank you. So in this case you're adding, you say you add AB and you put a one and a one there because AB is destroying A and B. Right now, I'm not okay. So what's that before? Now you're adding, or now you're adding, at this point you're adding BC and you're destroying B and C components. Something like this. Actually, I have to correct you here. So this is just the boundary. So this is not about destruction. This is more about saying the edge BC consists of the simplices B and the simplex C on its boundary. So this is just keeping track of the boundary matrix. So this is more like evaluating the boundary operator for all the simplices that we observe. Okay, and then how does this reduction work then? Reduction is the other step. So if we take, let's now move here. So if we take this whole boundary matrix, this boundary matrix now captures all the boundary relationships in the, in the simplexial complex. And now we can start reducing it with the matrix reduction scheme. And this matrix reduction scheme, this would lead a little bit into very, very deep words into very, very deep theorems, but essentially it's related to this idea of a normal form, of a Smith normal form. This is like, I'm sorry that I can't give any more details here, but we would really have to uncover a lot of the topology here, but essentially it mimics this idea of looking at features that are created by certain simplices and of tracking them along the filtration. So basically we do the semi-magical method and then we get the result of the semi-magical method, gives us a matrix, which we can use to read something out of about the structures that are created and non-created. And why this magical result matrix is giving us this, these readings and why we are able to read this out of it as we do. That is what you said a little beyond the chorus. Yeah, I'm really sorry about this. This is really a little bit unfortunate because we would need to, then we wouldn't be, well, no, we would be finished by six PM anyway, but we wouldn't cover the interesting machine learning part. Yeah, sure, sure, sure. So this is kind of like the trade-off that I make, but you're absolutely right. No, no, don't be, I mean, this is, you're absolutely right. This is kind of the trade-off that you have to make here. I can only offer some intuitive hand-wavy explanation in terms of gaussian elimination, where you just pick the, where you just try to, you try to make this matrix into a matrix that consists of kind of independent columns and this is why you're looking for these lowest ones, for these lowest entries that are the same because having two entries, the same there is kind of weird because it means that you could theoretically express one column by the other column and you want to avoid that. So you want to find out how many columns there are in this matrix that are really independent from each other. Does that make sense? Does that help a little bit? Yeah, maybe sort of a gut feeling, yeah. Yeah, I mean, yeah, this is kind of the thing that I'm aiming for here because otherwise, I mean, we will, otherwise we won't be able to like skip to the actual part of the... So you're kind of getting, trying to get, find out where the independent features are like a circle and something like this and once you get to this matrix which kind of represents those independent features then you are able to read them out more easily from the matrix sort of. Yeah, yeah, exactly. So we're trying to look at how the filtration changes our space or how the filtration gives rise to certain topological features. And for this, we need to figure out which features are actually independent in the complex and which features are related using this creator-destroyer relationship. And usually this is a very large matrix and this Ripsa library is able to do that pretty fast but as I understand, not by changing the runtime complexity, right? But just being fast, but it improved the constants. Exactly, yeah, absolutely, yeah. That's a very succinct summary. So of course it cannot change the nature of the universe. So certain operations take a certain time but what it does, for example, is it tries to have a smart order in which columns are being added, things like this. And then you can have smart data structures that are keeping track of these things. You can also, in one of the implementations I think but I'm not sure whether Ripsa does it too, they have a delayed cancellation. So they wait for a certain amount of operations happening to a column before they actually look at what is going on in the column because they think that it's easier to do this. Let's say you add the columns 10 times to each other or something like that and then only after the 10th time you look at what is actually coming out of there. And if you do this, so all kinds of careful hacks I would say that are really well thought out and really smart and they make it possible to make this calculation really, really fly. Whereas if you try this in a very naive way, it's going to take a long time. But yeah, this is what Ripsa does for you. And the great thing is that it only requires a distance function on your data and we will essentially see in lecture number four where we have the machine learning applications, we will see that this is all you need to calculate persistent homology. You only need distances in your space. So you don't even need the actual objects. You only need a distance matrix. But the whole thing is then sort of quadratic in the, or it is quadratic in the size of the matrix. And since this kind of explodes with the number of features this is the problem, right? Yes. If I add more data points, I get sort of like probably something like exponential number of features and then it's square over that because the matrix is squared. So this is where the bad stuff comes in. Yeah, exactly. I mean, this is very much putting the finger in the wound. By the way, you should see this, you should see the lecture slides for number three now, right? Just checking. Yeah, we see them. Okay. So this, yeah, your matrices get bigger and bigger. And this is also what I meant by the scaling property. So this is a little bit different from the usual scaling that you would get in let's say batch processing for deep learning, right? So topological methods essentially scale worse with increasing batch size instead of better because you have to account for more interactions. Thank you. Yeah, you're welcome. Thanks for being so interactive.