Today is part three for our lecture on query optimization. Again, I'm here at my home office. It's just me and the Terrier who may or may not be asking questions as we go along. So the type of optimizers we've talked about so far have been the sort of classic query optimizers where the query shows up, we parse the SQL, then we run it through the optimizer and regenerate a plan before we even begin executing the query. This is how most query optimizers work. Obviously you can't run the query unless you have a query plan so you have to put it through the optimizer. But the challenge is going to be that what we think is the best plan during this optimization phase before we even start running it may actually be incorrect. Since we can't actually run the query without a plan, there's some assumptions we have to make about what the database and what our environment looks like. But these things can change over time for various reasons. So the physical design, the database can change because the administrator of the application could add and drop indexes or change the partitioning scheme. The database itself could get modified, people could insert tuples or delete tuples and that could change the distribution of values for our columns. If we're invoking our queries as prepared statements then the behavior of the query for one set of parameters might be different for another set of parameters. And then of course every time you run, analyze or whatever the command is in our database system to recollect the statistics that we use in our cost models, every time we update them then the decisions we'll make in our optimizer could be entirely different. So the focus today is to understand how can we potentially improve our optimizers, the efficacy of or the quality of the plans that we're generating by maybe relaxing this requirement that we only generate a plan or only revisit our assumptions or we never visit our assumptions once we generate the plan in the beginning. So to do this we want to understand a little bit what a bad query plan looks like or why query plans can be considered bad and then end up with less than optimal performance. So we'll cover this more on Wednesday when we discuss cost models but in general I say the high level, the biggest problem we're always going to have is the we're going to get the join order isn't correct. Joins are almost always the most expensive thing we're going to execute in a analytical workload and so if we get the ordering incorrect that can lead to poor performance. And the reason why we're going to select incorrect ordering is because we're going to have inaccurate cardinality estimations meaning we think that our join is going to produce X number of tuples but it's really going to be X times Y or some larger multiple than what we thought was going to happen. Again we'll discuss why this occurs more in the next lecture but this issue is going to be a reoccurring theme that we're going to have to overcome and today's discussion is sort of seeing techniques to do this. So but since we know things are going to go bad like we just know we can just assume that our cost model is going to be inaccurate our optimizer is going to make bad decisions then ideally if we can detect how bad our query plan is once we start running it then we can make a decision to adapt the plan to modify potentially to account for these differences and what we're seeing in the real data versus what we assume we're going to see and then we can then try to convert our plan into something that's closer to the optimal plan. So what I mean by like that is say we have a simple query like this it's a four-way join between eight tables ABC and D and then we just have a simple where clause for the B and D tables. So let's say that we run this query through our query optimizer and we generate this plan.  But let's say that when we generate this plan for this particular join we estimated the cardinality of that operator to be 1,000. This is an arbitrary number that I'm using for this illustration. The cardinality is the number of tuples that this operator will admit. But let's say when we actually start to run it we see that we're actually generating 100,000 tuples. So our actual cardinality is two orders of magnitude greater than the estimate one. So the question we're trying to deal with today is if we knew what this true cardinality was before we started executing it, while we're executing it then could we change some aspect of this query plan to get us closer to a more optimal plan? Could we change the join ordering? Would we want to choose a different algorithm to do our join? Would we want to change maybe the access methods that come below the join to use maybe an index or a different type of scam? So this is sort of what we're focusing on today is how to then maybe adapt this kind of plan when we know something about what the data looks like once we start running it. So the high level idea again is that we want to be able to execute, estimate the behavior of a plan to determine its quality relative to other plans. This is what the cost model is doing. But the tricky thing is going to be back here before I started executing this I had to derive this cardinality from my statistics that I had maintaining my catalog about what my table looks like or what these two tables look like when you join them together. So these stats are going to be based on histograms and possibly samples that we're collecting from the data. We can also make decisions about what the hardware looks like, what kind of cache sizes we have, what kind of maybe algorithm we want to use, what other queries are running at the same time. The cost model stuff will cover next class, but the main idea to think about is what we're talking about today is before we run the query, we only have an estimation of what the data looks like and how our query will perform. And if we get that wrong, we want to then try to be able to correct ourselves. So the technique we're talking about today is called adaptive query optimization. It's sometimes called in the research literature adaptive query processing. They're essentially synonymous. And it's everything I said so far. The idea is that this technique is going to allow the database system to modify the query plan for a query to better fit what the actual underlying data looks like. And we can be modifying for the query plan by just generating an entirely new query plan, like throwing away the old one and starting over. So before we could try to modify a subset of the query plan by introducing new sort of subplans or almost like a pipeline at different points where we have to materialize people, where we could potentially switch from one plan strategy to another. And this one here, you basically go back to the optimizer and start over. This one here is that you can try to have the optimizer only do only replant a portion of it and provide these alternative strategies at the beginning. So the main sort of takeaway approach what we're doing here is that rather than just relying on our statistical models that are estimations or approximations of what the data looks like, we're trying to use the data we've collected while we actually execute the query to then help us make a decision about what the right plan should be for our particular query. And this data we're going to collect could be used for helping our current query or we can merge it back into the statistics we've collected through our analyze operation and have it be used for other queries. So again, we'll cover the various ways you have to do this, but when you think about what a query actually is doing or what analyze does, analyze is doing a sequential scan to compute some statistical models about what the data looks like. And so if we're doing the sequential scan on a table, that's essentially the same thing as analyze. And so rather than just evaluating predicates or using the tuples as we scan them to generate the result we need for that particular query, we can piggyback off of that scan operator and maintain or update these statistical models with new information. And the question here is whether we just update that models for ourselves to make our query go better or can we share this with other queries in the global catalog and now other queries can benefit from the data we collected from this. So there's three broad categories that I want to cover using AQL or adaptive query optimization. One is that we can use AQL to benefit future invocations of our query. The second approach is to try to make our current invocation of our query better. And then the last one would be, well, this is like helping your current query, this is also helping your current query, but this one would be sort of starting over from scratch and just running through the optimizer all over again. This would be adding locations in the query plan that allow you to change one strategy versus switching one strategy to the next with, again, out having to go back to the optimizer. So we'll go through each of these one by one. So the most simplest form of adaptive query optimization is, as I said, where as we execute our query, we also collect some information about what the data looks like and then we can use that information to decide whether our query is wrong and want to replan it, or we could then merge that back into the sort of global catalog. Again, when you think about this, what if the optimizer are actually doing? You have a bunch of histograms or statistical models about what your activities look like. So for a given predicate in your where clause, you want to estimate the selectivity of that predicate because that will determine how many tuples your scan will emit and you can use that to make decisions about join orderings and other things above in the query plan. So as you execute the scan, you actually know the true selectivity because you're applying the predicate on the tuples and you know the number of tuples or percentage of the tuples are going to match. So if you then determine that the cost model estimated in my selectivity was 1%, but when I run the real query and I run the query and actually do the evaluation of the predicate, my selectivity is 99%, then I wanted to use that information to help me decide whether to replan my query or that future queries come along, they can exploit the knowledge that I've gained. So again, the one approach is to try to fix my current query or the other one is just merging it back into the overall statistical model in the catalog so that I can then help queries in the future. So the most basic approach to do this is called reversion based plan correction and the idea here, as I said, is just every single time I invoke a query, I keep track of what query plan I generated for it, I keep track of the cost estimations I had for it and then I'll have all my metrics of what happened when I ran it, how many tuples I selected and how much CPU or memory that I used. And I'm going to maintain this history inside the database itself. So you'll see this in the commercial systems like in DB2, Oracle and in SQL Server, they have this built-in repository of the history of every single query that ever got invoked and they can use that information to help decide how to do query planning in the future. So let's say that we have a prepared statement or we have a query that's been invoked all the time and we have a cash query plan. So rather than maybe running through the optimizer every single time, we can just use the cash query plan that we've already generated from previous invocations. So if now there's a change in the statistics or something about the database, a physical design that changes and we recognize that we maybe want to, for this particular query we keep invoking, we want to run it back through the optimizer and see if we generate a new plan. But then when we run that new plan for this query, if we see that the performance of the query is worse than the old plan that we had before, then we just want to run it back to it. If there's a regression in the performance, we switch back to the plan that we know actually performed better for us, despite the change in the physical design or the statistical models. So we use that simple query example that I have before, the four-way join. Say again, this is my original plan and I'm doing nothing but sequential scans and a hash join and say that my estimated cost is a thousand and my cost estimation is pretty good, so my actual cost actually matches up. These are just synthetic numbers here. So I'm going to store in my execution history for my database system that I generated for this query, I generated this plan, and when I ran it I had this cost. And this is just another database or another table in my database system, right?  Rather than having an auxiliary store, this is just another table that you record this information. All right, so now let's say there's a change in our database design. Say the DBA comes along and adds two indexes on the B table and the D table, which we're using in our order clause. So now when we invoke the same query again, we would recognize that the design of the database has changed in such a way where we may now want to reconsider the query plan for this particular query. So this query touches B dot val and D dot val. Well, I just happen to create indexes on those columns. So I want to run this through my optimizer again and see what plan I get. Let's say now for the new plan, it's completely different. So now instead of running hash joins, we're running index nest of loop joins. And we're doing an index scan on B on D, which we can now do because we have an index on that, which we didn't have before. And so now we're going to pick this plan for our query because the estimated cost is 800, which is less than the estimated cost that we had over here. But when we actually run it for whatever reason that we don't care about at this point, the actual cost is 1200. This could be that we incorrectly estimated that the cost of these nest of loop joins would be cheaper than the hash joins, so we picked nest of loop joins. So just as before, it's when we actually put this, excuse me, that's not corona. If we actually now put this in our execution history, we would recognize that for this plan here, again, it performed worse than this other one here. So the next time we invoke it, we want to make sure that we use this plan. We want to revert back to the one that we know performed better. So for this approach here, this is something that Microsoft has had in SQL Server, and I think Oracle has something similar since maybe 2012, 2013, but this is pretty coarse grain. This is pretty brain-dead heuristic. It's basically saying, oh, this query plan is bad. Let me just switch back to this one. So it's all-or-nothing thing. So the paper you guys were signed reading from Microsoft is called plan stitching, and the high-level idea is exactly the same, where if we recognize that our query is running slower than query plans we saw in the past, rather than potentially just throwing away the entire query plan, the new query plan, and reverting back to the old one, maybe there are elements or aspects or subplans within the newer plan we actually wouldn't want to retain, because that'll help us lead us towards a better plan, a more optimal plan. And the other thing you think about plan stitch as well is that the subplans you're going to borrow from other queries don't need to be actually from the same query. Like in this case here, I can only reuse the plan in the simplest form. I can only swap between plans if they're running on the exact same query. But with plan stitch, because I can excise out subplans or portions of the query plan, as long as I know that they're logically equivalent, I can take bits and pieces from other queries. The other thing too is that if there is a change in the physical design where a new query plan becomes invalid, meaning it defined that it wanted to do index scan, but then I dropped that index, rather than just throwing away the query plan in its entirety, I can maybe pull out pieces of it. So the basic approach they're going to use or the way they're going to generate these stitched plans is a dynamic programming search method using a bottom-up approach, where you check to see from going from one level to the next and saying we do a system R, going from one node to the next, you pick which subplan is the best. And then once you reach the end goal, you find the cheapest path. So this means that it's not guaranteed to find a better plan than the best plan you have so far. And it is not guaranteed to always produce a valid plan but there's some basic characteristics to use to make sure that happens. So going back to our example here, say that this is our new plan and say it was working just fine, like it was actually faster so we always want to use this. But now if I come along and I drop one of the indexes that I'm using, this plan now becomes invalid and under core-screen reversion, I can't reuse it, but with plan stitching, I actually want to figure out what components of this subplan or the query plan here that I may want to use in the new plan. Even though overall it's invalid, there's still portions that are still usable. So let's say in this case there, say this portion of the subplan, the subplan of this part of the query, the execution cost is $600 and we would know this because we can keep track of the actual runtime cost of all the operators in our query. And for this one here, this subplan over here has a cost of $150. So now if I combine these together into a stitch plan, the total cost of this case would be $750. Whereas before, if I didn't run this, it was $1,000. So again, the idea is that we want to be able to borrow bits and pieces of different query plans to help us produce a more optimal plan. And this is being done separately from the regular optimizer. In the case of Microsoft SQL Server, they're running Cascades, so they're actually doing a top-down search. But this is sort of this auxiliary search that's running on the side that in the background, it tries to find a plan that can stitch together. So let's talk about how they actually do this. The first step is you need to identify which portions with subplans in our queries are logically equivalent. We talked about this before with Cascades when we had multi-expression groups. We want to know that the output of a given subplan is the same or equivalent to another subplan. And again, we have to rely on the rules of the relational algebra to recognize which operations can be commutative or associative. So in this case here, this portion of the subplan, the output is that a join, b join, c. This portion of another subplan is the output is c join, b join, a. But since joins, these inner joins here are commutative, we know that these are logically equivalent. Now, as I said, well, one challenge with this is that determining whether any arbitrary logical expressions or logical subplans are equivalent has been shown to be undecidable, meaning the question is, are these two subplans logically equivalent? It's a yes or no answer, but there's no algorithm that exists as an improvement that can be guaranteed to always give the correct answer. So in the plan stitch phase, they're going to rely on some additional heuristics to identify things like, oh, I know that these two subplans are accessing different tables, so therefore they can't be logically equivalent. You obviously can do more complicated things. The optimizer itself in SQL server also has those kind of checks and plays, and so they rely on that as well. So they have their own heuristics to prune things that can never be logically equivalent, and they rely on the SQL server optimizer to identify that the logical subplan you're trying to mash together, or the subplan you're trying to mash together in the stitch plan is invalid. So the heuristics are providing them with this sort of sweet spot balance between the difficulty and the implementation.  It's not an exhaustive search and exhaust evaluation of all possible inputs to different subplans. It's just rules based on the relational algebra. So now once we identify that we have a bunch of equivalent subplans, we want to sort of combine them together into one giant query plan where you're going to add some additional operators to determine that you can have branches to go down different paths in the subplan. So this is how they're going to encode all the different combinations of the subplans to stitch together. So the way this is going to work is they're going to introduce this new OR operator, which is not actually being used for execution. This is just something for the search. And the OR basically indicates that the subplans below it are logically equivalent. So we could choose either path. So starting from the top, we have an OR clause at the very beginning and then we have the two for this particular query. We have either doing the hash join or the nested loop join. And again, these are logically equivalent because this is a join, b join, c join, d and this is c join, b join, a join, d and those joins are commutative so therefore these are logically equivalent. So then now, say you go down, we're going to go with like a depth first search going down on this side. For this one here, same thing. We can do the hash join on a and b followed by c. This is the nested loop join on c followed by c join, b join, a. Again, these are logically equivalent. So that's why we can have the OR clause. We can choose either one. And then we're just going to keep going down until we get to our leaf node in the sequential scan. And then here we don't see, there's another option for us in this portion of the query plan because the one we stitched from just only had a hash join. So now in this case here, for the hash join a, we can do a sequential scan as we saw on the first plan or we can do the index scan on b because that came from the second plan. And so we have an OR operator to express that. Going back up here, we can only do a sequential scan on c in the straight path. Going back up here for the nested loop join, the only thing we can do below it is another nested loop join. And then for this, we can either do a sequential scan on a or again for b, we can either do the sequential scan or the index scan. Going back up here for the hash join, again, that's feeding a sequential scan on d feeding in and then we just complete the rest of the tree like this. So this is a bit more simplified version of what they showed in the paper but these are actually the possible options you can have. And so what I think, remember in the paper, what they talked about is that this approach and doing the search within this defined stitch plan, they're able to stitch about 75 to almost 100% of all the plans together for the workloads that they looked at. So now that we've encoded our search space, we actually want to do our search and this is just starting from the bottom and going up the same way we did with the system programming search where we just, for every single leaf node we start off with figuring out what the cost is for going to the next operator. We pick which one is the best and then once we complete all the do the search for all the nodes at our current level we then go up to the next level and complete this process. So let's say we start with the sequential scan on a it only has one option first which is just the it's either the hash join on a, b or the nested loop over here say the hash join is cheaper so we pick that now we do the sequential scan on b this has an OR operator so this is either doing a hash join or the nested loop join and then say the hash join is cheaper so we pick that now we do this for the index scan on b again there's an OR operator we do the hash join and the nested loop join and so because we have an index the nested loop join actually would be cheaper here so we would pick that and we just keep going down the line and do this for all our leaf nodes and then we're done we go up to the next level and then again now we have a cost for all these paths leading up and we just pick which one is is the cheapest for us and then we reconstruct the we construct the stitch plan that way right? So again I think this is an interesting approach I don't think Microsoft is actually running this in production like this was a paper that was published in sigmod I don't know of any other system that's doing something similar like this from an engineering standpoint the fact that you have to run this separately from the from the query optimizer and sort of have separate infrastructure for that Terry what are you doing? Right so rather than having separate so search infrastructure if this is integrated into the query optimizer component itself I think this would be really interesting approach so there's another system that does something similar to this plan stitching but they're actually working on a sort of a cogen level rather than like a physical query plan level so Amazon has their redshift data warehouse service and it's based on a par excel and they use actually a they do it's a cogen engine so the database system for a given physical plan generates C++ code or C code which they then compile and then they run they invoke the shared object that comes out of the compiler and that's how they do query compilation so obviously the most expensive part of cogen engine is the compilation in their case they're actually forking GTC or whatever compiler they're using to actually generate the machine code they want to try to avoid that for every single query so what they can do is they say you're doing you want to compile the scan on B where you want to see where B dot val equals some input parameter so the cogen that piece run it through the compiler that generates x86 code and then they'll go ahead and cache it and then now any time you re invoke this query you know you can just reuse the compiled version of the scan on B but similar to plan stitching what they can also do is they can recognize that if you have another query with the same kind of predicate B dot val equals some parameter it'll cogen the exact same thing so rather than recompiling it which is again the expensive part they can identify that they have a cache plan fragment for this scan here and they can reuse that and so they actually can do this across all possible across all their customers so like this scan on a table to do one something equals something on a varchar field that's going to be the same from one table to the next because it's a column so you're just ripping through the column so they can actually share these little fragments and stitch these physical query plans of the compiled query plans together from all possible customers so now for a given query that they've never seen before if it has the same pattern of access methods and joins and other things as queries from another customer they just pull from a cogen and cache and stitch together so that's kind of cool alright so there another interesting system to talk about is IBM's leo the learning optimizer and so this is an example of where you have a feedback loop being used to improve the accuracy of the cost models in the system the idea is that again I keep track of what my cost model estimates were when I generated the query plan and then when I run it if I recognize that those estimates are way off I start recording information about what I'm seeing in the real data and then when my query completes I return the result back to the user or the application that requests the query but I also go update my cost model statistics with the new information that I've collected so IBM's leo was actually shipped in production in db2 today but this is one of the examples of a commercial system applying one of these adaptive query processing techniques alright so the the plan stitching stuff that we talked about or the version stuff is about fixing future invocations of a query to improve them based on the results that I'm seeing when I actually execute my query but now we want to talk about how do we fix my query if I invoke my SQL query and I determine that I have a bad plan what do I do because I don't want to wait for the next invocation I want to fix the one I have right now so I'm calling this the replanning the current invocation again the idea is that if I determine that the observed behavior of the query plan as I'm executing it is way off or divergent what the estimated behavior was that the cost models produced then I can decide to potentially either stop the query and go back and generate a new plan or I can decide to maybe how about some how recognize that I've already produced some work for me and keep that portion of the data that I've already processed and then turn back to the optimizer and ask it to just generate a sub-plan and either just start with a scratch and you decide that continue with the same query plan that I have now is going to be worse than just starting over obviously if you're at the last two but the last operator then it's a bad idea, just let it finish so striking a right balance of this is difficult and then the other approach is determining that well I'm doing 100 joins and I've already done one of them and then you keep that one that I have because that was expensive for the other 99 and the whole idea here is that you're going back to the optimizer and saying hey generate generate me a new plan so let me give an example that does something sort of similar to like this so this is from Apache Quickstep Quickstep was or is a embedded analytical engine sort of similar to DuckDB but I don't think it's supported SQL it came out of University of Wisconsin and then it's been it's been turned over to the Apache Foundation I think it's been kicked out of the incubator program because I don't think they've updated it recently I don't know what's going on with Jignesh and his team but I haven't really seen any updates in a while but they had this really interesting approach called look ahead information passing where I can do some work at the beginning of my query and pass that along to other operators or other portions of my query plan and hopefully make a decision about what the right ordering is for things up ahead so for this example say we have a simple data that says three tables so this would be a star schema this approach only works for star schema we have a fact table in the middle and then you have dimension tables coming out of it so it's not for arbitrary star schemas or arbitrary tree based schemas so the way this is going to work is say this is my SQL query like this I'm doing a three way join between the fact table and the two dimension tables so what I'm going to do is before I begin before I start scanning the fact table and start computing the hash tables for my join I'm going to scan through the dimension tables and generate a balloon filter we saw this similar technique being used when we talked about joins this idea came from vector wise I'm going to pass it on to the other side of the query plan so that maybe avoid a hash table probe and we see this so the joins are going to be on the dimension tables these are going to generate the hash tables and the fact table is just going to do a probe so I want to generate the balloon filter and then check the balloon filter to see whether the key I'm looking for can even exist in the hash table which is cheaper than doing the hash table probe but what we're going to do differently here is that for the fact table we're going to do some sampling to determine the selectivity of the different balloon filters for these different tables and then if we determine that the second table here the second dimension table is actually more selective than the first one then I want to reshuffle the reshuffle my joins so that I do the probe on this hash table first because I'm going to end up throwing away more tuples and we can do this before we actually start running anything because we've already built the hash tables, we generate the balloon filter and we can make the decision before we start scanning and doing the probe so I think this is a really interesting idea as far as I know, QuickStep is the only one that does this and I don't know whether it actually made it into the open source version alright, the last adaptive query optimization techniques or category you want to talk about is what I call sort of plan pivot points and the idea here is that we want to introduce additional subplans in our query and then have a have a sort of special synthetic operator that we put into our query plan that allows us to pivot or switch which path in that query plan we want to do and the idea here is that we can put conditions in the switch operator or the change plan operator that if we determine that our data looks one way we'll go down one path, if it looks another way we'll go down the other path it doesn't have to be two, it can be multiple ones so the sort of two most famous techniques for doing this are parametric optimization or proactive re-optimization again at a high level they're going to work exactly the same way it's just the sophistication of their technique is slightly different so parametric optimization is actually developed in the late 1980s in 1989, this actually came out of the volcano project, again the same one that does the volcano query optimizer the volcano iterator model they also did early work on adaptive query optimization which is again, I'm saying that work is very influential so as I said the idea is that for each pipeline in our query that we think that there are different alternatives we could have that would make a big performance difference will generate different cell plans for them and then now in our query we'll have this choose plan operator that basically has an if clause that says if the cardinality of the operator below me looks one way, of a certain size then I want to choose the first plan if it looks another way then I'll choose this other plan in this case here if I know that my data is really small then maybe I want to do an S loop join because that's going to be cheaper than having to build a hash table and probe it but if my data is really big then I maybe want to build a hash join or do the hash join so again I think this is actually an interesting idea of course obviously the tricky thing is determining what this conditional this condition should be and you know there's it's sort of through trial and error as you develop the thing and it's actually very dependent also on the on the hardware but the nice thing about this is like there's nothing we end up like not having to go back to the optimizer and sort of replan everything the and we don't throw away any of the data that we've collected right so we do this hash join and then we just determine whether we want to go down one path versus another a more recent sophisticated approach to this is called proactive re-optimization which is actually combining the ability to go back to the optimizer and generate a new plan as well as to tweak it in the same way we saw in the previous example so they actually can do both and so at a high level it works like this so query shows up we generate through the optimizer and so we'll generate different different switchable plans just like before but we're also going to now generate bounding boxes that allow us to determine whether the assumptions we're making and our decisions about whether to go down one path versus another are actually going to match up with reality basically trying to put a balance on the uncertainty we're seeing in the data as we run so now we start executing the query just like before in Leo and other techniques we execute query collect statistics about the data that we're seeing for our particular query and then we can switch the query plan just as we saw before if we determine that one plan path might be better than another but then if we also determine based on our exceeding our estimations in our bounding box thresholds if we see that we're way out of whack and our estimations are way off then we just go back and re-optimize and then you can determine whether to pin the portions of the query plan that you've already executed because you know they're expensive or you can just say throw everything away and start over so this is sort of again a crash course on adaptive query optimization the I actually really like this these techniques and there's for obvious reasons right like it doesn't rely on getting it right at the very beginning like you can sort of correct yourself as you're actually running the query so again we'll see in next class when we talk about cost models of how bad things can actually get but the way you actually need to implement this is super important that it's just not you don't want to implement your optimizer and your execution engine completely separately from each other it's sort of a symbiotic relationship where you have to know what kind of strategies could be employed by the execution engine and the optimizer in terms of like switching paths and throwing away intermediate results or not and then you build your optimizer around what your execution engine can actually do so for this reason I think I think applying this technique for or using this technique with sort of this optimizer as a service like orca or calcite could actually be tricky because there's different approaches for how you can actually support adaptive query execution in the system itself so the in addition to having sort of more robust or more more sophisticated query optimizers all you know versus the open source one open source systems all the major database vendors now support this within the last actually mostly in the last three or four years like dv2 had this leo thing in early 2000s but really in the last three years both oracle and sql server and now teradata also included the ability to do adaptive query optimization but that's my knowledge and postgres and my sql simply can't do this and none of this is the newer open source systems that have come around in the last decade so so again this was just to show you that you don't have to build the optimizer the way we described it where you sort of plan once and run it there are techniques to actually modify the query while it's running and they get feedback from execution and put it into the system what the f*** are you doing alright sorry so next class we'll then start discussing how cost models work and we'll see actually why they're so bad okay alright guys bank it in the side pocket


air, the most crucial resource for the sustenance of life. Unfortunately, rising air pollution has become a bigger problem globally. As industrial development has progressed, access to clean air has become a luxury and it's not just for us, it affects our entire planet. Air pollutants can travel great distances, unlike us they're not concerned about territorial boundaries or ecologically sensitive areas. According to WHO, every year, an estimated 7 million people die as a result of air pollution around the world. All the particles when discharged into the atmosphere react with other atmospheric substances and form aerosols. Aerosols, when combined with high quantities of air pollutants, introduce many undesired compounds into the ecosystem. Due to this rising air pollution, the various phenomenon such as acid rain, ozone depletion, haze, climate change, decreased carbon sequestration takes place which affects the environment. Unfortunately, examples of environmental degradation are beginning to become the, new normal in our time. The negative and underappreciated consequences of increased air pollution have prompted us to intensify our air quality monitoring capabilities. The absence of ambient air monitoring stations in the cities that are most likely to be affected due to the various sources of air pollution requires immediate actions. Installing a robust monitoring network using low-cost sensor-based monitoring equipment like oizoms, dustroid and pollutone helps us in monitoring the pollutants emitted from different sources. The real-time data obtained assists in gaining relevant insights, taking timely steps, and preventing the negative environmental effects of air pollution. To know more, click on link in description below.


The Mises Institute is in Asheville, North Carolina this weekend celebrating our Supporters Summit and we thought you might enjoy hearing a talk I gave entitled The Role of the Mises Institute. Here's a hint, it's not politics, it's not public policy and it's not lobbying, but rather to be a school, a new kind of school for the 21st century. Stay tuned. I'd like to speak briefly to all of you about where we are as a society and also the role that the Mises Institute plays in that society or ought to play. I'm sure that I'm not the only one in the room that's been operating under this assumption that the American people would view this Hillary versus Trump thing, or Hillary versus anyone even before Trump was the nominee, that while Hillary is the devil you know and that the American people would select her over the devil they don't, whether that's Ted Cruz or Scott Walker or now Donald Trump, but I think we've seen in the last couple of weeks with these strange health scares, I'm not 100% wedded to that anymore. I've been of the opinion that Hillary was going to win and win, maybe perhaps as easily as Obama did the second time against Mitt Romney, but just simply because as I said she's the devil you know versus the devil you don't, but maybe I'm wrong, maybe we're in for a very strange couple of months in a very rough ride, but we can bemoan this election from a libertarian perspective and say it doesn't seem to be going our way, but I think that there's really a great opportunity here with Hillary versus Trump because what we need to understand is that regardless of who wins, there are literally going to be millions and millions of Americans, maybe 40% of the country either way, who view the winner as illegitimate and irredeemable. I mean that's really where democracy has gotten us in the U.S. If Hillary wins there are going to be countless Americans who think she's ought to be in jail, that she's a felon, and if Trump wins there's going to be millions of Americans who view him as the retrograde leader of the deplorables, a man who has no business being near the White House. I mean this is where we are and you may have seen on the Drudge Report a couple of days ago there's a recent Gallup poll that says fully a third of Americans won't trust the election results regardless, so we don't even trust our government to hold an honest election. So I think we should forget about this nonsense, this is the most important election of our lifetimes, we hear that every time, I think we should forget about that in the conventional sense because there's not big ideological or policy, I don't even like that word policy differences between these candidates. I think Trump versus Hillary represents something much bigger. It's what we might call the end of politics or at least the limits of politics. I think Americans and Europeans too really the West are waking up and to the fact that there's this myth called the myth of democratic consensus, that somehow democratic voting yields this happy compromise between supposed left and right, but when all it really yields is this entrenched bureaucratic and political class and its system of patronage and spoils. Now those of us in this room might know that already, but what we're talking about here is something very different, we're talking about ordinary people, very ordinary Americans waking up to this reality. And we already know that government it simply can't deal with our macro structural problems. There are no political solutions to government debt, to what's going on with our currency, to the wars, to entitlements, to taxes and spending, to these intractable social issues. None of these things can be solved politically at this point in the United States and that's really a profound thing to think of. And so I think the public is waking up to this slowly, but surely and it's not necessarily an ideological awakening on their part, it's just simply a recognition of reality. There's no political will, there's no political consensus in DC to address any of these big picture problems. So from that perspective we might say that politics in the West, politics in America is broken. And I think there's something profoundly healthy from a libertarian perspective about witnessing this, this understanding that political solutions don't exist, that our grade school view of government is a sham. I mean this is really a profound opportunity for us if we think about it correctly. You know we can look at angry voters and populism and nationalism and anti-globalism and anti-elitism. These are all symptoms of a hostility for politics. Really a deep-rooted hostility and we can turn up our noses at these movements and say they're not libertarian or they're not intellectual or we can embrace this opportunity that they present. So I think that opportunity to make the case for a fully free society, one not organized around politics or the state whatsoever is at the heart of the Mises Institute's mission. And we've never been afraid to make that case. You know we can, we can term it Mises's view of self-determination taken to its ultimate conclusion. We can term it Rothbardian anarcho-capitalism. We can call it a private property society or private law society, whatever you like. The Mises Institute is never shied away from advocating pure stateless libertarianism. And I don't think that can be said of any other organization in the world necessarily, inside or outside the Beltway. But make no mistake, we're not trying to be overly ideological or shun people or keep them away. We're fellow travelers with anyone who wants to reduce the role of government on any issue for any reason or any motivation.  Anyone who's interested in liberty even if it's on a single issue only.  We're here to provide a gateway to spark an interest to make free resources available and feed that interest. So as politics collapses around us, we want the institute to serve as an intellectual home for anyone interested in a society not organized around the state, but instead organized around markets and civil society. Not a utopia, but a world where the great economic and cultural and social questions of the day are increasingly not decided or determined by politics. We want the Mises Institute to stand as a counterbalance to this dominant political narrative. It's really I think at the heart of our mission, but it's far from our only mission. We have a very critical job in saving economics itself from economists because we can think about politics as being broken, but you want to talk about a broken profession, not just as a profession, but also as a field of study. The credibility of modern economics is hopelessly bound up in forecasting and mathematical modeling is shot. Its reputation, especially following the crash of 2008, is in tatters. It fails to inspire young people to go into economics while its PhD factories produce data historians who don't really understand economics at all. I mean if we consider for a moment that modern mainstream economists, they failed utterly to predict or understand, as I mentioned, the crash of 2008, they failed utterly to predict or understand the great housing crash of the last decade. They don't understand money as a market commodity. They think it's just something that could be conjured up at will as some central bank script. They don't understand inflation fundamentally as a monetary phenomenon. They don't understand interest rates in their role. They think interest rates are some sort of policy tool to nudge behavior. They don't understand malinvestment and how booms and busts really occur. They don't understand praxeology or the proper methodology. They're not even familiar with the concept, but they're absolutely wedded to proving out their hypotheses using empirical models. They don't understand the vital role of capital markets in allocating resources to their best and highest uses. They don't understand the role that bankruptcy plays in weeding out and liquidating unfit businesses. They don't understand or know much at all about economic history whatsoever. I was talking to Benjamin Powell, PhD professor at Armisa's University recently, and he confirmed my suspicion which is that it's entirely possible to obtain a PhD in economics today at most universities knowing nothing, literally nothing about the history of economic thought. It's as though we took these young economists and just sort of parachuted them in to a desert island, and there they find themselves with no previous knowledge of how we got there. And finally, consider that the Fed in the Eccles Building employs about 300 Ivy League PhD economists who can't even figure out whether to raise the Fed funds rate by a quarter point next month as though the fate of the civilized world hangs in the balance. So this is the state of orthodox economics today, and this is where the Mises Institute comes in because the correction is so obvious. We need a counter-revolution, a wholesale Austrian counter-revolution away from neoliberalism or neo-Kanzenism or whatever you want to term this jumbled set of beliefs that drives economics today, the set of beliefs that says it always comes down to governments or central banks stimulating demand at any cost. So the path forward for us as an organization for you as individuals is as always education. But it's not limited to academia by any means, and I think on the contrary, as Mises saw it, none of us can afford to sit on the sidelines. You're probably familiar with his argument in the latter part of human action where he talks about the place of economics and learning and he cautions against relegating economics to what he calls academia in esoteric circles. I mean, Mises really believed that everyone had a duty to learn economics. In fact, in that same section, he talks about the question of the market economy versus socialism being as important in the 19th to 20th centuries as religious and monarchical absolutism had been in earlier centuries. He saw that really as the question of his day and our day. So note here his populist tone and I'm quoting him. He says, there's no means by which anyone can evade his personal responsibility. Whoever neglects to examine to the best of his abilities, all the problems involved voluntarily surrenders his birthright to a self-appointed elite of Superman. In such vital matters, blind reliance upon experts, his quotes, and uncritical acceptance of popular catchwords and prejudices like income inequality, anyone, is tantamount to the abandonment of self-determination and yielding to other people's domination.  His own fate and that of his progeny is at stake. These are pretty tough words from a very gentle soul. So the call to duty, as Mises saw it, sounded for every intelligent layman. And that's really at the heart of how we see ourselves and what we do at the Mises Institute, teaching sound economics to lay people from all walks of life. Because, ladies and gentlemen, what exactly is a school in the 21st century use of the term? Well, it's a place where one learns, but beyond that, the term school is being radically redefined. It's no longer necessarily a physical place that a student physically attends. It's no longer for young people in their teens or 20s only. There are no administrators. There are no irrelevant classes or imposed curriculum. Learning takes place at the student's pace, on the student's time, any time of day, anywhere in the world. Students consume as much or as little as suits their needs. Schools become market focused. So by these measures and by this definition, the Mises Institute really is a modern school. We have students from all walks of life. And by students, we mean people who interact with us.  So that's a student. But there's another kind of student who might only choose to do nothing more than subscribe to our Twitter feed and occasionally consume an article by clicking on a link. And by doing so, that's as much education as they need or want from us and still put some light years ahead of most of their peers walking around. And I'm very pleased to say that Mises.org, the largest and best site in the world for Austrian and libertarian content, is now reaching upwards of 5.5 million individual people every year. That's a big increase over the last year, even in the face of Hillary versus Trump. And I'm also very pleased to say that the husband and wife duo of Peter and Sandy Klein have agreed to start producing some excellent new core classes for our online academy, which are going to give people all around the world an opportunity to experience a part of what Mises, you are summer program is all about. So from my perspective, ladies and gentlemen, we are the economics of the future and the school of the future.  Thank you.


While the military high command said, troops intercepted Boko Haram Islamic State of West African province terrorists crossing from Cameroon to Nigeria with weapons and order logistics. The deputy director, Defense Media Operation Brigadier General Abdulai Ibrahim, disclosed this during the bi-weekly briefing of the defense headquarters in Abuja. He stated that the troops of operation had in Cai killed five terrorists during a gun battle that ensued a rusted 10 and recovered arms and order logistics, including bags of flour and detergent. During the operation, troops made contact with terrorists and neutralized five terrorists, captured three while others flee. Troops also recovered three AK-47 rifles, two then-gun 16 rounds of 7.62mm special ammunition, one 36-hands grenade, and an unexplosive augment. Three motorcycle, three bags of grains and other valuable items were also recovered. Also on the 22nd of June 2023, following intelligent reports on the crossing of some terrorists from Cameroon to Nigeria, troops laid ambush at Bala Yobi, derail in Burma-Luca government areas of Borno State, and made contact with the terrorists. During the firefight, troops neutralized five Boko Haram terrorists and recovered one bag each of detergent and grains. Troops of Operation Delta Safe, while conducting Operation Octopus Grim, discovered and destroyed 30 illegal operating refineries site, 125 tanks, 227 ovens, 11 docked outpits, 21 wooden boats. Troops also recovered 1,675,700 liters of crude oil, as well as 74,500 liters of automatic gas oil. 10 vehicles were equally recovered, 20 motorcycle, 8 weapons, 330 assorted ammunition, and arrested and 32 economic servitors were also arrested.


So, welcome to module 16. The topic today is the quotient constructions which are typical in algebraic topology. So, let us begin with the so called own construction. The subspace of R3 which is given by the equation x square plus y square equal to R square, no condition on z is a vertical cylinder of radius r, center axis will be the z axis. So, this is a model for what we call infinite cylinder ok. You can restrict the coordinate z say minus 5 to plus 5 then it will be cylinder of height 10 alright. So, you can you know z axis can be restricted to some extent that is also cylinder ok. So, what topologically what this one is nothing but S1 cross an interval. The interval could be infinite length, finite length closed interval or open interval all these things are called cylinders S1 cross j. So, these are called actually circular cylinders in physics ok. So, we will generalize this concept you can call any space cross an interval as a cylinder and the cylinder as x as a base instead of the circle. The x topological space cross 0 1 you can think of this as cylinder ok. Now, this kind of generalization we are going to do for what is known in in layman's parlor or in physics the usual definition of a cone ok. So, in algebraic topology we define the cone based on any topological space x what we do take x cross i. In fact, you can take any interval, but let us standardize to unit interval x cross i and then identify x comma t with x comma 0 or x comma 1 what ever y comma t this should be for all t not equal to 0. So, what is this happening here? x comma 0 is x comma t, x comma t is x comma t you know no identifications where t is not equal to 0, but when t equal to 0 all x comma 0 is identified with y comma 0 for every x y and x ok. So, this is the space for t not equal to 0 the only identification is with itself there is no identification x comma t is x comma t, but on the base namely x comma 0 in x cross i every point is identified with every other point. So, the entire x cross 0 is identified to a single point. So, this quotient space is called the cone over x ok. The point namely the entire x cross 0 which identify to a single point that is called vertex of the cone or apex of the cone ok. So, you can just denote it by simply by style. The space x itself can then be identified with the image of x cross 1 on the top ok that is a quotient space and this then refers to the base of the cone. You can think of to get a idea of cone you can always think of x as s 1 the circle it could be instead of circle it could be n lips also to I guessed it could be a curve and then you can talk about the cone over the curve. So, this is what the generalization is about ok. So, the base of the cone is the starting with the topological space that is a base, but then that will be subspace of the cone via several ways, but I have taken in one particular way namely x goes to x comma 1. So, here is a picture you start with x cross 0 and then the bottom x cross 0 x cross i here bottom x cross 0 is completely identified to a single point here. Whereas x cross 1 is can be thought of as the original x here. In fact, you could have put x cross half here there will be a copy of x to x here also. In the picture it will be somewhat shun but it is homomorphic to that copy or x cross t t naught equal to 0 there will be homomorphic to x itself namely x going to x comma d right. This cone construction is very fundamental in homotopy theory you will see why that is so important. So, for an arbitrary point of this cone over x in this notation can be represented in the form x comma t bracket curly bracket to usual and parenthesis would have been origin thing. Now, we have put square brackets for some x belong to x and t belong to i. Normally square brackets we did not the equivalence classes ok. The representation being unique if t is not equal to 0, but for t equal to 0 any x comma 0 will represent the same point ok. So, x comma 0 will represent the vertex 0 for all x. Though C x may not have any linear structure it is not a vector space, but something nice happens namely it makes sense to talk about line segments through any point x comma t of C x and star. Passing through star there are lines what are they namely the image of little x cross i so that whole thing is there. It is actually homomorphic to i itself for each x x comma t t going to x comma t will give you a embedding of the interval i inside x cross in x cross i to again C x ok. So, from star you can go to any other point of x t by a line segment ok. The points how what is the point somehow x t is there you take x comma s t when s is 0 it will be the star when x is 1 it will be your point x t. So, thus entire comb is star shaped in this sense the star acts as f x ok. So, this f x we have defined for a any star shaped set. So, here also we call it as f x we call it as a vertex also vertex of the point also that is also used ok. Observe that the map x t s going to x of s t ok just we have taken that map here defines the homotopy of the constant map star ok when s is 0 it is a constant map and s is 1 it is the identity map. So, in particular this gives you it is contractible of course you do not need this proof because once something star shaped we know that it is contractible, but that was in vector space. So, you better see what is the meaning of this one but similar to that one. Combs are always contractible irrespective of what the original space is. Suppose you take just two point space discrete space what is the cone over rate it will be just union of two lines ok at one single point because two points cross i is union of disjoint union of two lines two copies of i, but one of the point namely at 0 both the points will be identified. So, it will be again a line right. So, it is contractible x here it is two points it was not even connected. So, given any map f from x to y you can talk about the cone of f namely the map corresponding map induced on c x to c y it is a natural way to get a map on x cross i to x cross i x cross i to y cross i namely f of you know c f whatever x comma t goes to f x comma t namely f cross identity, but then you can pass down to the quotients. So, that is c f c of f of x t is f x comma t the second coordinate t part is not affected ok it has the property that if you restrict it to x namely x cross 1 then it is f it can be identified with f when you identify x with x comma 1 you can throw away that one then it is just f x so it is f. So, x to y you have a map c x and c y are larger spaces containing x and y then you can think of c f as an extension of f ok extension of f for the cones over x and cone over x and cone over y ok. So, this is what we we will have this picture namely x is sitting inside c x y is sitting inside c y namely x comma 1 and y comma 1 here ok. So, one of the nice property of c f is that c f will be a homeomorphism if filled only if f is a homeomorphism it is very easy to check the the more deeper thing here is that the cone construction is actually a factorial ok. So, if f from x to x is identity map c f will be identity map if x to y y to z you have maps ok f and g for example g composite f will be from x to z the c of g composite f is c f composite c g composite c f. So, that is the meaning of that the cone construction is actually a factorial map it is like our pi 1 pi 1 was was what what we it was a function of ROM in a topological space to the groups here it is space to space itself topological space to topological spaces ok. Now, the usefulness of the construction cone construction will come into picture in studying the homeomorphism theory. Any topological space x is contractible if filled only if the space is a retract of the cone you know cone itself is contractible always, but x itself is contractible if x is a retract of this one and conversely. So, this is the statement let us go through the proof of this take q from x cross i to c x which is the quotient map namely x cross 0 being identified as a single point ok this is just an notation for the quotient map. Suppose now you have a homeowner pH from x cross i to x such that it is identity it is a constant map at 0th level and identity at the t equal to 1. So, between 0 between the constant map and the identity map h is a homotopy ok corresponding to this there is a continuous map r from c x to c x ok defined by r of xt is equal to h of xt r of the class xt equal to h of xt you see this should be this should be independent of the class. So, let us verify if t is not 0 then xt is a single point so it is h of xt no problem if t is 0 all these is independent of x one single point ok, but h of xt depends upon x but if t is 0 this is the constant map. Therefore, this is well defined ok at all is well defined automatic collision semi continuous because it is continuous on x cross i and it boils down to c x remember c x is a quotient option it is a unique q composite this q composite r composite q is h of course that is how I have defined this ok it is boils down to the quotient space c x also this r on x comma 1 namely the subspace x it is the identity because h of x 1 is identity ok. So, we have identify x is x cross 1 this is what we are using here that is how we can talk about x as a retract of c x ok this is the meaning of retract if you want to recall it namely a function from the whole space to the subspace which is identity on elements of x and r must be continuous ok. We have used the retracts earlier we have shown that the disk d 2 in the disk d 2 the boundary namely s one is not retract of d 2 we have shown that one in proving Brouwer sweet point theorem all right. So, we have proved that if if the if the constant map is homotopic to identity map of x namely x is contractible then x is a retract of c x. Now, let us look with Converse suppose you have retraction c x to x ok then you just define h of x t by r of x t by same formula. Now, here I have used this one to define r now is r is given I am defining h ok automatically h will have the property when t is 0 it is a single point and t is 1 it is r of x t by definition it is r of x which is x ok so identity map. So, h gives you a homotopy of the constant map with the identity map of x this is tautology here right. Just I have used the fact that c x is a portion of x cross i where all the x cross 0 is identified single point and homotopy of the identity map to a single point also has this property therefore everything works fine. Now, here is an example let us take the circle more generally take any sphere you can even take s naught also ok. So, take the sphere s n minus 1 take the cone over that that will be homomorphic to the disc of one dimension higher if you start with s naught the cone over that will be homomorphic to the interval minus 1 to plus 1 if you take s 1 this will be the disc d 2 ok and so on for n equal to 2 this is the familiar polar coordinates polar coordinates of complex numbers ok r times cos theta sine theta the cos theta sine theta is a point of s 1 ok r corresponds to 0 1 so s 1 cross i you can say but when r is 0 it gives you one single point. So, the entire s 1 cross 0 is going to a single point that is a quotient value ok. So, that is why the cone over s n s 1 is d 2 for n greater or equal to 2 it is generalized polar coordinates you can when you have vector unit vector in s n minus 1 namely in r n a unit vector ok the rest of the r n can be thought of as r times unit vector when r is 0 it will give me a single point for r not equal to 0 it is 1 1 s ok. So, what we do s n minus 1 cross i d n we just write x comma t going to t times x this map is clearly continuous rejection and 1 to 1 except for points of the form s n minus 1 cross 0 the entire thing is mapped to a single point. Therefore, this map p factors down to the cone over s n minus 1 to d n this is a quotient map. So, it gives you a map which is a quotient space c s n minus 2 p bar is a unique map defined by p ok. So, p bar q composite p bar is p since the domain is compact d n is compact the ray sorry c c of s n minus 1 is compact plus s n minus is compact the product with i is compact therefore the quotient is compact. So, the domain is compact and this is Hausdorff ok continuous bijection is a homeomorphism. So, this we keep using all the time. So, we identify x cross 0 to a point ok. So, we got an ice cream cone like that you could have an x cross 1 also to a point then you would have what a tent both of them are cones homeomorphically all that you can x comma t you can change x comma 1 minus t then you would get the other one. So, there is no problem in fact what we can do is any interval also I have told you but we have just standardized these things so that again and again you do not have to keep on changing coordinates that is all. Now, let me tell you about another important construction called adjunction space. So, pay attention to the definitions you should not have any confusion in the definition you start with a space and a closed subspace z z is a closed subspace of x ok sorry the other way around z is x is a closed subspace of z let us do that one let me let me stick to the notation that I have already introduced do not change it here. Let x be a closed subspace of z ok then the function is there is a continuous map from x to y y is another space on the subspace you have a continuous function on this closed subset you have a continuous function ok now the adjunction space is defined as disjoint union of z and y ok modulo some relation so it is a quotient of z disjoint union y modulo some relation and I am going to denote it by af or z union over f y so these are the notations for the final quotient space it is going to be disjoint union of y and z then you have to make identification what is the what are the relation every point x in x will be identified with fx in y x will be identified as image effects for every x in x so this is the identification or no other points there are you know if z is a point not in x then it is not identified with any other point for all z is equivalent to z itself that is all all y is equivalent to y itself there is no identification inside y ok it is a point of y and a point of x they are identified when namely y must be equal to fx then only those points are identified ok this space is also called the space obtained by attaching the whole space z to the space y y are the map f ok so this this description of attaching this one this will come very very much into into operation maybe much later in algebraic biology when you study cell complexes and so on ok y can be identified with the close of space of af namely f is a junction space namely each y being its class there is no identification each y itself is a class there ok so that inclusion map from the from the disjoint union to the quotient space ok that will be a closed subspace why because inverse image is just y is disjoint you know why you insert that is closed here this disjoint union of two spaces both y and z are closed subspaces ok only thing is we won't get a copy of z in z z you and this one because there is some identifications inside x suppose fx is equal to fx1 equal to fx2 then fx1 fx2 x1 and x2 will be identified with fx1 fx2 right so it depends upon whether f is injective or not so z may not be a subspace of the entire thing all right but why is a subspace if the image of f is closed in a y it's a extra hypothesis then z will be closed in f that means image of z will be closed in af ok also if f is injective then z can be identified as image af if f is injective then there will not be any identity within points of z then the z goes into its class it's a single point that's each class a single point ok so then z can be identified z will be also a subspace ok the quotient this adjunction space is a so wide definition it it gives you lots of examples in some special case have their special names now all right now I am going to make several claims here which are all topological claims which are all of easy claims but unless you verify them each you know step by step you will not give the full picture of what are these new concepts so you have to spend that much of time ok so reader is requested to verify the validity of each and every claim made by the above paragraph you have to see everything close up space blah blah blah so you have to verify for instance y is j and embedding ok why j y is close subspace of af etc all this you be sure that you have verified them yourself so we will take some special cases now the mapping cylinder remember just now we have defined the cylinder now I am going to define a mapping cylinder f from x to y is a function say is a just a continuous map ok then the mapping cylinder is first of all on x I have a cylinder x cross y then I take this joint union with y just like I took z cross disjoint union z then sorry z and y disjoint union in the adjunction space is y disjoint union x cross y then I have identification namely x comma one the other one of the end points is identified the effects ok for every excellence so this is a a special case of the adjunction space namely z dis x cross y x cross i here and x is x cross one on x cross one think of f being identified f being defined there ok if you put z equal to x cross i and x equal to x cross one here in the earlier example adjunction space you get the mapping cylinder of f so this is a special case this is called a mapping cylinder of f and this denoted by m s the reader may think of this as a special case of adjunction space construction that is what I have told so here is the details of that before that let me show you the picture for mapping cylinder so you had x here and x cross i ok but before that I had a map x to y in this picture I am showing x as a disk and y as just a curve here so that is the image of f ok so image of f is a curve y is a is this square is the rectangle y is a rectangle x is a disk but the image is only just a curve here ok the mapping cylinder is I have taken x cross i but at the x cross one x cross one does not remain as it is x cross one because each point x cross one has to be get identified with its image under f so in this point goes to this point then x cross one will be identified at this point and so on so this is the picture for the mapping cylinder m f ok m for mapping cylinder of f ok so there are various inclusions and so on because of the importance of this let us pay some attention to this one just like in the case of adjunctions pay let us say map j from y to m f it is always an inclusion because the space y is not disturbed ok there is a map from inclusion map i from x to m f this is at x cross 0 or any other x cross if not x cross one x cross one there are identification ok so this inclusion is x cross 0 the i of x is x cross 0 and then there is f hat from m f to y f itself is extended ok f hat of x t is f x f hat of if you say x 0 it is just f f and x one thing turn one will get identified with all these effects f hat of y i have defined it is just y ok is y is you know if it is f hat of x then this is this f f x will be y of course so this map f hat is continuous you have to verify i have defined on x cross i i have defined f hat like this and on y i have defined this way whenever the there is identification they are ok because f x here is x comma one let us identify with f x that is why this works ok so f hat is an extension of of it is x contained inside m f x cross 0 is an extension of that so here are the claims i and j are embeddings ok i is embedding of of x and j is embedding of y we use them i have to identify x and y as subspaces of m f x and y are arbitrary spacing there is a map between them now m f will include these both domain and codomain of f as subspaces of this space ok so they it brings them together this is the whole idea now f hat is defines a continuous function on m f such that f hat composed i x is f hat of x is f hat for every x check that f composite j is identity of y that is how we have defined it here right f hat of y is y which will soon see that in a very strong sense the mapping cylinder can be used to device as a device to replace the continuous function f from x to y by inclusion map from x to m f what is the meaning of this replacement we will let you know later soon the mapping cylinder is a special case of the exemption space there are some more things we shall consider them next time thank you


Right now everybody's going to tell a lie. I'm giving you permission. Who do you want to be?   They're going to make fun of you. Now listen to me. Everybody's going to laugh at you. Are you guys ready for the embarrassment?  Are you guys ready to be a fool for your best life?   No ways.  Reinvent yourself. Future truth. Make the lie. I am the best leader in the world. I'm the best husband in the world. I'm the best father in the world to my three children. I'm in great shape. I'm going to give it all I got. And you live in this state every second, 60 minutes an hour, every second of the day. I swear on my life, you will become this.  Listen about politics.  And I swear to God, if you listen to me today, you will create this and no one can take it away from you. It's a new identity. And people will tell you you're crazy. Yeah, I'm crazy. What do you want me to do?   No, they don't want to see you win.    You're embarrassing the family. You know what's embarrassing?  Everybody's the same in this world now. I'm walking by people. It's like, motory skills.      Of course you don't.     You like it.   Not only for your own benefit and gain, would you want to change? But how about doing it for some other motherfuckers that are counting on you? It's like, dude, like that's the good life. Like why were you here to consume?  I want to be a contributor. What do you want? You got a vision. You got imagination. You must execute.   Be rid of the rest. When you can be so disciplined that you'll do things that you don't want to do and find enjoyment in doing these things that you know that everyone else don't want to do, you immediately go to a new level. Today, some of you have made a decision to make history. Today, some of you have made a decision to quit. That's the secret.  Every day. Not some days, every day. Not five days a week, seven days a week. You can be consistent in three years. Two to three years. You'll be a multimillionaire. Swear to God. Test me.   Man, I'm telling you right now. The only people you know and you know their names are people that execute and that are consistent. Dude, some of you will never be known. I'm just telling the truth on this call today. By the way, the truth is ugly. The truth is ugly. People don't want to tell you the truth no more. They want to make you feel good. I don't care about making you feel good. I want to give you the truth. You don't train and get better? If you don't become a better version of yourself, guess what? Every single one of you are screwed. We settle.  It's too hard.  Yep. I'm uncomfortable over there, dude. I don't like that. Okay, cool.   You'll die with regrets. Your kids will look up to someone else.    No ways. I'll stay over here and I'll fight. I want you to brainwash yourself that your marriage is the greatest marriage in the world. Even if it's not.    I'm not a good mom.  It's a decision you have to make. So many of you right now are looking for your home, building army. By the way, there's introverts, right? Like me.  Cause when you do, you're dangerous.  They'll turn their wounds into their weapons.