 Let us now summarize our understanding of the optimal mechanism that we discussed in the previous two modules, one for the single agent case and for the multi-agent case. And we finally concluded that the optimal mechanism design problem can be reduced to this relatively simple expression for the optimization problem where we are maximizing the following quantity. This quantity is the sum of the products of the virtual valuations of each of these agents multiplied by their probability of getting allocated that object and then taking the expectation with respect to gt which is the prior distribution over the type profile t. And we will have to maximize this with respect to f where f is non-decreasing in expectation. So, this non-decreasing in expectation is required to ensure that the mechanism is truthful incentive compatible in the Bayesian setup. And we have found that under a mild enough assumption of regularity which is satisfied by most of the distributions, majority of the distributions that we will be dealing with, the solution happens to be relatively simple. So, the agents now instead of looking at their types directly, we are looking at their virtual types or the virtual valuations WITI and the object is allocated to the agent whose virtual valuation is the highest and all the other agents do not get that object. Now we can also once we know that this is the FIT the allocation rule, then using the Mayerson's payment formula we can find out the payment for each of these players. We will do that in this module and we will see how those things are related. Now one observation that we can make is that we actually started to find the mechanism which is non-decreasing in expectation. That means we are actually trying to find some randomized mechanism which satisfies this property of BIC and IIR. But with this assumption of regularity what we actually found is a mechanism which is deterministic. It is deterministic because we are either allocating the whole object to that agent or nothing at all. It is individually rational. So, this is not interim individually rational for any distribution, any prior this is going to be individually rational and also DSIC because this the mechanism that we actually found is not only non-decreasing in expectation it is actually non-decreasing. So, according to the first result of Mayerson's characterization we can conclude that this mechanism is dominant strategy incentive compatible. So, we actually found a mechanism which is much stronger in a larger class of mechanisms. So, the optimal mechanism as this picture shows that in this class of BIC, IIR and randomized mechanisms there is a smaller subclass called which are DSIC, IIR and deterministic but our optimal mechanism incidentally lies in that smaller set. So, let us now look at what is the actual allocation and payment for this optimal mechanism the Mayerson's optimal mechanism for single object allocation in the most general setting with multiple agents and this the whole learning that we have done in the previous modules can be summarized into this theorem. So, suppose every agent's valuation is regular that is an assumption that we will start with and for every type profile then the following things should happen for the optimal mechanism. So, if the virtual valuations are all negative for all these players then it is best to not sell the object that is what the optimal value of that optimization problem would give you otherwise if there exists at least one agent whose virtual valuation is positive or non-negative then we are going to give it to the agent who has the highest virtual valuation. So, this is the second condition and ties can be broken arbitrarily. Now, we can once we know this allocation rule we can find out what is the payment according to the payment formula that we have given in the characterization result. So, payments will be given by now that we will have to take care of both these cases. The first case is where all the if all the virtual valuations are negative. So, we will have to first look at whether the virtual valuation is positive or not and the second case is whether that valuation so among multiple agents we should be able to give it to the agent who has the highest virtual valuation but when you look at the integral formula you will see a point at which and this is something that we have also observed for other mechanisms particularly the second price auctions that there is a point after which this agent starts becoming the winner that is it actually crosses this threshold. So, suppose i is the highest agent who has the highest virtual valuation so till which point it actually starts becoming the winner could be the threshold and therefore I mean I am not going into the going into the actual derivation of this payment because it is straightforward and one can do that but I am just giving you some intuition what is happening. So, if the allocation for an agent is 0 then the payment will also be equal to 0 that is quite obvious but for the for the other case when it is the agent who is actually winning this object it has to look at two cases the first one is the inverse value of this inverse function of wi of 0. So, this is the that value of this agent at which point the virtual valuation becomes 0. So, you can you can remember that the virtual valuations where a monotone increasing function and it was crossing that y equal to 0 line at some point. So, this point is essentially so if on the y-axis we plot wi ti and on the on the x-axis we have this ti. So, this is the point which is wi inverse of 0. So, it has to cross that positive value otherwise it will not be considered to becoming become a winner and the the second condition is that it has to cross the value of the second highest virtual valuation. So, its virtual valuation should cross the second highest virtual valuation that value is being denoted by ki star t minus i. So, so, these two things we have actually already defined and if these conditions get satisfied then we can say that this mechanism f and the vector is the optimal mechanism. So, f comma p is a is an optimal mechanism if it satisfies this set of conditions. So, this gives a complete prescription of how optimal mechanism should be designed as long as their their virtual valuations are regular and you are looking at only single object allocation. So, let us now look at some examples to understand how does the the optimal mechanism look like. So, suppose we start with two buyers. So, their type set is given by this interval 0 to 12 and 0 to 18 and each of this has uniform and independent prior. So, the the first thing will be to calculate their virtual valuations and the virtual valuation you can you can do this math to find out that this is going to be 2 t 1 minus 12. Similarly, for player 2 it is going to be 2 t 2 minus 18. Now, let us look at various cases of t 1 and t 2 such that we can visualize who will be the winner in this case and what will be their payments. So, the first type profile that we are looking at is when t 1 is 4 and t 2 is 8. Clearly in that case the virtual valuations are both negative. So, therefore nobody gets this object the object is unsold and both of these players get 0 as their payment. Now, when it is for player 1 when it is 2 and for player 2 it is 12 then you can see that this agent for the player 2 the threshold is crossed. So, its virtual valuation is positive but for player 1 the virtual valuation is is negative. So, it is definitely going to be sold to player 2 but how can we say what is the payment? The payment will come from this formula that first you look at the W inverse W 2 inverse of 0. So, in this case W 2 inverse of 0 is 9 and just for I mean here we will not need it but let us also save the case that W 1 inverse of 0 is 6. So, this is 9 and the other situation that this becomes so what is the threshold at which it starts becoming the winner? What is that value of k i star t minus i? Turns out that the other agents virtual valuation is exactly equal to I mean it is negative. So, if you look at if you try to sort of compare the point at which it starts becoming the winner that is W 2 t 2 is actually greater than or equal to W 1 t 1 you will find that this quantity is negative which is because it is 2 it will be minus 8. So, you will find that the value of so if you want to find this out this is greater than or equal to minus 8. So, you can find that t 2 will be greater than or equal to 5 in this case and from that point onwards it starts becoming a winner but because this inverse value of W inverse of 0 is larger than this value. So, therefore the payment will be the max of these two quantities which is 9 in this case. So, similarly we can do the calculation for when both these cases are 6. So, in this case this exactly becomes equal to 0 W 1 and W 2 t 2 is not crossing that the threshold of 0. So, therefore the inverse thing happens it goes to player 1 and this number which is the W inverse of 0 W 1 inverse of 0 is becoming the payment for player 1. Now we consider this case where it is 9 for both these players. So, for this case for player 2 it exactly becomes equal to 0. So, the W 2 t 2 becomes exactly equal to 0 here it is a positive quantity. Now again because this positive quantity is larger than that 0. So, therefore player 1 becomes the winner and it pays a certain amount which is going to be the max of those two quantities. Now the last situation is an interesting situation because in this case what is happening is both these players have virtual valuation which is positive. So, they both cross the threshold of 0. Now the important part is that because this is 8 and this is 15. So, what is the corresponding value of W 1 t 1 W 1 t 1 is 4 and W 2 t 2 is 12. So, clearly the player 2 wins its virtual valuation is larger but at what point it starts becoming the winner and then you can actually compare between these two things the that point where it starts becoming the winner and also this W 2 inverse of 0 which is 9. So, whichever is larger this agent will be asked to pay that. So, how can we actually consider at which point it starts becoming the winner. So, to find that we have to look at the virtual valuation 2 t minus 18 and equate that. So, the point at which it starts becoming exactly equal to the virtual valuation of the other player which is 4 that is the point where it starts becoming the winner. So, now you can see that t 2 must be at least as much as 11 that is the point at which it starts becoming the winner. So, because this threshold is larger than this 9. So, the max of these two numbers will be exactly equal to 11. So, therefore player 2 will be asked to pay this much amount. So, that explains how this optimal mechanism works. In some sense you can think of that this quantity here is acting like a reserve price that you do not really ask this agent to just become the winner and take this away. So, the payment should not be exactly equal to the point of where it starts becoming the winner rather there is a kind of a reserve price. If you do not cross that value then possibly will not win it and even if between these two points this becomes the larger one. So, the reserve price is essentially larger than the let us say the second highest bid then you actually pay the reserve price not the second highest bid. So, that is exactly what this mechanism is trying to do. So, this is a sort of an intuition that you can keep in mind. That intuition is very direct when you have symmetric bidders. So, the all the valuations are drawn from the same distribution. So, therefore GIs and Ti's are all the same and therefore the virtual valuation is also going to be the same for all these agents. So, in that case what we know because of the condition of regularity that whenever this inequality holds this implies and is implied by the fact that Ti the corresponding type of that player is also going to be larger than the other agent. So, then the mechanism or this optimal mechanism becomes a little simpler the object actually goes to the highest bidder and it is not sold if the virtual valuation of all the agents become less than 0. Then the payment will just be W inverse of 0 and the max over the rest of the agents. So, this means that you are giving it to the highest bidder you are charging it the second highest bid or the reserve price. So, this is exactly equal to the second price option with a reserve price in the case of symmetric bidders. All right. So, now we are actually going to talk about the efficiency part of this optimal mechanism. So far we have not worried about what is the what is the sum of the valuation of these agents or whether we are allocating the object in the efficient way we are just trying to maximize the revenue of this mechanism. And in this mechanism in this example we will see that there is a kind of a tension between efficiency and optimality. So, the example is the following. So, there are two players again player one has the type that the set the type set is essentially between 0 and 10 the interval between 0 and 10 and the interval between 0 to 6 for player 2. And we are going to assume that the players are uniform and independent. So, then you can actually find out the what is the virtual valuation and virtual valuation for both these agents. So, because we are talking about efficiency will not be bothering much about the payments we will just be talking about at what point it starts becoming the whoever becomes the winner. So, we see the first observation that we can make is if so the condition under which both these valuations virtual valuations are negative. So, W2T2 negative or non-positive. So, we can see that for player one if T1 is less than or equal to 5 and for player 2 if T2 is less than equal to 3. So, that is within this rectangle here this object is getting unsolved. Now clearly this is an inefficient outcome because you could have allocated to at least the agent who values is the most. But because we are actually looking at the revenue earned from it and we have a prior distribution on that optimal mechanism tells us that the optimal revenue will actually be negative. So, we should not be selling the object at all. Even when the object is getting sold. So, you can find that out that which is the situation where each of these things. So, outside this box this red box the object is going to be sold but it is going to be sold according to the fact that whoever has the highest virtual valuation. So, you can see that in this line this line here will be the determining factor. So, the threshold on the left hand side on this side of that line you are going to give the object to player 2 because this virtual valuation will be larger. On this side player 1 will win because that the virtual valuation of W1 T1 will be larger. And how far it is from efficiency. So, this is this particular line that determining line will hit the x-axis at this point 2. And this is the 45 degree line which we have drawn this is the T1 equal to T2 line. So, clearly you can see that this line is selling the object inefficient way at least in this region. Because in this region we know that T1 is larger than T2 and you are giving the object to player 2. So, even though you are selling that object under that situation as well because of their virtual valuations and also the prior distribution on which you have found the virtual valuation. There is a skewness between the efficiency and the optimal mechanism. So, optimal mechanism does not always give the object to the efficient outcome.