 So, last time I talked about Warnow diagram and then introduced Delaney triangulation discuss various properties of both of them. Today, I am going to talk about computing them. So, I will begin with Warnow diagram and show an algorithm to compute them and then I will say what it means in terms of Delaney triangulation. So, let us begin if you remember that you are given a set of points in 2 D and the definition of Warnow itself. Before I describe the algorithm, I need to introduce a concept and what I will do is I will reduce computing the Warnow diagram in 2 D to computing the convex hull of a set of points in 3 D and that is what I will do and then I will say well although you have not seen in the class, but you will see it later how you compute the convex hull of a set of points in 3 D and this reduction I will do works in any dimension and that will also describe or explain what I said about the complexity of Warnow diagrams in higher dimensions. So, the concept I need is what is called lower envelope and I will talk about lower envelopes more next week, but suppose you are given a set of functions for our application. Let us assume each function is a bivariate function, but it can be again any number of variables you can have. It is hard for me to draw pictures in 3 D. So, I will draw for univariate functions. So, let us say that this is a function f 1, this is f 2, let us say this is f 3 or let me just keep only 3. Then the lower envelope which I will denote as l of x that is minimum. So, what I am doing is I am taking the point wise minimum of these functions. So, in particular in this example what it means is that I just trace the lower boundary. So, this red curve that you see that that is a graph of the lower envelope because I am staying the point wise minimum. What you notice is if you trace the lower envelope then let us see if I can use this technology never mind. So, in the beginning left side you have f 3 that is showing on the lower envelope. So, here you have 3, then function 2 shows up on the envelope, then the function 1 shows on the lower envelope, then again 3, then 2, then 1. So, these are called break points. So, if you trace the lower envelope what is happening is one function is showing on the envelope, then you switch from one function to another function, then some other function shows on the envelope and so on. So, what happens is that if you look at the since I have drawn univariate function what this lower envelope does is it partitions the real axis or the x axis into intervals. So, that the same function appears on the envelope within each interval. So, you have this is one interval, this is another interval. So, you have real axis partition in intervals where the same function appears on envelope. So, this partition of the real axis into this intervals that is called minimization diagram. It will become a clear in a minute what has this to do with the Bernoulli diagram. Thinking a little ahead, the way I define the lower envelope one can also define what is called upper envelope of a set of functions. So, if I let me choose my another favorite color that one show that is what I am thinking let me do green. So, that is a point was maximum, I will not write it down. So, if lower envelope was point was minimum you were tracing the lower envelope and upper envelope is point was maximum of a set of functions. Now, why I need this what I will do is I will define a function f i is a distance. So, what does this function look like if we look at the graph of this function I did not teach the minimization diagram yet I am just asking you. So, if you look at the function f i x what does what is the shape of this function. So, it is a Euclidean distance you are talking about. So, if I draw this function what would it look like no no do not go to Bernoulli earlier it is a very much. So, function f i I have defined is for given point x in the let us say if this motion is confusing think about as f i x y and let us say p i is its coordinates are a i b i then this is root x minus a i square plus y minus b that is Euclidean distance that is a distance function go ahead pardon no it is not a sphere it is a cone right because sphere is a label set of this function. So, if I look at this function that looks like well again. So, let me try to draw. So, if this is point p i that is what the function look like this cone. So, this is f function f i. So, if you took the point any x this value is f i x now if I look at the lower envelope. So, now you have this functions f i 1 for each point now you get the set of functions you did this for each point. Now, I look at the lower envelope. So, this is minimum. So, what the lower envelope means what is this function l lower envelope of this functions mean. So, remember the low envelope is point wise minimum right. So, when I look at this particular functions with f i is the distance from x to p i then what is the lower envelope correspond to it to the surface, but what does the point there mean yes. So, it is a distance from x to the nearest point am I right. So, this is the distance from x to the nearest point in s and this is the related to Bernoulli diagram the way it is defined is a minimum point. Now, if I look at the minimization diagram of f of this set of functions now here I had done the in the in this figure minimization diagram I had shown was for one dimensional function for univariate functions. If I want to do it for 2 d functions bivariate functions then. So, I just put it here and it will work. So, suppose this is your x y plane and if you had a set of functions you do the lower envelope now what you will get is you will get some partition of the plane into some regions and here let us say f 1 is minimum here f 2 f 3 f 4 and so on in the different regions faces the different function will appear on the envelope. So, it will be a instead of a when you talk about bivariate functions instead of a partition of the line into intervals what happens now is you have a partition of the plane into regions. So, that the same function appears on the envelope all right. Now, can you guess what does the minimization diagram of this function will correspond to? So, if you look at a region so within each region same function f i appears on the envelope am I right? So, that is the definition of the minimization diagram that was the definition of the minimization diagram. So, what does it mean is that if you look at the any region it is the same function appears on the envelope and in the case in this particular case a function appearing on the envelope it means it is the nearest neighbor and that is precisely definition of the Varunoi cell. So, this basically it means that this region corresponds to the Varunoi of. So, if you take the minimization diagram and look at each region each region in this minimization diagram corresponds to the Varunoi cell of the point. So, minimization diagram of f this is the nothing but Varunoi diagram of s. So, what I have shown you is what the Varunoi diagram means is you define a set of functions these are the distance functions you look at the point as minimum and look at the minimization diagram which is nothing but take the functions and you project it on the plane you get the diagram. So, when we are thinking about this is follows you draw this cones this is one point let me do it on the piece of paper. So, you draw this cones around each point well I have drawn the finite cones but this cones extend to infinity and you look from below you see some surface that is called Varunoi surface you project it down on the plane you get the Varunoi diagram. So, but so what yeah yes because that is a very good question if and it will you will see in a minute if you have a cone if you take the two cones these cones are identical in general that is not the case if you take that take the two arbitrary cones intersect them it is not a if you look at the by the intersection curve project it you will get a parabola or some conic but in these special cones these are two identical cones they just shifted then you they you get the parabola you get of the intersection curve then you project it it will be a line which will be nothing but the perpendicular bisector of these two points of their pieces. But you are asking a question just keep it in mind next class you will see the consequence of what you are asking the question. So, so yeah it looks sort of miracle but that is what really happens and you will see why what is going on in a minute any questions about what I said so far all right. So, it is relates to this question so why this cones which are quadratic curves quadratic surfaces why does it lead to polygonal regions convex nice convex regions and here is a reason. So, I define let me start a new page let me define g i x is a square of quadratic of square of that function which in this case I remember there was a square root I I remove the square root. So, this becomes so this is nothing but a parabola I took the square if you look at this equation this this function is a parabola I now what I am going to do is I am going to subtract the quadratic term. So, I define y square so what you get the quadratic term disappears ah thank you. So, I started the cone when I squared it I got a parabola I when I removed the quadratic term I got an equation of a plane. So, this is a linear function this is a plane and this was parabola all right. So, what is all this good for and here is the main claim. So, let H be this set of n planes and here is the claim y naught diagram of s which we know is the lower mill up is the minimization. So, what I am saying is that I started this functions f and in the two stages I transform them to function h in during this transformation the functions have changed, but the minimization diagram has not changed can someone guess can someone argue why this is the case why the minimization diagram has not changed during this is transformation not constant x square that is right. So, what I am doing is as is squaring does not affect anything and I am subtracting a common term so it does not affect. So, let me just go through it so here is the proof. So, what I need to argue is that if for any x if f i is less than f j that implies that h i should be less than h j if I can argue that then minimization diagram will not change because the relative ordering of functions has not changed at any point. So, what I need to prove is this implies that same inequality should also be true for h i x and h j x well I have this tendency of thinking of x as a vector instead of a scalar. So, let me just continue with that so this implies by the one thing I should say that f i and f j are non-negative functions otherwise either will be trouble little bit trouble. So, since they are non-negative then this is the case because the squaring both sides does not change the inequality you see that what the mass I am creating because by maybe I should be careful and put a y also there to avoid confusion. I feel like a kid playing with a magic slate that I used to do as a kid so it is a f i square y minus x square and this is nothing but because this was the definition of this was nothing but this is h i x y and this is s j x y. So, what I so what it means is that the minimization diagram of these cones is nothing but the minimization diagram of these planes let me show you geometrically what is happening. So, we started with these cones let me draw the picture in one d because it is easier for me to draw. So, you had these cones and this was the minimization diagram I squared it I replace them by a by a parabola in that process I did not change minimization diagram. In the third step what I did was I subtracted minus x square minus y square term in this one minus x square. So, what you think about is that you think about this horizontal line x axis as being a flexible bar what you are doing is you are bending it downward. When you bending downward this horizontal line is becoming a parabola or in this one dimensional parabola and this parabola are stretching to a straight line. So, what happens is that this becomes like this and and the ordinary parabola they become lines in this tangent to this parabola and the same thing happens in high dimensions also and the minimization diagram did not change in this process. The nice thing is that minimization diagram is not the minimization diagram of these lines in this one. And if I think about so this is the set of points that lies below all the lines. So, it lies below each line. So, it is a set of points that lies below all the lines. If you think about half plane bounded by this line lying below this line then this region is nothing but the intersection of these half planes or in 3 d to the half spaces. So, let me go now to the next page. So, if I define gamma i is so it is a basically the half space lying below the plane h i. So, here was your let us say h i then the region lying below it that is a gamma i. Then the minimization diagram of the low envelope is the same as the intersection of gamma i which is what I drew here that the low envelope of these lines is nothing but the intersection of these half space. Now, you have heard about learnt about intersection of half planes or half spaces. So, it is a and you take the intersection of half spaces it is a convex polytope. And what you do is you take the intersection of these half spaces and you project it in the plane and you get the Warnoy diagram. And I assume you have heard of duality am I right. So, what it sort of says is that you wanted to compute the Warnoy diagram of a set of points. And what I reduced it to through this process I reduced it to computing intersection of n half spaces. So, computing Warnoy of is reduced to compute the Warnoy diagram. So, what you are computing now how do I compute the intersection of half spaces I do the use a duality. Now, what I do is just for some it will be easier to think about I will reverse the z direction. So, if I will reverse the z direction in this 2 D I reverse the y direction then the what happens earlier you are looking at the point was minimum. But if you look at the manner reverse the y direction you are looking at the point was maximum am I right. So, if I define so where was h i was h i was the equation was minus 2 I x minus 2 B y plus A i square plus y square. Now, let me I define h i bar x y is 2 A x plus 2 B y. So, this is I just took the negation of it. And now if I apply the duality then what the duality does is the following let me write. So, the becomes 2 A i 2 B i that is what it maps to and let now what is the intersection of half spaces correspond to when you look at a dual convex hull right. So, now what happens is that you had this intersection of half spaces gamma i I took this points I dualized them then dual of intersection of gamma i maps to convex hull of h s star. So, what I did was I started a set of points in 2 D I wanted to compute the Bernoulli diagram I map them to a planes in 3 D and I said Bernoulli diagram is nothing but take the intersection of this half spaces and project them. Now, I did that use a duality I map them to a set of points in 3 D and I am saying it is a dual of the intersection of this half spaces is nothing but the convex hull of this points. So, what I did was if I put the all the pieces together the Bernoulli diagram of a set of points in 2 D maps to a convex hull of a set of points in 3 D. Now, you will see later in the class that you can compute the convex hull of a set of points in 3 D in n log n time. So, convex hull can be computed log n time. So, what that implies is for now let us assume this as a black box what this implies is that you can compute the Bernoulli diagram of a set of points in 2 D in n log n time. Now, this all everything I said so far except the last sentence it was in d dimensions also in high dimensions. So, the convex varnoy diagram of a set of points in d dimensions maps to a convex hull of a set of points in d plus 1 dimensions and there is a classical theorem in convex t that if you have a set of n points and if you look at the convex hull of n points its complexity is n to power d over 2 floor. So, what is called actually it is so called upper bound theorem the number of faces on the convex. Now, in our case when you are looking the varnoy diagrams in d dimensions it was a convex hull in d plus 1 dimensions. So, you take the d plus 1 over the floor which is the same as d over 2 ceiling and that is what I had said last time any questions. So, no well you could try, but it would not work. So, because what is the case is that varnoy diagram by definition by varnoy diagram as I sort of what I showed you was that so that is why I went through this instead of the reason I went through this whole steps is to sort of not to give you as a mystery why that is the case because what is the varnoy diagram varnoy diagram is nothing but this minimization diagram because it is inherently defined by the set of functions and the set of functions at one high dimensions and you are taking the lower envelope and projecting them into d dimensions. So, varnoy diagram involves a projection of a d plus 1 dimensional object to one lower dimension that is why that is how it is coming. And here it is a convex hull in one higher dimension that is why it is in d plus 1 dimension. There is a generalization of varnoy diagram which I hope I will say it in one higher dimension sorry on Friday what is called power diagram. Varnoy diagram is a very specific case of that and that is inherently is d plus 1 dimensional object it just happens to be a specific case. For example, the way another way of thinking about is the following that the varnoy diagram is a lower envelope of these planes which are tangent to this paraboloid. Now, in general if I draw some planes they will not be tangent to paraboloid one can talk about the taking the some arbitrary planes and take the lower envelope and it will reduce to some generalization of varnoy diagram and that will be d plus 1 dimensional object and this just happens to be a special case. Now, here I did the duality am I right because for the period I do it I use a duality here I took this I had the set of half planes I dualized them to set of points. In the last class I talked about the duality in the planar graph sense I said varnoy diagram when the it dual was delanet triangulation. Now, what is the relationship between this convex hull what will this convex hull look like if you take this convex hull right. So, I am doing a duality here because here is I am saying the dual of this intersection is a convex hull, but I had this convex hull in one high dimensions of the set H star. I take the convex hull so what I if I want to go back to varnoy diagram what I do is I have the set of points H star I compute this convex hull map it back the dual I get the intersection of this half spaces and then I project it down I get the varnoy diagram, but if I take the convex hull and I project the convex hull back down to two dimensions because H star is a set of points in 3 D. So, convex hull if I project it down to the plane this convex hull what will I get I will get the delanet triangulation of the point set and to see that you have to be little careful because. So, in general they are not, but this is a magic in this case it just works out like magic in this case, but in general you are right it does not all work like this. So, this is a there is a general theory and I am just not showing the whole theory I am just showing you some kind of a special case of that and that is why it looks like magic and I will not have time to really go through the whole this stuff and to talk about it when this is really works. So, if you remember that so H I was 2 A I 2 B I A I plus by square what I do is I scale it by a factor of 2. So, let us define the set of points let us call it H I sharp I divide each coordinate by factor of 2. So, I just shrink everything by factor of 2. So, then what happens it becomes A I B I and notice that A I B I is a similar the coordinates of the ith point. So, what happened? So, if I look at the so if I define H and remember that what was set S, S was to remind you was A I B I. So, if you look at the set S and H sharp the X and Y coordinates are the same as to the set of points in 2 D and H sharp is a set of points in 3 D, but the X Y coordinates are the same, but they only Z coordinate. So, how do you get H sharp from S? So, this is a lifting transform that you have seen in the class I believe yes precisely. So, what you are doing is this is a following again I will draw in the only in one dimension. So, I will write the equation in general in 3 D is 2 and if you had the point P I you just lift it to the parabola. So, if you want to compute a delanet triangulation here is the one way of doing it take the set of points lift them on the parabola Z is equal to x square plus y square over 2 take its convex hull project it down you get the delanet triangulation. So, there is a deep relationship between Wynor diagrams convex hulls delanet triangulation convex hulls they are all related concepts, but just have to think in one higher dimension any questions good question I will answer your question in a minute. Any other questions what I said so far I will before I answer her question. So, why is this convex hull is a delanet triangulation? I will not give you the complete proof, but I will give you partial proof and then you can fill in the details remember what I said for delanet triangulation delanet triangulation had the following property. If you took a if this was a triangle P Q R if it was a triangle if you take the circum circle this does not contain any point all the points lie outside this circum circle am I right. So, that was the property and let us now talk about what is this correspond to in 3 D. So, what I did was I took the set of points in 2 D I map them on this parabola I 2. So, ignore the if you have a circle let us say circle C whose center is let us say alpha i beta i whose center is let us say alpha i beta i this is center and this is the iris radius. So, center in the circle in 2 D this is r i. So, the equation of the circle is assume this you have seen might have seen this one and the points lines at the circle that correspond to if the point x file as insert circle you replace equality by lesser than equal to if it is lies outside this becomes greater than equal to. So, now if I open it and if I replace this one with the equation Z then what you get is you can write it. So, what happens is that I took the equation of a circle and map it to a plane in 3 D. So, circle becomes a plane in the in in 3 D and this is a general techniques in algebra that is use a lot this is called it linearization technique and it comes in many different areas that number of times it is hard to deal with the higher degree terms variables and if you convert take if you have a function which is is not non-linear function polynomial you can map it to a linear function in higher dimensions and that is what is going on here. So, you are dealing with the cones or circles and you are mapping it to planes in in in one higher dimension. So, that is what I did I took the circle and map it to a it becomes a plane and if you look at the what I did was the transformation was x and y did not change, but x square plus y square became Z. So, so this transformation lifting transform this is called point x y is being mapped to x y x square plus y square which is very like there is a factor of 2 issue here, but it is very similar this is very similar to what was going on earlier right a i b i a square plus b a square 2 this is similar. So, I am again taking a set of points and mapping it to paraboloid and a circle now becomes maps to a plane. And what really happens is if you look at the convex hull and of these points that are sitting on this if you take the convex hull which in 2 D it is a polygonal chain, but what happens in 3 D you will get something like triangles and it will be a I am not good in drawing this shapes, but it will be think about your set of points in a paraboloid you will get some triangles and you will get some convex polygon. Now, if you take the plane containing one of the triangles, what this happens if you take this plane if you project it take this intersection with this paraboloid plane and when you map it down you get a circle back and a point lying above the plane means point lying outside the circle in the plane. So, if you remember that the condition for the delanet triangulation was that all the points should lie outside the circle and what it sort of means here is that all the points lie above the plane and that is the case because of convex hull. If you take any triangle of the convex hull and you look at the extent to the plane that all the points lie above it none of the points lie below it because since it is a plane defining the supporting the convex hull. So, what it means is that when you project it back, so the planes are mapping corresponding to the circles and all the points lie outside the circle and which is means it is a delanet triangulation. Now, I see that I have about how much time do I have few minutes or I am out of time couple of minutes. So, how do I construct a convex hull of a point set and let me describe in 2D and then you can imagine how you happens in 3D. So, think about the special case when the all the points are in convex position because if a points lie on a parabola all the points are all the points will be vertices of the convex hull. So, then what you do is you suppose you have computed the convex hull of some points. So, think about in 2D you have computed point. Now, I am adding a new point let us say then what you do is you think about you compute this tangent in 2D and you are going to remove this portion and replace it at this portion that is what is what happens. Now, the way you think about the way one way of think about physical way of thinking about is you have a convex hull which is a convex polytope in 3D new point think about the light source whatever it can see when you put the light some part of the polytope is being seen some part of being is not seen the portion that is being seen you remove it you get a hole which is a silhouette take each silhouette is an edge take this edge connect to the point you get the new set of points in 2D that is what is happening you have this edges that you can see you remove them in this case silhouette is only consist of two points you connect them by side lines, but in the 3D the silhouette will look like some convex polygon and here is the point and you are going to now what is this correspond to now I said this convex hull is nothing but if you project in the plane is nothing but delanet triangulation the one can ask do I really have to go through all this mapping or I can think directly in terms of delanet triangulation what is going when you insert a point what it really goes on in the next class I will tell you what it means directly in delanet triangulation ok. So, I will stop here.