وأقول في القرآن ما جاءت به آياته فهو الكاريم المنزاله وأقول قال الله جل جلاله والمصطف الهدي ولا أتأوله الحمد لله رب العالمين له الحمد الحسن والثاناء الجميل وشدوا الله إلا الله وحده لا شريك له وأشدوا أن سيدنا ونبينا محمد صلى الله عليه وعليه وعلى آله وأصحابه والتابعين لهم بإحسان إلى يوم الدين أما بعد إن شاء الله تعالى في هذا الفيديو أريد أن أتحدث عن اختلاف الهما والشهوات والأماني ومختلفة ومختلفة في الناس ومختلفة ومختلفة ومختلفة والسه moving ومختلفة ومختلفة ومختلفة ومختلفة ثانيا نبهه ثانيا ومفاوط ثانيا خلقació ثانيا عزيزه يخطي ينقذ على أسلسلتي نحن if you look at the snake it takes the whole that are made by other creatures because the nature of the snake is that it loves to oppress if you look at the qurab the crow for example the crow يتبع الجيف يترك في المخطل عالقنا، يحكي حد وجه لن أرد وجه إلا تطلق حياته لأنه سعد أن يترك أبداً من المتبخ ، جميعاً وافواح بيديار لا يقع إليه على الحي لا يفكي هذا عادي يحبان يأخذ حياته ويأخذ حياته ويمتلك بيديار ويأته لن يأكلوا لك the lion will never eat something that stayed around he loves to eat fresh meat you look at the elephant for example the elephant what does it do? it brings out what's inside and it keeps chewing on to that until it eats it and then it brings it back and he eats it the variation in those animals the aspiration is different if you look at the beetles ومن الانسات تعنين some one the fly for instance you hit the fly it comes back again you push it you get rid of it it comes back again it doesn't give up الله سبحانه وتعاله He created those creatures differently gave them different aspiration and the same is present in the humans I'm now going to mention a story عبد الله ابن عمر رضي الله تعالى عنهما العروة ابن زبير ومصعب ابن زبير وعبد الملك ابن مروان كلهم يأتيوا one day بفناء الكعبة they sat down in the ka'ba one day عبد الله ابن عمر عروة ابن زبير مصعب ابن زبير العبد الملك ابن مروان as they were sitting in the ka'ba مصعب ابن زبير he said to the rest of them he said to them let's all wish for something and then they all said to him since you're the one who's saying it you start for us and then he said me I wish I want to be the leader of Iraq وتزوج سكينة ابنة الحسيني and I want to marry the woman سكينة ابنة الحسيني I want to marry Sukena with Sukena I also want to marry same time وعائشة بنتة طلحة بالعبيد الله طلحة بالعبيد الله from the 10 المبشرين بالجنة the 10 that were promised general life I want those two women to be both my wives فنانا ذلك he got what he wanted he worked towards it and he got it he became the value of Iraq and he did marry Sukena ابنة الحسيني and he also married عائشة بنتة طلحة بالعبيد الله he married both of them 500,000 درهم was their marriage and he also spent that much to I mean make them a place to live a place a house so he had the funds and the money and he was looking for it عوروة ابن الزوبيرن he said what I wish for is الفق I want to be a fakih ويحمل عني الحديث and I wish the people can come فنانا ذلك عوروة ابن الزوبيرن became 7 فقها of مدينة دبوتي سر إذا قيل من في العلم سبعة أبحرن روايته ليست علي العلم خارجة فقوله عبيد الله 7 from them is عوروة ابن الزوبيرن 7 major فقها of مدينة when you look at حديث بوكس بخاريا المسلم أبي داود ترميلي بالمجال you will find عوروة ابن الزوبيرن he used to enter on to his auntie his maternal auntie عائشة رضي الله وتعالى عنها he would ask all the questions that he wanted to acknowledge from her he got what he wanted عبد الملكي بن مروان he said I want to be the خليفة المسلمين I don't want willaya I want a Khalifa he got what he asked for and عبد الله المعبن he said I want Allah to give me Jannah and we hope Allah سبحانه وتعالى and we wish for him that Allah gives him what he asked for so keep in mind my beloved brothers and sisters the variation in all of those men what they asked for some asked for dunya and a woman and wealth and عبد الله he asked for jannah and also عروة ابنو زبير he asked for the knowledge of the religion which is a means to jannah that's what Allah تعالى he varied between the people قوتيبة ابنو مسلمين he one day said to حسيني بن الموندر this is me showing you the variation between the people before I go into قوتيبة ابنو مسلمين when he said to حسيني بن الموندر I'm going to mention a statement that عمر ابن عبد العزيز رحمه الله said عمر ابن عبد العزيز that he said عمر ابن عبد العزيز that he said I have a nafs that is eager hungry and thirsty that's the type of nafs I have he said طاقت إلى فاطمة منت عبد الملك my nafs فاطمة منت عبد الملك فاطمة منت عبد الملك بنمر واحد when I was making the du'a'a at the haram is her father فاطمة I wanted to marry her فتزوجتها الله gave me I achieved what I was looking for and then he said وطاقت نفسي then my nafs wanted إلى الإمارة to become a governor for when later I became a governor وطاقت نفسي إلى الخلافة and my nafs desired to go a bit higher than that not to be a governor now to be the خليفة المسلمين and I got what I wanted فأدرقتها وقت تاقت نفسي الآن إلى الجنة now today my nafs all at once is jannah فأرجو I hope أن أدركها إن شاء الله عز وجل I hope that الله عز وجل allows me to reach that level of when it comes to the people's شهوة and the amani and the himm عمر عبد عزيز he wanted who he wanted فاطمة بنت عبد الملك then he wanted the إمارة he got it then he wanted the خلافة he said I got it now I want jannah now I want jannah now I want jannah he said to him what is happiness what is joy he said ودار قوراء and a spacious spacious house وفارس a horse مرتبط بالفناء a horse that's tied in the front a porch of the house happiness for him is that that shows you that type that's his aspiration وقيل لبعض الحكوماء it was once said to a wise man تمنة wish for something hope for something say what you want and then he said محادثة الإخوان the dialogue the conversation between me and the brothers وكفافا من عيشن يصد خلتي and I want to have enough life I want to have enough wealth that gets rid of poverty for me ويسطر عورتي and conceals my private part وانتقال من ضلن إلى ضلن and moving from one shade to another shade the heat of the sun I don't want it and what he wished for محادثة الإخوان brothers to talk to and to be content or to be given wealth enough that gets rid of my poverty and my needs and also covers my private part clothings that cover my private part وانتقال من ضلن إلى ضلن and a riding beast from that covers me from one shade to another وصيت طرفة تمنة wish for something وانتقال مطعم الشهي good food وملبس دفي and good clothings ومرقب وطي and a good riding beast that's the type of aspiration he had that he asked for وهكذا تتفاوة الهمم and like that as you can see it's people's aspiration and desires difference فقلوا يعملوا على شاكيلة ولي كل مجهة وهو موليها everyone works towards the way he is and what he likes and what he enjoys that's where his aspiration goes towards يصور عبد الله عبد الله عبنه عمر وابي الله تعالى عنه منشن مصعب ابنه الزبير عبد المريك ابنه مروان وذي ست ان شاء الله تعالى I'm going to stop there بإذن الله الكريم anything which I have said that was wrong it's for me الشيطان لله his message I bought free from it سبحانك اللهم وبحمده أشدو الله إلهي لله أستغفروك واتوب إلي السلام عليكم ورحمة الله وبركاته how can you do a two second action now that will give you a share of the reward of everything we're doing on this YouTube channel simple like this video and click subscribe why it will allow YouTube to recommend our videos to other users and imagine the huge amount of reward that could be waiting for you on the day of judgment if you did that with a sincere intention of spreading the Dean of Allah you'll be rewarded for every single person who benefits from one of our videos as a result of your like or subscribe that's an easy two second action that you definitely don't want to miss out on do it now click like and subscribe and don't forget to make that intention


Some announcement first, we have the bags, laptop bags available at the registration counter for 1200 rupees and the t-shirts for Picon India will be distributed at 1230 at the same place and for open space talks, there are two slots still available you can register in the main lobby and also there are, you can register for lightning talks as well. And yeah, today we have with us Indradhanush Gupta and the talk is avoiding common pitfalls of dead time from Avivabh's perspective. Hi, I am audible right at the back. Okay, thanks for coming up. So yeah, like he said it's about avoiding common pitfalls of dead time. So basically the stock is going to cover off the difficulties we generally face when we are working with dead time objects. So the target audience, beginners in Python. Why beginners? Because dead time to beginners is like an opaque ball like you cannot see inside it. You don't really understand what's going inside it and you're actually very scared of it. Like I was very scared of dead time when I was starting with Python web developers. You build a website, you need a dead time, right? Like it's one of those things like when we were young parents and teachers used to say like kahibi jao, you need maths, right? So it's like that, like in programming kahibi jao, you need dead time. And basically anyone else. So why the stock? Dead time is the values, right? Like I said, and again, like it's not obvious from the beginning, where could you go wrong, right? Like when you were starting to work with dead time, you don't really realize that you're actually making a mistake. You only come to understand that you are maybe making a mistake when you have some real data in your hands and then some guy is complaining, hey, like this is not working for me or what. And basically I'll be sharing my own experience. Like this is stuff that I just learned after failing myself, like where are things that could go wrong? Just about fixing those stuff. So dead time, right? That's the, it's shipped with the standard library in Python. Few terminology is before I begin, really. So naive versus aware. So naive, dead time is an object that doesn't really have a time zone info with it, right? Like time zone as in, in standard time, UTC, whatever. So let's just take a look. Like if you take out the first line over here, right? From dead time input, dead time. So if I print this naive dead time over here, you can see that it specifies right down to the micro second resolution, right? But it doesn't really give you an information as in like what time zone it is.  Now tell me where I am. It doesn't make sense, right? Like I could be anywhere. I could be in India. I could be in Australia. I could be in US. So basically you should always be attempting to use date times with time zone. Like if I call you up and tell you that, hey, it's 12 o'clock in IST. So you'd know that even if you're in the US, you can basically use the time zone conversion to find out like, okay, then what's the equivalent time in my, right? You can just like, if you need an aware time zone, aware date time object, like all you have to do is pass the time zone to it, right? I'll come back to it in a while. So if you take a look right at the right corner, it has a plus 00, right? Which indicates it's in UTC, okay? Date time storage in Postgres. So when we are building a website, right? You cannot really live without a database, okay? And my talk is basically centered around the web app, the difficulties you face when you're building out on your web app, okay? And in my demo, I'll be using Postgres. So, okay, so this is the Postgres shell of my demo app that I have created, okay? And in my demo app, all that I have is, I have a table, okay, this is not, yeah, okay. I have a table that is named access keys, okay? So what this basically does is, it's telling you what the current time zone is for Postgres itself, okay? So when I do show time zone, Postgres is telling you, Key Boss, I am configured to use UTC. Well, you can change this. Actually, before that, let's see this. So what I'm basically doing over here is, I'm just displaying the one of the datetime fields that I have in my database, okay? So if you just take a look, no need to look at all this gibberish. Like just take a look at the plus 00, right? And maybe if you want to look at the first column. So it's like 1735 at plus 00. Actually, let's do a little bit. Sorry about this. So what you can do as well is, you can tell Postgres, Key, dude, I'm living in India. I don't want to see datetime in UTC. Like that doesn't make any sense to me. So what you can basically do is you can configure Postgres to use any other datetime, any other time zone, my bad, okay? So what I'm configuring here is basically to use the Indian standard time zone, okay? And when I display all the created attributes, you can see that if you remember it was 17 something, right? 1700 hours. So it's 23 plus 530. So it's basically converted into IST. But important thing to note over here is Postgres is always going to store your data in UTC. I mean, that's the default standard, right? Like whatever time zone you are, it stores it into UTC. Whatever time zone you need, it will convert it into that time zone and return you that object, okay? Should I ever use a naive datetime object? Well, to be honest, no, never. Frankly, when you give someone a naive datetime object, it actually makes their life very difficult because they have no clue what moment in time you intended, right? So you guys must be knowing about epoch, right? How many know about epoch? Okay, so epoch is basically 1970 first-gen, 1970, okay? And datetimes are measured in seconds since that point of time. So we measure that, so we name it as epoch. And so any datetime is, sorry, okay? Any datetime is basically seconds since 1970 first-gen, okay? So any datetime await object is actually representing a specific moment in time, right? Doesn't matter if it's UTC, if it's an IST, if you have the time zone information available with it, you can basically derive a meaningful relationship out of it, okay? PyTZ, right? Like in one of the slides, you saw something called PyTZ.UTC. So PyTZ is a third-party library which is actually, I found out to be very handy. So there are many, more than a couple of actually third-party libraries. So PyTZ is something I found out to be very handy because, I'll show you. So even though I'm telling you to use an await datetime object, not always will you have a time zone aware object, right? Let's say you are taking input from a user. Now of course you don't expect a user to enter plus 05 colon 30, right? So you have, you'll maybe use their IP address or whatever, right? To determine the time zone. But you still have a naive datetime object. So at times, you will have to add time zone information to a naive datetime object, okay? So to do that, basically, okay? This is the naive datetime object that we have from one of the previous slides, right? Now this is IST. So what I'm basically creating is, I am creating a time zone instance so that I can add it to a naive datetime object. So basically all you have to do is IST. So in right here, right? You can see that I have a IST datetime object. All you have to do is do IST.localize and basically attach the naive datetime object. So what you are effectively doing is adding time zone information to a naive datetime object. So if you take a look at the output at the bottom of the screen, like just compare the one at the top and the one at the bottom. The time is still the same. That's what I said, right? Like if you don't have a time zone information, I cannot do any conversion. The best I can do is add a time zone. So if I still add UTC into this, it's going to be 00. Converting datetime to another time zone. Your users will be in India and you will be in UTC, right? So the problem over here is that you cannot show a guy living in the US, a time respective in India, right? It doesn't make any sense to them. So all you have to basically do over here is you have an await datetime object, right? All you can do is like do an as time zone and insert the time zone information. And what happens is you can convert the object into the relevant time zone. I'm running a bit short on time. I'll just skip a little. Do not use datetime replace. So one thing over here is why not use replace? So you can actually replace the time zone information in an object by directly calling the dot replace method. So let's take a look. I have a UTC object over here and basically I can do a UTC dot replace and TZ info is equal to IST, right? Now if you note over here like look at the right hand bottom screen. The offset says as 0, 5, 53. Now we know IST is 5, 30, right? Like isn't that incorrect or something? Well, not exactly. I'll tell you why. And the offset of course is 5 hours, 53 minutes, right? So let's time the, let's try the method that I showed. So what I'm doing over here is I have an intelligent datetime. I'm creating it using UTC now dot as time zone. So if you take a look at plus 5, 30. So you have plus 5, 30 at the end, right? So the problem over here is that back in the 1900s, the time offset from UTC was 5 hours and 53 minutes. But replace doesn't know about this, okay? So if you have a datetime object in 1900s, as time zone is going to apply the time offset to 5 hours and 53 minutes. And if you have a datetime object more recent like 2015, the offset is going to apply as 5, 30. So like in the 1945, if I'm correct, India was also using daylight saving time, okay? And so the offset over there will be plus 6, 30. So it's, so you don't know what time the user is going to give you, right? So you have to handle the use cases accordingly. There you go, like you have the UTC offset, right? So if I use an old date over here, just take a look at number 12 right here. Old date is something in 1900s, right? And when I convert it using as time zone, the offset is 553. Okay. So some examples from production, right? So if you take a look at this pic over here, basically what I've been talking for the last 15-20 minutes, right? Guy sitting in India, he uploads at 530. Your database should be storing it in UTC. Guy sitting in US at PST, he can read it at 5AM PST like, he's like, okay, this guy uploaded just now. Like if he's awake at 5AM, okay, this guy just uploaded that right now, right? So at UTC 530, the equivalent time if it is 530PM, if the time is 530PM in IST, in UTC it is 12PM and in PST basically UTC minus 7, that's 5AM. So now you know like why you should be always using UTC itself, right? Because it's a standard common point where everything comes and converts into UTC and anything that goes out, you can basically convert into respective formats. Freeze gun. So a lot of times you'll have to be testing code, right? Which is dependent on daytime objects. Now an example, let's say you have access tokens, right? Like in APIs we have access tokens which you want to expire, let's say, you want to expire access tokens older than 30 days, right? Now you need to write test for this. Obviously you can't run a test for 30 days, like start the test, wait for 30 days to pass and then try to call your method that deletes it and see that if it is actually deleting it or not, right? Not very feasible. So what you should be doing is you use freeze time. What it does is, so if you take a look, we can use it as a context manager and so basically what it does is patches onto the daytime library. So what it's doing is when you call daytime, but now it's printing 2010 011, right? First January of 2010. So what freeze time does for you is it overrides the default value of daytime.now. You can also use it as a decorator over methods, right? Like the same thing, right? And decorator over class as well. The example that I was talking about, right? Now I generally don't want to put in a lot of code into this, but this is something I couldn't really avoid. So what I'm basically doing is over here, I am taking my limit as I'm going back 30 days from today's date. Like if today is 4th of October, I'm going 30 days back and what I'm doing is I'm taking out all access key objects from the database that are older than 30 days, okay? And what I'm doing is basically marking them as expired. So now this is the method that you want to test, right? And how to write test for it? If you have a Django test case like this. Now I want to create an access key object that was created, let's say 30 days back, right? Like about 4th or 5th September, right? So what I do is I freeze time as 1st January of 2015. So what I do is, when I do objects.create, now Django has this utility, like daytime objects can be initialized as the current time. So the current time in your system right now is going to be 2015 1st January. You cannot escape it, like inside the 1st with block. So if you come to the 2nd with block, what I'm basically doing is I'm changing the time to 31st January, okay? So now what I can do is I can create, I call the same, create call again, right? And now the created at time is going to be 31st January. So basically at like in one test, I have 2 objects that were created apart, 30 days apart, right? And if you like run an assert equal on this, like I can check that there are 2 instances, right? And then what I'm doing is I'm basically calling the method that I've defined above, right? And so once it's done, all I'm asserting is if life keys are equal to 1, like what I'm doing is I'm just checking out if it actually did pass the test, right? And it would work. How much time do we have? Sorry? 18 minutes I have? Okay. Oh, that's a lot of time. Fine. So date time dot time delta. So these are some stuff that you should be generally using in a lot of places. Like let's say your user wants all records in the last 30 days, right? Now, this is very tricky. 1st January to 30th January is very easy. What about 15 July to 15th of, from 15 July to last 30 days, right? I don't even remember if June has 31 days or June has 30 days. Not do you need, not do I have to write the logic to parse out if it has 30 days or not to make matters worse across leap years, right? If I want to check in the last six months and 2014 and 2015, if one of them is a leap year, how do you do it? So you do it with time delta. What time delta is basically is basically it's a difference between two times in seconds. But the library basically gives you some added information on like what's the difference. So what I have here is basically a date object, which is 3rd October. And so if I go back, want to go back by two weeks, what I have to do is date minus time delta weeks of two. So what it does is so it's roughly the same, right? Like so this library handles the intricate details for you. So you should really be using time delta a lot more often. You can even go back in days and it also gives you resolution up to hours, minutes, seconds and write down to microseconds. But if I want to go back by years and months, right? That is not something that time delta provides you. So we have relative delta. And actually it's a third party library, date it is. So what it does for you is again I have another date object, right? So what you can see is all I am passing it here is, Key Boss take me back in time by two years and six months and it's going to do exactly that. Like it's going to handle if there's a leap here or not, if there was any whatever, if there was any odd difference in time, if there was a leap second or not, it's going to just handle it for you. A lot of times you will also be getting input from the user. Like the user is entering the time in the browser, right? And you don't really have a Python object at the browser level, correct? So when I have it as a string, now it gets very difficult to convert it into a datetime object. I mean it could be very error-prone. So what I use is datetutile.parcel. What it does for you is it handles all the different formats. So you can see here, right? Like I send it a string in 2015-11, it's going to return you a datetime object. But again, you didn't pass it any time zone, so it's not going to attach any time zone to it. If you pass it 2015, it's going to assume by default that you're talking about 1st January. I'm sorry, you're talking about the current date on your system, right? Like if today is 4th October, which it is actually. So if you just pass it 2015, it's going to add the date and month to it. Well, you can actually pass it time zone information as well. And you can also pass it different time zones. Just the same example in UTC. Okay, we've come back down. Have you done? I think, yeah, I'm done. So that's it. Questions? Sorry? Right? So parser? Sorry, if you... Will it? Okay, so I actually don't know what the output of 1 will be. But if you enter, let's say, hello, it's going to raise an exception, like invalid format. Yeah, so you have to handle that in your code, right? Exceptions are something you have to handle. Okay. So parser is basically for converting strings to datetime objects, not the other way round. If you want to convert datetime to string, you need to be using strf time, basically string format time. You can actually use strip time in case of parser as well. But over there, you'll have to enter the formats like %y, %m. But honestly, half the time, I'm confused if %m capital is for month or %m capital is for minutes. Again, very confusing. But parser handles it all for you. You want to throw an error if the guy enters 2015. I guess you'll have to do it yourself. It's a library feature, right? That's a good thing. So if you want to go around it, I guess you'll have to do... You'll have to check if it's only the year has been passed or not. Like you have to manually check if the... Correct. In Django, we use the datetime fields and we give a default value. There are two options we can give. One we can give default equal to datetime.now. Or we can give Django's utils timesout.now. And is there any... What is actually doing the difference between these two methods? Can you tell me about the second one? Timesout.now. Timesout.now. Yeah. So in Django.utils.timesout.now? Yes. I haven't actually used it. So what I do in datetime objects for Django is... Django gives you two args. Like you can pass auto now equal to true and you can pass auto now add equal to true. What it means is when you pass auto now equal to true, that is every time the object is updated or even created, it's going to update that field, right? So it's very useful for fields like updated add. So you don't have to manually enter, get the datetime.now and do an update. So what you can do is like you have updated add as a datetime object and you can pass created add equal to true. The other thing you have is, sorry, auto now equal to true. The other thing we have is auto now underscore add equal to true. When you do that, what happens is it will only put the current time when you are creating that instance. So it's, so you have very easily you have created add and updated add. In Django's time zone settings file, in settings.py, you have the settings, time zone settings. You give, there is options like giving the time zone address UTC and we give the same UTC equal to true. And when we give UTC and we are running a program and actually when we are using testing, we will get the time object as UTC, mostly. But for checking, we use the, to get our own time zone, we give Asia Kolkata instead of UTC. Come again? To get the time zone value of our current India, we give, replace the UTC with Asia Kolkata. Okay. But when we want our website to continue production, it is accessed through the countries and how Django is actually deciding time zone to use because time zone is given at the settings. So what you have is, so in your settings, when you define the time zone, that's the default time zone that Django is going to use until and unless you specify explicitly. So if you are fetching instance, created at instance from the DB, it's going, so if you've set the time zone setting as UTC, it's going to return in UTC. If you're given it as Asia Kolkata, it will return you it in Asia Kolkata. But internally, like for Postgres at least, it's always stored in UTC by default. Hi. This is Gaurav here. So I just want to know, like if in our database, so the value is stored in UTC, the date time. And in my website, I want to show that time. So I want to show that time on the current zone. So like if I'm in India, I want to show the same time to convert automatically in IST time and show to the some website or something. And if I'm in the US or in some other zone, the same database entry I want to show in the current zone. So how we can do that. Exactly. So you would know what time zone the user is in, right? Yeah, that is the thing I want to know. So you'd know, right? No. If I'm anywhere, I just want to know, there may be some function or there may be some method from where we can get the current time zone and then we can replace. From the current time zone. For that, you have to use like actually, this thing called GUIP, like you try to determine the current time zone and the user using their IP address and all. So that PYTZ is not doing that? No, PYTZ is in the Python level, right? So what PYTZ does is, you tell PYTZ, boss, this is my daytime object. This is my time zone. I want you to give this daytime object in this time zone. So I have 2015, 1st January. Okay. And I have a time zone IST. I want the equivalent of 2015, 1st January. Okay. So one question here. So if you have a client server application and you want to sync time between the client and the server, do you have any suggestions? So there are time servers to sync up with, right? So actually, I didn't get the complete question like, when you say sync, do you want the server to be like, just can you explain it better? Yeah, so what I'm trying to say is like, I have a client and server running at the same time, but they may be in different time zones. Okay. And basically I want to sync up like, when the client is running for whatever time duration it ran, the same time the server was also available. So we're basically mapping time sync between both of them. Okay. So is there a way to do that?  Yeah, like it's actually what basically you have to do is like, the client is going to say that, my current time is this, what's your current time, right? And the server is going to tell me like, okay, you are at 2015 1st January, I am at 2015 2nd January. And the client being a client should be accepting what the server is saying like, it's always like, right, so server is right. So, okay, like update the time. So it's actually not related to date time. It's more like about TCP communications. Okay. Thank you. Thank you guys.


Everstate Governor Yasambuike has charged the judges to live up to their judicial oaths in the discharge of the function saying that ineffective judicial performance was due to a lack of character and courage on the part of some judges. The governor justified his call with a prevailing political uncertainty in the country, which has brought democracy and the rule of law on a constant threat. We can give the charge in a boujant yesterday on the launch of the book Legal Power Dime in Nigeria any direction in the study of law and practice in honor of retired justices of the Supreme Court justice Abdul Aboki. The state are too blurry to be ignored. The federal government continues to undermine the rule of law while the political parties and party leaders continue to exhibit utter arrogance and disdain for the electoral laws and the inquiry process and their actions and cornered goods, crimes, injustice, discrimination and inequities everywhere and with the rise of instability and iteration of law and order. Only the only sign would believe that Nigeria is not for the harbors. Let's be frank with ourselves. The federal government has failed in its duties to secure the country. My plan is to make working of all citizens, which is the reason for the heightened sense of frustration, conflicts and violence threatened to tear this country apart.


So, good morning. So, we will continue with our study of climate sensitivity and climate dynamics correct. What is that? So, what is the problem we considered in the last class? Problem number? 50 50 was it is solar flux reaching the earth f s equal to sigma t e to the power of 4 where t is equilibrium temperature considering the earth to be a black body that turns out to be 255 Kelvin. Therefore, what do you get? 1 by t e d t e by t e this is correct, but we know that this is also equal to, so if you look at this, this is a very fine distinction, t e is the equilibrium temperature of the earth, t s is the global mean surface air temperature okay, but the rate of change in the global surface air temperature with respect to f that the partial d of t s with respect to f will be the same as d t d t by d f s in the case of I mean there is no feedback from other things. So, basically the temperature as such is a consequence of the solar radiation coming in and the emission that is a basic that is a basic assumption from then like a pizza you add on toppings are there those toppings are water vapor feedback carbon dioxide feedback base is something is coming otherwise earth will not get heated at all something is coming and something is emitted back that equilibrium causes some basic temperature. Now, we are trying to see what is the sensitivity with respect to change in some of this forcing if that f s itself changes what happens that is are you getting the point instead of the 239 watts per meter square it becomes 240 watts per meter square what will happen okay. So, everything is benchmarked with respect to the change in that f s, so that is that is how we define the radiative forcing okay. So, how much was this 255 so the sensitivity has got the units of Kelvin divided by watts per meter square it looks like the units of heat transfer coefficient watts per meter square per Kelvin correct mechanical engineers will it will ring a bell these are units of H okay do not get confused it is not it is far away from the H it is nowhere related okay it is it had some point I made some CRC complex kind of definition in the last class. So, the earth equivalent blackbody radiation sorry the earth equivalent blackbody temperature rises by 1 Kelvin for every 3.76 watts per meter square per Kelvin of downward radiative forcing incident of the earth from the top of the atmosphere okay now all these climate all climate change experts are trying to calculate what is the watts per meter square okay or I will just we can okay so we can you can leave it like this also one Kelvin requires 3.76 watts per meter square. So, all these climate change climate change and climate science experts are trying to figure out if the Albedo reflectivity changes how many watts per meter square if carbon dioxide changes how many watts per meter square what are vapor changes how many watts per meter square. So, you add all this and these forcing are generally are additive you calculate the forcing separately for calculating the carbon dioxide forcing you have to solve the radiative transfer equation what is the are you getting the point if the carbon dioxide changes how will the forcing change that is not so easy to obtain. So, what you do is you will you will solve the equation of radiative transfer in the atmosphere with 390 ppm and get one value then with 395 ppm or 400 ppm you will get a value and then find out how this changes with respect to. So, I will tell you later on that there is a relationship called ln of C by C0 into something that is how it changes with respect to carbon dioxide. So, you will have to do or you have to take controlled air you have to do I score measurements but you go deep into Vladivostok you go to Vladivostok where somewhere north I have right you go to Vladivostok and then drill a hole kilometers into the snow then get the I score in that I score air will be trapped then there is a dating formula will find out for that depth what will be the time period that time period that air will contain carbon dioxide find out what is the carbon dioxide concentration in the atmosphere at that point in time then the the funda that carbon dioxide concentration is universal then you apply that whatever is in Vladivostok or whatever is the same in Velachery then you reconstruct the carbon dioxide concentration though you do not have direct measurements before 1945 when some keeling set up that biggest laboratory to measure carbon dioxide in Hawaii is it okay that is how they these are all hardcore the whole scientifically established it is not like alchemy or some somebody's astrology or something it is not like that. So, this carbon dioxide concentration people are because normally when you say how are you confident how are you confident people who people who do not understand they will say how are you confident how did people measure carbon dioxide 100 years back where was the instrument 200 years back where is instrument all that air is trapped now now I have instrument then archaeology or paleo climatology can never be studied people have man has found out ways of studying the past alright so this is a very important this thing so something like this is called radiative forcing so two things for one Kelvin it is 3.76 watts per meter square and we are talking about radiative forcing not forcing by wind forcing by convection radiation is very important for climate convection winds and all these pressure distribution and all this orography topography all these things are land breeze sea breeze are important for weather what will happen in the evening what will happen in the afternoon all that is weather but compared to 20th century what happens to 21st century 22nd century is a bigger picture is a bigger problem so here radiation has to be taken into account okay now this is fine let us get back though we solve the problem in the last class I think now you understood it better right okay where is are you done I think you went all over the place you are not to be seen Bharat Darshan you figure out you ask him you get you do Delhi and Bombay Darshan if you are on a flight because normally the very difficult to get the ATC clearance you will keep on circling Bombay right free time is lost but alright okay I promise to you I will teach at least two hours of atmospheric dynamics but I forgot to realize that there is a very important lecture on climate change which I will have to which is a fast paced power point presentation which I will have to deliver tomorrow so we are just left with only one lecture for the atmospheric dynamics I will quickly give the governing equations and some simplification and tell you two approximation the cyclone approximation and the geostrophic approximation will solve a simple problem and then close the course that is a plan on Thursday tomorrow's plan is to bombard you with a PPD okay I will convert it into PDF and send it to you by tomorrow I will also send you the PDF which will which gives the schedule schedule whatever from 9 o'clock to 1 o'clock 1 o'clock Syrahul will come I think 1245 or this cloud seating two people are coming two groups so 1015 and 1030 so I will everybody has to be present okay you just cannot afford to come only for your presentation unless you have some this exam that exam and so you and you are at your creative best so if it's a genuine reason it's okay why are you late to class brilliant expression of creativity why are you late to class one two three four five seconds just come like a missiles okay for also just thrown off God how creative students can get alright now this we are looking at so DTS by this is the lambda right yeah what was the equation number for this one was it one we wrote it in one of the earlier classes two okay okay now see why is a TS is the global mean surface air temperature okay F is the forcing okay flux so this is this DTS by DF is how much the temperature will change if for a given change in the forcing that is a lambda that is a climate sensitivity right so we are qualifying the whole of climate with just one quantity what is it TS and climate sensitivity by one more quantity which is lambda okay climate means global mean surface air temperature sensitivity means with respect to forcing this has to be understood so this is a partial D is partial to a TS to partial F is basically when there are no feedbacks plus you add the feedback but the feedbacks were including auxiliary variables these auxiliary variables are carbon dioxide water vapor clouds all those things okay now this D y I by DF can be taken to be this is okay no this is some playing with calculus partial differentiation okay therefore plus sigma it is too much okay all right this is called the feedback factor it is qualified by subscript I where I can be 1 2 3 4 5 1 could be water vapor 2 could be snow cover 3 could be cloud cover and so on okay now F equal to this is that okay so we are able to relate we are able to calculate all the feedback factors get the sum of the feedback factors and call that as F and find out 1 minus F and then do the simple do TS by do F divide by 1 minus F you can find out the climate sensitivity of course this equation will cup with F equal to 1 that is all right that is okay but now some equation number for this so this is lambda naught this is lambda correct lambda is the sensitivity of the climate with feedback lambda naught is the sensitivity of the climate without feedback therefore lambda by lambda naught should be what conceptually it is a gain it is G right what is the climate sensitivity with feedback divided by what is a climate sensitivity without feedback so now from equation 10 it is clear that G is G is 1 by 1 minus F now provided F is less than 1 so F is greater than equal to 1 infinite sensitivity unstable so the challenge is to be able to calculate this F so you can use your zero order model first order model second order model and whatever you can use your full CFDT transfer model and all this if you do all this calculate this feedbacks and give projections and you are a climate science or a climate change expert okay all right so so much about climate sensitivity okay but we have not studied one thing so far whether it is the atmosphere whether it is atmosphere or the ocean it has got a finite inertia whether it is atmosphere or the ocean it has a finite inertia or you just change the forcing by another 2 watts per meter square the next second will the temperature change so there is something called the transient response and the equilibrium response even if we change that instantaneously solar load is changed instantaneously next second the temperature will not become 255 because there is a mcp of the of the atmosphere there is a are you getting the point there is a mcp of the ocean correct there is a thermal inertia so we will have to look at this response so then we will have to solve we have to solve a initial value problem now so we have to so the most simplified approach will be a considering it to be a first order system okay let us consider a simplified first order system and then proceed okay so this will be transient versus equilibrium response what do you mean by this F much much greater than 1 even small changes in the forcing can cause large changes in the temperature as a highly unstable equilibrium okay like I do not think we are in that situation now as of now yes as of now we are not in that situation okay it will not happen tomorrow or Wednesday or before the end sem I mean so okay so transient heat capacity of earth is very large hence PS shows a delayed response to change in F correct is the first point you have to understand so this is called the adjustment time for the atmosphere it is a few months for the ocean mix layer take a guess 73% 71% of the it is a few years it takes a few years it does not mean that we can be irresponsible what I am what we are saying is it would not happen overnight continental ice sheet it will take several centuries okay now we are going to consider an example we will consider ocean mix layer okay so I am not going to consider layer wise and then make it a big complicated problem there is a M there is a CP there is a temperature your baseline temperature of T0 and the temperature increase or fluctuation is the T dash the change now we are going to write a equation for this so okay this is okay okay so T dash the transient response to forcing which is the forcing which is the source term correct okay so if you are at a loss to understand what is going on okay so you if you're not able to conceptualize what is going on you take a bucket of water you're heating it in the hostel for example you want to take hot water bath there is a deeper heater okay it gives you a heating input of Q okay so this has got a mass of M and CP this mass can be heater plus wall plus water and all that let everything will be at one temperature now it is also losing heat by convection mass plus radiation also let's neglect that so the equilibrium response of this will be MCP DT by D tau equal to Q-HA into T-T as it starts getting heated this temperature increase therefore it will lose heat by convection but heat is continuously input so the curve it will go like this when it reaches a steady state this term will vanish that will be the equilibrium temperature of the bucket if it is more than 100 degrees you are finished when will it become more than 100 degrees you sit down without the water okay otherwise you can do your math and it will come to 80 or 85 degrees if you're using a 1 kilowatt I give this problem in one of the courses right which one was that you forgot heat transfer okay one of these courses now we are able to instead of the instead of the heater we have some change in carbon dioxide or something instead of this water in the bucket we have water in the ocean okay alright so you want to be able to solve this lambda is whatever your gain okay so we can bring the equation we can lambda is the climate sensitivity okay yeah please solve this what what what is that why is it negative sign the same equation minus T by lambda yeah because the forcing term will be positive this will be negative no you solve it we will see now please solve this equation let's do I'll answer your question that's okay now let tau be let tau be mcp into lambda therefore q dash by what will be right hand side q dash by tau into lambda by tau no problem so please solve equation 3 it consists of two parts the complementary function and the particular integral so then I land the solution will answer your question so you can also have it as q dash into lambda by tau keep it that way also particular integral is what is the particular integral for this q dash into lambda go figure out what is this particular integral that particular integral if you take the derivative the first time will vanish and we substitute then left hand side will be equal to right hand side then it is a particular integral all right is it correct Sneha I'm believing what you're saying okay therefore the can we proceed okay so T dash how do you get a now a is the constant at time T equal to 0 what is T dash at time T equal to 0 T dash is 0 because it's equal to the initial temperature T naught what is T dash that is why that minus T dash by this thing is coming now you got it if there is no forcing left to itself this will decay understood okay fine so at T equal to 0 0 a plus therefore q dash lambda okay so there will be a rapid response initially after some time depending on the time constant there will be a slow response when T tends to infinity we thought that if you apply a forcing immediately it will reach q dash lambda that q lambda q dash lambda will take a long time that T equal to infinity is few months for atmosphere few years for the ocean few centuries for the continental ice okay it is a characteristic time are getting the point so any first order system will behave like this so if you put the thermometer in the mouth doctor will not get the temperature immediately for him he has to wait his time constant is 2 minutes if you put a thermocouple you will wait for no change in reading for 10 minutes you will say it should not change by more than 0.1 degrees 10 minutes you will wait some experiment will wait for hours so there is a time constant for everything doctor will not get the exact temperature at the end of 2 minutes you'll get a reasonable temperature anyway it is Dolos 650 111 isn't it whether it is 101 or 102 okay all right so this nice right so you got how would it response also we have seen we have we saw the sensitivity and all this now what about the feedbacks I will give you some stats climate feedbacks and then we'll solve a problem and close what a vapor f equal to find point 5 people have calculated if f equal to 0.5 g equal to 2 very good so that you understood okay next cloud clouds contribute to greenhouse effect if the cloud cover is more than whatever radiation is going watch watch what I am saying very carefully if the cloud cover is more whatever radiation is coming back from the earth this cloud will intercept it and it will not allow it to go out okay so the cloud will continuously build up but correct that's what you're thinking but there is a the cloud will also reflect the sense radiation from the top if there is no cloud everything will come isn't it so the net effect is 0 clouds are not causing climate change otherwise big anti-cloud movement would have taken place. So is that okay the cloud also created by nature now why unnecessarily we had to trouble so net cloud forcing is I am not going to write it down net cloud forcing is there is some cloud computing also right so g is 0 okay so clouds are harmless ice albedo feedback it is very small it is not a cause for concern there's something called snowball earth where the earth when it's a tipping point is ice albedo feedback and make the whole earth freeze but we are not at that tipping point now but somebody who is taking the snowball earth if you reach that tipping point they will present that it will everything will work in such a way that the feedback will it's an infinite do loop it will repeat and this thing and then the earth will keep on it will like crazy it will build up ice and snow and all that but now we are not there so we are fine okay so no worry so the national logo of Australia you know is you know T-shirt what they were no worries Australia no worries Australia right so no worries ice albedo feedback the carbon dioxide feedback is dangerous it positively contributes to GHG greenhouse gases and people have figured out if CO is your initial concentration and C is your act is a new concentration 5.35 that is arrived by radiative transfer calculation if you do that then you have to add that F and then calculate the lambda and then you will calculate the G and so on okay now problem number 51 estimate the apparent climate sensitivity estimate the apparent climate sensitivity the apparent climate sensitivity is given by what do you mean by this T s at the temperature T s at one point in time minus another point in time divided by F at one point this is like the Desi way of otherwise you have to get get the curve and then calculate d y by dx and then so it is an apparent climate okay estimate the apparent climate sensitivity based on differences in T s and F based on differences between TS and F between the current climate based on differences in TS and F between the current climate and the climate 20,000 years ago and the climate 20,000 years ago called LGM the 20,000 last glacial maximum okay with the following data TS current minus TS LGM is 5 degree centigrade CO2 LGM 180 ppm CO2 LGM 180 ppm CO2 now 360 ppm okay change in albedo 0.01 that's all only 2 FX so can you proceed you can calculate this del F okay so numerator is how much 5 so the challenge is to calculate the denominator okay there are only 2 feedbacks carbon dioxide only calculate the carbon dioxide feedback 5.35 ln 2 how much is it okay 3 point correct 342 isn't it I already get this 342 okay 239 what is that FS run 239.4 what is the albedo of the earth 0.7 so incoming is 342 but what is contributing to sigma T to the power of 4 is 342 into 0.7 we have done this again and again in the problem that results in 239 okay so out of this 342 if again changes by 0.01 that is 3.42 so please add this so you're all becoming climate change experts now given the data you know how to calculate but this is coming from some model and all that you can improve your models you can consider interaction FX okay and then you can look at all these changes of 30 years 40 years 50 years you can put your current consumption of oils and this thing and CO2 emission all that then it will become a stud model now we are using a very simple model okay 5 by 7 point okay this is 0.7 what that's all what do you infer from this G is we solve the problem number 15 know it was 0.266 without feedback right that is 1 by 0.266 gives 3.76 for 1 Kelvin so this is the gain or the amplification of this amplification of the sensitivity because of feedback how much is this how much is it 2 point okay in simple English due to the 2 feedbacks the apparent sensitivity increased 2.6 times what was an original value of 0.266 which is coming because of solar radiation now 2 things have changed the reflectivity or the albedo has changed carbon dioxide has changed so if they are going at this level then we are in trouble but this is 20,000 years the time we are talking about is 20,000 years 5 degree centigrade but now next 5 degree centigrade many things will melt we lose surfaces we lose continents we lose countries and so on but it may happen much more before 20,000 years because if it has taken 20,000 years for carbon dioxide double from 180 to 360 now it is doubling at a mad rate 360 now it is 390 already in calculations you are doing 390 400 so I tomorrow I will show you a plot where carbon dioxide last 100 years just goes like this so all this so this 5 degrees is not a great thing but the time is coming down okay that is the problem I will stop here tomorrow we will run through a presentation I will give you a power point on climate change and then we will wind up the course on Thursday with just a very brief one lecture course on dynamics


So, now it is time to try and prove this result. Yes, any questions? Yeah, yeah, but we do not know that. We do not know that about the degree of the minimal polynomial. As we saw with the factor with the vector e 2, you did not have to go up to the third stage, right. You just hit it with i, then you hit it with a and you lost linear independence. What if there is an operator that loses linear independence for every element of the basis at a degree less than the order, the degree of the size of the matrix, then it cannot be, right. So, that is the point, right. Yes? They have exactly the same roots. Yeah, the multiplicities will be different. We will talk about that later, like till what degree you might have to go. So, so far we have seen that the roots must be the same, right. But what if you need to repeat the root more number of times in one of them than in the other? We do not know whether a particular root appears more number of times in the carpoly or in the minpoly yet. We have not spoken about that. We have kept silent on that so far. We will later on see that, we will actually prove the Kelly Hamilton theorem without using the determinant based proof that you might find in many texts. We will see when we have done all this in a few lectures from now, that indeed the minimal polynomial is actually the, as we already proved the generator for the annihilating ideal of A and the characteristic polynomial belongs to the annihilating ideal of A. And therefore, the characteristic polynomial must vanish when you pass on the argument A in it, which is Kelly Hamilton's theorem, right. So, it actually matrix satisfies its characteristic polynomial. So, now, if it belongs to the annihilating ideal of A, then of course, so if it is divisible, then of course, got to be divisible by the minimal polynomial. So, therefore, the overall degree of the minimal polynomial is at most equal to the characteristic polynomial and no more than that. So, all of that we will prove. We will see when we get it to a very nice form like a Jordan canonical form and so on and so forth, then we will see it very transparently. The proof becomes very obvious. For that, we need a little bit more work to bring it out or to flesh it out a bit more, right, yeah, yeah. But so far we have not said that this characteristic polynomial, we have not given you any reason to believe that this characteristic polynomial belongs to the annihilating ideal. Only if you know that it belongs to the annihilating ideal, then it must be divisible by mu. Then you could have concluded. I have not told you that yet. Now of course, if independent of this, if you use the determinant based proof of Cayley Hamilton's theorem, which we are trying to avoid and then you will know that this belongs to the annihilating ideal of A and therefore, it must be divisible by mu. And then with this result, you can definitely say that the minimal polynomial cannot have a degree more than n. Then you can say, but somehow you have to invoke the Cayley Hamilton in between, but we are going to do it the opposite way. We are going to prove the Cayley Hamilton theorem later. So, we will not make any assumptions about this being the member in the annihilating ideal of A yet. They are sharing the same roots. No, but you do not know how many times they are sharing it, right. If this shares the root more number of times than it is here. So, the multiplicity of a root here is less than or equal to the multiplicity here. Then you can be sure that this fellow divides this and therefore, this belongs to the ideal. But so far we do not know if the multiplicity here is called actually the algebraic multiplicity. So, we do not know that the number of times a root appears in the minimal polynomial is strictly less than or equal to at most the algebraic multiplicity of that root in the characteristic polynomial. We have not proved that yet. So, that is why we have not given you any reason to believe that this is a member in the annihilating ideal as it turns out it will be, yeah, but that comes later. Of course, if you as I said, if you indirectly invoke Cayley Hamilton theorem from your past knowledge of determinants and the proof therein, then you can immediately conclude that. But we are going to try and avoid that determinant based argument here, right. So, what are we going to assume? Since these are two sets, equality of sets after all it is the same as like we use for subspaces because subspaces were also in the end sets themselves at the end of the day, right. So, we will show that this set is contained inside this set and also this set is contained inside this set and we shall be done. So, consider lambda belonging to, let us say, let us say we denote this by R chi A, the set. And let us say we denote this set as R mu A. So, let lambda belong to R chi A, which is to say that lambda is an eigenvalue, right. If lambda is an eigenvalue, then we must have the condition that A minus lambda I acting on V is equal to 0 for some V in V. Of course, this V is non-zero, agreed. That is the basic definition of an eigenvalue and eigenvector. So, it must satisfy this equation. If this is so, construct a basis for V given by B is equal to the first element you choose as this eigenvector, V. And then of course, you can extend it to a basis, you know that, right. So, then choose V1, V2, Vn minus 1. Now, if you want to get the minimal polynomial for A, through this basis, what should be our strategy? We have to find out mu V, mu A V, mu A V1, mu A V2, all the way till mu A Vn minus 1 and then take the LCM. What do you think is mu A V? What is mu A V? Yes, I am waiting for the answer. So, x minus lambda, right. But mu A V is equal to x minus lambda. We use a different color and use the dangerous term clearly. Why clearly? Of course, we have written that from the equation of this eigenvector. This is a polynomial, right. Matrix polynomial. If you look at the corresponding polynomial, it is x minus lambda. So, you need not go any further than I V, A V.  Therefore, if you now look at this, what can you say that x minus lambda divides mu A or in other words, x minus lambda is a factor of mu A, yeah. Therefore, lambda belongs to R mu A. So, anything that belongs to R chi A has to also belong to R mu A. So, any root of the characteristic polynomial must also be a root of the minimal polynomial. In other words, every eigenvalue must be a root of the minimal polynomial. But in order to show this equality, we have to establish that the minimal polynomial cannot have any root other than the eigenvalues. In other words, if anything is a root of the minimal polynomial, it must necessarily also be a root of the characteristic polynomial or be an eigenvalue in other words, okay. So, that is one part of the proof, right. This essentially means that R chi A is contained in R mu A. That containment is shown. You started with something in R chi A, you saw that it belongs to R mu A. So, the set R chi A must be contained inside R mu A, okay. Now, conversely, suppose lambda, of course, lambda does not necessarily mean eigenvalue. So, we are just using the variable lambda. Lambda belongs to R mu A. This essentially means that mu, excuse me, mu A x, the polynomial is something x minus lambda times some q x, of course, where q x belongs to the ring of polynomials, all right. What do you know about the minimal polynomial? It is the smallest degree polynomial in the annihilating ideal of A. So, we can be sure that if this is our candidate for the minimal polynomial or the generating element for that annihilating ideal, can q x be a potential contender for a minimal polynomial? No, because q x has a degree that is strictly less than the degree of mu. So, if q x would identically reduce to 0 when you pass on A instead of x, then q would have been the minimal polynomial, but it is clearly not, right. You had to go up to that higher degree, right. So, clearly q of A is not identically equal to 0. Do you agree with this? If q of A had identically vanished, then that would have been the minimal polynomial because it has a degree less than or claimed minimal polynomial. And we know that minimal polynomial is the generating element and therefore, the lowest degree polynomial sitting inside the ideal, right. So, q clearly cannot be a member of the annihilating ideal. It means that, so if you have a non-zero matrix, let us think of matrices only. If you have a non-zero matrix, at least its rank is 1. Can you have a non-zero matrix whose rank is 0? Of course, not. Similarly, you cannot have a non-zero operator, which pulverizes every element, yeah. So, if it has a non-trivial rank, there exists v such that q A v is not equal to 0. Please focus on this. What I am saying is, if you fail to find any v for which q A v is not equal to 0, it means that q A pulverizes every v. If q A pulverizes every v, then q A must have been 0. But if q A is 0, then q A would have been the minimal polynomial. But we know that we had to go up to a higher degree to get our minimal polynomial. So, q A definitely, there is at least one vector. If not more, such that q A v is not equal to 0. Now, look at mu A A acting on this given vector. For this v, look at or I shouldn't say this, it gives the impression that there is only one. For such a v inside v, consider mu A acting on v. What is that equal to? That is equal to q A. Let me just write that one first. It does not matter really. The order can be flipped, right? When you are taking a univariate polynomial and you are passing on matrix argument, the order of the multiplication does not matter. So, what I am going to write is A minus lambda i times q A acting on v. But what is this? The left hand side is 0, right? Because it is a minimal polynomial. So, mu A of A is identically 0. So, therefore, 0 acting on v is 0, which means that I have A minus lambda i acting on q A v equal to 0. Let us call this fellow as sum w, which means that A minus lambda i w is equal to 0 for w not equal to 0 implying lambda is an eigenvalue. That is the eigenvalue eigenvector equation. Therefore, lambda belongs to r chi A, right? So, we started with something in mu A, r mu A, it ends up being in r chi A. Earlier, we started with something in r chi A, it ends up belonging to r mu A, thereby showing both sided containment. And from this box result here and this result I am about to box now, what we know is that r chi A is equal to r mu A. So, therefore, the roots of the minimal and the characteristic polynomial, if you discount the multiplicities are going to be 1 and the same. If there does not exist such a v, then it would mean that q A when it acts on any vector in the vector space v takes it to 0. But we know that only the 0 operator does that. But q A cannot be the 0 operator, because then it would be the, then q x would have been the minimal polynomial. But we know that the degree of the minimal polynomial is 1 greater than q by the nature of the construction. Therefore, there must be at least one vector. Yeah, yeah, that is one of the fundamental flawed proofs of the Cayley Hamilton theorem. When you take determinant, okay, yeah, that is what elucidating on a bit. Because unlike what we are doing here with matrices and the matrix polynomials, if you are talking about passing on the argument, you will see that it is like apples and oranges. Because the characteristic polynomial results from is equal to determinant x i minus a. Now, if you are passing on x as an argument, what is this x? Look at this identity structure. It is x x x x x like this. So, what you are saying in terms of this multiplication? It is something like a chronicle product, what we have in matrices.  That is crazy, right? You cannot do such a thing. So, you cannot just plug in a i minus a i and then take its determinant like this. It does not even make sense, okay? So, it is one of the famous flawed proofs of Cayley Hamilton theorem that, well, you know, if you have a matrix, just replace it with a matrix a times i. But a times i is not the same as this operation we are doing here, yeah? It does not even make sense. Because you are passing on, you are operating using the determinant. It is not just a i minus a. You are using determinant. What is the determinant of something times a matrix times something? A scalar times some matrix and you take its determinant. You know that the scalar to the power n gets raised. But what do you mean? You mean by a matrix times something have then difference between two matrices. I mean, products of matrices you can still take determinants. But sums of matrices and their determinants, there is no such relation. It does not even make sense, as I said. It is a completely different operation. That is a very illegitimate proof of the Cayley Hamilton theorem. Do not even think about it. That is not how it works, okay? All right. No, no, no. I mean, you remove all the degrees by that.  No, that is not true. That is not true. The minimal polynomial does not unfortunately result from just taking one times every factor or first-degree factors like x minus lambda 1, x minus lambda 2. Sometimes within the minimal polynomial, you will have to take higher degrees. Yeah? Yes, yes, yes, exactly. So, we just ended up with x squared minus 2x plus 2. What is x squared minus 2x plus 1? But there is no guarantee that x plus 1 or x minus 1 would have been a minimal polynomial. In fact, x minus 1 might not have vanished, but the moment you add another, the scaled version results in a repetition. So, there is no reason to believe that just taking one copy of each will add up to my minimal polynomial. But that is a good question, because these are very deeply and intricately related to our fundamental question of when we are able to diagonalize and get the block diagonals to their smallest possible sizes. We will see the interconnections. It is quite interesting. So, next we are going to just see a very simple kind of a result, follows very straight forward. We have seen that for this chi A x is going to be equal to chi T inverse At x, right, which is to say that the characteristic polynomial is invariant under a change of basis. We use that property of determinants, the determinant of product is equal to product of determinants and we prove this. So, this was there. Now, we will see that even the minimal polynomial remains invariant under a change of basis. Why do you think that is going to be the case? Well, I mean how did we cook up the minimal polynomial? Just like we use the determinant for this. How did we cook this one up? Just think about the way it transpired. Rather, we are going to actually say a lot more than this. You see, what we are going to say is that the annihilating ideal of A or rather A is the same as the annihilating ideal of T inverse At. So, if we can manage to establish this, then the former follows from there, right. If it is the same annihilating ideal, then of course it has the same generating element, unique monic polynomial that generates the ideal. But why should this be true? So, these are sets of polynomials, remember. Everything that belongs here is a polynomial. So, anything that annihilates A, what can you say about it? So, suppose let f belong to the annihilating ideal of A, okay. It means that f of A vanishes. What about, so look at f on T inverse At. What is this action? After all, this is a polynomial. That is the one saving grace. It is not just some arbitrary function. And we have seen earlier that you take A and raise it to any power, okay. This is what? So, T inverse this is equal to T inverse At, T inverse At, like so, T inverse At. Because the fellows inside get pulverized. So, if I call this T inverse At at some A bar, this is what? A bar to the r is for A bar defined as T inverse At, right. So, what is this going to be equal to? Is this law going to be the same as T inverse pulled out from the left and f A from here and T pulled out from the right? We do not even need to go both ways. You start from f belonging to the annihilating ideal of T inverse At. It is the same, just the same. So, I am not even going to write that. So, of course, when this fellow is 0, this fellow is 0. Therefore, any member f that belongs to the annihilating ideal of this, yeah. Therefore, f belongs to the annihilating ideal of T inverse At. So, similarly, let G belong to and I leave it to you as an exercise to complete this T inverse At. If it has got to be 0, so if this fellow is 0, this is non-singular. If this is 0, you can hit the 0 with T on the left and T inverse on the right, because this is invertible. So, you will be led to concluding that G, I mean, I am leaving three dots for you to complete those steps and prove that G ends up belonging to the annihilating ideal of A. Therefore, the two annihilating ideals must be equal. So, this is a proof. I have left just three lines, three or four lines here for you to write, which means that the annihilating ideals are the same. If the annihilating ideals are the same, we are after all talking about the same object and the polynomial does not care about the change of basis then. So, whatever is the generating element of this is the same as the generating element of this. So, this then follows naturally. So, change of basis matters not, right? It is going to be very critical, because we are going to make choices of basis that endow the matrix or the operator with some beautiful structure, right? Which one? This part? This. So, if F A is 0, then this is 0. If this is 0, then T inverse 0 T is also 0. Therefore, F acting on T inverse A T is also 0. Therefore, F is an annihilating polynomial, right? If annihilates T inverse A T. Therefore, F belongs to the annihilating ideal of T inverse A T. But we started with an F that belongs to the annihilating ideal of A and it belongs to the annihilating ideal of T inverse A T. Therefore, we can say that the annihilating ideal of A is contained inside the annihilating ideal of T inverse A T. Then you start from the reverse direction and show that G that belongs to T inverse A T is annihilating ideal also answer belong to the annihilating ideal of A. So, therefore, anything that belongs here must belong here anything that belongs here must belong here therefore, those two sets must be one and the same yes sorry where we took this T out because after all F A is of what does it look like F A has a structure that looks something like this right F A because it is a polynomial it is a matrix polynomial. So, this has the form alpha i A to the i i going from 1 through some let us say some m. So, every individual term yeah every individual term is some A to the power r right. So, we have seen that this T inverse A T T inverse A T T inverse A T. So, this T inverse A T to the power r is nothing but T inverse A to the r T right that is why we could pull it out because when we are representing it in terms of the powers of T inverse A T which we call let us say A bar here as we have said here yeah. So, the powers of T inverse A T is nothing but T inverse times that same power of A times T. So, eventually from the whole polynomial term by term we are filtering out from alpha 0 i we are filtering out T inverse from the left T from the right from alpha 0 A i we are filtering out T inverse from the left T inverse from the right from alpha 0 A bar to the power 5 we can also filter out T inverse from the left and T from the right. So, the general polynomial has the same form as this right ok. So, this then shows that it is invariant to this change of basis it does not care about what basis we are choosing and this is good because now we can just deal with it like basis free give me any operator in terms of any basis I do not care whatever minimal polynomial I have once obtained in terms of some basis your friend is going to obtain the same minimal polynomial in terms of any other basis that he or she may have chosen ok just like the characteristic polynomial the minimal polynomial also remains invariant completely alright ok. So, what is the next thing we are going to do and what is the motivation for all this study again to remind you we are going to try and get this thing down to certain A invariant subspaces we want to get the basis for the whole vector space V in terms of the basis for certain A invariant subspaces and if you can write the whole vector space V as a direct sum of certain A invariant subspaces and not just that if those A invariant subspaces happen to be the smallest possible A invariant subspaces you can think of that is the best possible outcome we have when we had diagonalization we had precisely that each of those eigenvectors we had sufficient number of eigenvectors and each of those eigenvectors were the basis for the one-dimensional eigen spaces those were A invariant subspaces. So, we had this entire diagonal structure short of that when we cannot diagonalize we want to block diagonalize. So, that is the key now that we have this minimal polynomial we are going to try and harness this properties of this minimal polynomial to push towards that same goal can we somehow split up the minimal polynomial in some special ways so that the kernels of these factors of the minimal polynomials somehow allow us to cook up the best possible A invariant subspaces and then from thence we construct this diagonal structure for our operator or the block diagonal structure for our operator that is our goal. So, with that in mind we will next try and investigate how we can split up the minimal polynomial and towards that end we will have to encounter just like we encountered the LCM of polynomials we will now have to define the GCD the greatest common divisor or the HCF whichever you call it whatever you learnt in school like really middle school right highest common factor or the greatest common divisor that is what we call it and we will have to define that object which is what we are going to do in the next module.


बडल का पलिसने का ख़ूँझ कर viable शव kitchen cover sorgenų గ్ల్లూఠ wom రా మణటిస్� గ appl fingerna పఢాదిసిపుанияది〜 ఈల౏ని వాలా నాపికెడానికరంని కం  dere ring  seva A dije చా్లోనిని ఆలిస్ల్౒ిన నుఆలినియెసు నురంపెనిళుధినారిడినిందినందమూదినిడొఖందరంపెనిస్మోమోకడికతోతెటినినినినుని. మారోవీద్లో.  реж  Acting The Main man and Sandev Kumar alias Deepak Sarnoff Subhaj Lead obviously say part of main investigation and that in a raw material provides or technical support whoever is providing that the investigation would surely know According to Ummahedic Through information .úng we vehicle those three of these to recover crancy notes . in a Mosque community We got lettereries . t thou si phenomenal recover equals justice disposal comes this concern items we recovered total 5Jim team mittlerweile all rank all the lead he র র র র র র র র র র র র র র র র র র র র র র র র র র র র র র র র র র র র র র র র র র র র র র র র র র র র র র র র র র র র র র র র র র র র র র র র র র  ఽార్రి neuro లారి్విఊి. కనారిigible�ాథీ. ఠిండిలింిం researched. నిత౟� �付నాinisగాచ్కి కఐరోపనా andspace… తరి�, Gods in టశి ? నది共 రినతి !!!


Hello everyone, I am Mrs. Sunitha Doh topic covered here is operator precedence passing precedence function. In previous video we consider operator precedence grammar which is a kind of shift reduce passing method. In this video we are going to consider how to handle the unary operator and precedence function learning outcomes at the end of the session students will be able to handle the unary operator and find the precedence function for given operator precedence relation. Let logical negation to be a unary prefix operator which is not binary then with the help of the operator precedence relation we make theta ill precedence to logical negation for any operator theta whether it is unary or binary. Logical negation takes precedence over theta if logical negation has higher precedence than theta. Logical negation ill precedence to theta if logical negation has lower precedence than theta. Example, if logical negation has higher precedence than ampersand and ampersand is left associative then group the expression e ampersand logical negation e ampersand e as left parenthesis e ampersand left parenthesis logical negation e complete both the parenthesis ampersand e by above rule. Operator precedence passing cannot handle the minus sign that is both unary prefix and binary prefix. Because if we give unary and binary minus the same precedence then we will fail to pass the string like id into minus id correctly. The best approach to solve this problem let the lexical analyzer handle this problem. The lexical analyzer will return two different token for the unary minus and the binary minus. The lexical analyzer will need a look ahead to distinguish the binary minus from the unary minus. Compilers using the operator precedence passer need not store the table of precedence relation. The table can be encoded by the two precedence function f and g that map terminal symbols to integer. We attain the function f and g for the symbol a and b f of a less than g of b whenever a ill precedence to b f of a is equal to g of b whenever a has the same precedence as b and f of a greater than g of b whenever a takes precedence over b. Another algorithm constructing precedence function input and operator precedence matrix output precedence function representing the input matrix or an indication that none exist. Method step one create symbol f a and g a for each a that is a terminal or dollar. Step two partition the created symbols into as many group as possible in such a way that if a has the same precedence as b then f a and g b are in the same group. We may have to put the symbols in the same group even if they are not related by has the same precedence as relation. For example if a has the same precedence as b and c has the same precedence as b then f a and f c must be in the same group since they are both in the same group as g b. Step three create a directed graph whose nodes are in the groups for each symbol if a yield precedence to b then place an edge from the group of g b to the group of f a.  Step four if the constructed graph has a cycle then no precedence function exist when there are no cycles then collect the length of longest path from the group of f a and g b respectively. Consider the example e derives e plus e e into e or id and the operator precedence relation table. Consider the nodes for the function f and g of every symbol id plus multiplication and dollar. Consider first row of the operator precedence relation table there is no relation between f id and g id hence there will be no arc between f id and g id. The relation between f id and g plus is take precedence over. So, there will be an arc from the f id to g plus. The relation between f id and g star is take precedence over. So, there will be an arc from f id to g star. The relation between f id and the g dollar is take precedence over. So, there will be an arc from f id to g dollar. Now, consider the second row of the operator precedence table. The relation between F plus and the GID is ill precedence 2. So, there will be an arc from GID to F plus. The relation between F plus and the G plus is take precedence over. So, there will be an arc from F plus to G plus. The relation between F plus and G star is ill precedence 2. So, there will be an arc from G star to F plus. The relation between F plus and G dollar is take precedence over. So, there will be an arc from the F plus to G dollar. Now, consider the third row in operator precedence relation table. The relation between F star and GID is ill precedence 2. So, there will be an arc from the GID to F star. The relation between F star and G plus is take precedence over. So, there will be an arc from the F star to G plus. The relation between F star and G star is take precedence over. So, there will be an arc from the F star to G star. The relation between F star and the G dollar is take precedence over. So, there will be an arc from the F star to G dollar. Consider the fourth row in the operator precedence relation table. The relation between F dollar and GID is ill precedence 2. So, there will be an arc from GID to F dollar. The relation between F dollar and G plus is ill precedence 2. So, there will be an arc from the G plus to F dollar. The relation between F dollar and G star is ill precedence 2. So, there will be an arc from the G star to F dollar. The relation there is no relation between F dollar and G dollar. Hence, no arc will be there between F dollar and the G dollar. Now, consider how to obtain the entries in the matrix. The length of the longest path from FID to F dollar is shown here. So, the entry for F on ID in the matrix is 4. The length of the longest path from the GID to F dollar is from GID to F star, from F star to G star, from G star to F plus, from F plus to G plus and from G plus to F dollar. So, the entry for G on ID in the matrix is 5. The length of the longest path from the F plus to F dollar is shown on this slide. So, the entry for G on ID in the matrix is 2. The length of the longest path from the G plus to F dollar is from G plus to F dollar. Hence, the entry for G on ID in the matrix is 1. The length of the longest path from F star to F dollar is given in the figure on this slide. Therefore, the entry for G on ID in the matrix is 4. The length of the longest path from G star to F dollar is from G star to F plus, from F plus to G plus and from G plus to F dollar. So, here the entry for G on ID is 3. There is no relation between F dollar and G dollar. Hence, the entry for F on dollar in the matrix is 0. Also, the entry for G on the dollar in the matrix is 0. Till now, we consider how to handle unary operator and constructing the constructing precedence function algorithm. Now, pause this video and reflect on this question for a minute or 2 minute and write your response. Once you have written the answer to this question, then you can restart playing this video. The question is, find the precedence function for the following operator precedence relation. I hope all of you have completed this activity. Consider the node for the function F and G of every symbol ID plus star and the dollar. Now, the first row in the operator precedence relation table and according to the entry in each cell enter the arc in the graph. Similarly, second row, third row, fourth row. Also, the entries in the matrix are given on this slide. This is the reference used for preparing this presentation. Thank you.


We're now going to solve the second part of the example problem. And that is to evaluate the amount of extra g destroyed. And remember I said that there were two ways that we could go about doing this. When we're doing extra g destroyed we have two ways. We can look at entropy generation as the first method. So there we have extra g destroyed is equal to the surrounding or ambient temperature multiplied by the generation. Or we can do the extra g balance approach. We'll start with the one of calculating the entropy generated and then computing extra g destroyed. So we'll begin here with little extra g destroyed is equal to the surrounding or dead state temperature multiplied by the entropy generation term. So we need to evaluate or calculate entropy generated so the expression for that is the following. Now we're dealing with a nozzle that we said was adiabatic and consequently this heat transfer term drops out which makes our lives a little simpler. And the other thing that I'm going to do I'm going to divide by the mass flow rate from both sides of the equation and when we do that what we get is little s jan is then equal to s exit minus s inlet. So that would be the entropy of the steam coming in or sorry exiting minus the steam coming in. We can then evaluate that using the values that we have in the steam table that we pulled out earlier in the problem. Now for extra g destroyed we take the entropy generated and we multiply it by the surrounding temperature. Surrounding temperature was 25 degrees C which is 298 Kelvin. And when we do that we get extra g destroyed is equal to 6.29 kilojoules per kilogram. So that answers the question using a extra g or sorry an entropy generation approach. The second approach that we're going to look at is that of the extra g balance. And for the extra g balance the equation that is the equation for a single inlet single exit as well as for steady flow. With this we know that we're dealing with an adiabatic nozzle so that disappears. Nozzles don't do work so that disappears and the final relationship then turns out to be extra g destructed or destruction equals mass flow rate times the change in extra g of our flow stream. Now what I'm going to do I'm going to divide by mass flow rate on both the left and the right hand side and that will convert this into a smaller x for extra g. So we have that expression there psi one minus psi two. What we're now going to do we're going to expand this by putting all the different terms that that consists of. And so we get the following. Now here we can cancel out our potential energy term because the nozzle is not moving in the vertical in any way shape or form. We have to keep the velocities because they are there. So what I'm going to do now I'm going to plug in the values that we extracted when we looked at the steam tables at the very beginning of the problem and I'll plug them into this equation. And remember you have to be careful with these whenever you're mixing enthalpy entropy and velocity we need to account for the fact that velocity is in joules whereas entropy and enthalpy will be in kilojoules. And so in order to correct for that what I do is I multiply by a thousand and again multiplying by a thousand to correct for that difference. So plugging in all of the values what we end up with is x or g destroyed is equal to 6.30 kilojoules per kilogram. So that's the answer to the third part of the problem using the second approach. Let's take a look back at what we got when we used the previous approach. We obtained 6.29 and with this new approach using the x or g balance we get 6.30. So you can see the two approaches agree more or less off by 0.01 but that's not that big of a deal it's probably a round off error somewhere. Consequently we see both approaches work. So now what can we say about this? Why are we getting x or g destruction with this nozzle? Well most of this most of the x or g destruction is due to entropy generation. So where is the entropy coming from? Where could we have entropy generation within a nozzle? Well for that what you're going to have to do is think back to your fluid mechanics course. Either you're taking one now or you've taken one before but when you look at fluid mechanics what this means is that this nozzle is probably not that well designed. We'll always have some entropy generation no matter what we do but this could be there because we have a poorly designed nozzle from a fluid mechanic perspective. So from a fluid mechanic perspective what are we looking for? We're looking for a number of things. So you could see these are the design requirements. We want the exit flow from the nozzle to be uniform. We want to avoid separation inside of the nozzle. That means we do not want the boundary layer to separate off the wall. Usually we want to have it a minimum length because you don't want to have a long nozzle and another thing we want to try to minimize the boundary layer thickness at the exit because that will help give us a uniform flow. So let's take a look at two different types of nozzles. Let's say we have a nozzle that's like this. Now what might be happening here? Well if we were to draw our streamlines sometimes what you can get in here you can get flow separation along the walls depending upon the pressure gradient that you have along the wall of the nozzle. If you have a pressure gradient that is so strong that the flow in the boundary layer right along the wall of the nozzle comes to a stagnation point that is the velocity of zero you will have that boundary layer lift off and you have separated flow. So that might be a bad nozzle but let's say we were to draw or design a nozzle that looked like this. Well here it's nice and smooth we're probably not going to get any separation. However here what's going to happen is our boundary layer is going to get very very thick. If we were to look at the velocity profile along the wall we'd have a very very thick boundary layer and consequently again we don't have a uniform exit. So those were places where you can have inefficiencies and separated flow leads to turbulence and that leads to viscous dissipation which is basically conversion of pressure into thermal energy which we said is a disorganized state of energy. So this here would be the process of entropy generation. Now there could be other ones that are at play as well but this would probably be one of the larger more significant ones. So that gives you some background into terms of why this nozzle may be behaving the way it is that we see where there's actually X or G destruction taking place. So with that I'd like to conclude the lecture. Thank you for your attention. Bye-bye.