 So the next speaker is Prabhakar and she's going to tell us about popular matchings again. Thanks. So this paper is on the popular roommates problem, which is a popular matchings problem in general graphs. For those who attended the workshop, I talked about popular matchings in bipartite graphs. So this is a much harder problem. Let me start from the definitions. So our input is a graph. It need not be complete though in this example, I drew a complete graph where every vertex has a strict ranking over its neighbors. So A regards B as its stock neighbor, C as its second choice neighbor and D as its worst neighbor. So let's just think of this as like participants for FST, TCS. We need to pair up people for guest house rooms and everybody has a preference on, it's not that every pair is willing to share a room also. So A would very much like to share a room with B. Well, but B has C as its top choice. C has A as the top choice. Nobody seems to want to share a room with D, but D has its own choices. And so that's our input. And this is actually called a roommate's instance, exactly from the application that I talked about. We want to pair up people so that they become roommates. And this is actually an old and well studied problem. And what one seeks here is, is there a stable matching out here? So pairing up vertices corresponds to a matching. And we would like to find a stable matching. So what is a stable matching? One that has no blocking edge. So an edge blocks a matching if the endpoints of the edge would rather be matched to each other than to their respective partners. For instance, if you look at the red matching, the pair BC would rather be matched to each other than to the respective partners. That is, B is currently matched to A, but it prefers C to A. Similarly, C is matched to D, but it prefers B to D. So B and C would rather be matched to each other than to what the red matching has assigned them to. So the red matching is not a stable matching. So this is a classical theorem from. Is there an issue why you consider complete matching? In this example, because it was a complete graph on an even number of vertices, it turned out to be a perfect matching. It did not be perfect indeed. Yeah, so Galen Shapley many years ago considered, in fact they initiated the study of stable matchings in bipartite graphs where it's easy to show that stable matchings always exist and they can be efficiently computed. Well unfortunately, in general graphs or non-bipartite graphs, stable matchings need not always exist. This very same instance shows that. So as I already discussed with Sanjay, any stable matching here has to be perfect because it's a complete graph on an even number of vertices and we could just run through the three possibilities, the three perfect matchings here and each of them has a blocking edge. So there is no stable matching in this graph. So does a roommate's instance admit a stable matching or not? So this was an old question and this was answered by Rob Irving in 1985 who showed a linear time algorithm to solve this problem. So given an instance, you can decide in linear time if there is a stable matching or not and if so to find one. However, as we saw with our starting example, there are simple instances with no stable matchings. So that motivates the question, maybe forbidding blocking edges is too restrictive a notion of stability. Why don't we ask for a more relaxed notion of stability and that's where popularity comes in. So I hope I can convince you that popularity is a natural relaxation. So it's something that the view of the retina is polynomial time identifiable whether recognizable whether there's a stable matching or not. If there is no stable matching, is there a polynomial time algorithm to find out the largest number of edges in a matching which is stable? That is to find one with minimum number of blocking edges or some such notions, so they're all NP-hard. Yeah, so indeed. Yeah, so popularity, I hope you'll be convinced at some point is a natural relaxation of stability. So this works by comparing any pair of matchings by holding a head-to-head election between them. So how do we compare a pair of matchings? Ask every vertex to vote for one matching versus another. So maybe I just show it by this example. We have two candidates here, the blue matching and the red matching. And let's say we ask every vertex, are you happier with the blue matching or the red matching? Every vertex just looks at its partner in the blue matching and its partner in the red matching. It's not concerned with what partners others have obtained. So in this election between red and blue matchings, vertex A is happier with the red matching. It gets its top partner and in blue matching it gets its worst partner. However, the remaining vertices B, C, D prefer the blue matching. Each of them gets a better partner in the blue matching. And so in this head-to-head election, the blue matching wins three votes and the red matching wins one vote. And we compare two matchings by just looking at the difference between the votes that one matching obtains and the other matching obtains in their head-to-head election. And a matching is popular if it never loses to any matching. So it loses to a matching if this difference is strictly negative. That is the other matching obtained more votes than itself. And a matching is popular if it does not lose any election. So it just count over all vertices. So the blue matching, as I said, in the red versus blue election, the blue matching got the votes of B, C and D, three votes. And the red matching got one vote. So it's three versus one. And delta red, blue would be minus two. So red for sure is not popular. Whether blue is popular or not, it's too early to say that you have to compare it against every matching and ensure that it doesn't lose against any matching. So the notion of popularity was introduced more than 40 years ago by Garden Force who observed that it's indeed a relaxation of stability. Every stable matching is popular and it's virtually a one-line proof. So when we have an election between a stable matching and a rival matching, if a vertex V votes for the rival matching, its partner in the rival matching, M of V has to vote for S. Otherwise, the edge between V and M of V would block S and S being a stable matching has no blocking edge. So a stable matching never loses a head-to-head election against any matching. So for sure, a stable matching is popular. So delta V is zero? So we can't compare that to it. So it certainly has not lost the election. So it's still an eligible candidate for popularity. So going back to the starting example which had no stable matching, in fact, it has two popular matchings. The blue matching that we saw in the earlier election is actually popular and there's one more popular matching and indeed in the election between the blue and green matchings it would be a tie between them because neither can lose against the other. So this instance has two popular matchings. Well, there are simple instances that have no popular matchings also. If you just look at a triangle where A prefers B to C, C prefers A to B and B prefers C to A. So the popular roommates' problem is the following. Given such a graph, does this instance admit a popular matching or not? And if so, we would like to find one. Well, for all the relaxation and so on, we've paid a price. This problem is NP-hard. The stable roommates' problem had a linear time algorithm and earlier this year two different groups came up with two different proofs of this hardness, Fianza et al. and Gupta et al. So for all our motivations, this problem is hard to solve. So let's take inspiration from the vast literature on fast exponential time algorithms for hard problems. So we saw several such results in Sanjay's talk earlier. So the only algorithm we know to solve this problem is actually the brute force algorithm that enumerates all matchings in the given graph. And this could take n factorial time. Is there a faster algorithm for the popular roommates' problem? If we are ready to invest time and decide if there is a popular matching or not, because the problem, let's say, is very important to us, how fast can we do it? So our main result is that we can do this in simply exponential time. So O star is hiding some poly n factors. Let's not worry about it. The popular roommates' problem can be solved in O star k to the n time where k is a constant. But the constant is unfortunately not too good. The constant k can be bounded by 3 times c, where c is a constant involved in a recent breakthrough result by Carlin et al, who showed that the maximum number of stable matchings possible in any bipartite graph that has n vertices on each side is at most c to the n. This was a long-standing open problem. Can we bound the number of stable matchings in such a bipartite graph with an upper bound of the form c raised to n? And the bounds for c are rather... So one knows instances where it's actually number of stable matchings is lower bounded by 2.28 raised to n. So this is a loose upper bound. So Carlin et al in their papers say they believe it is much slower, but they don't really... They have not really invested time to investigate it, and the hope in future one shows better bounds. So indeed, as the bound for c improves, our bound also will improve, but as it stands now, it's like this. So can you go back? Sure. So suppose, I mean, like, is the algorithm sort of oblivious to what this bound is, in the sense that, I mean, is it the case that the algorithm runs like if you promise to me that c is the number of stable matchings? Indeed. Indeed. You're right. Exactly. So Ram Prasad was asking, does my running time kind of bounded actually by function of the number of stable matchings rather than just give a hard bound on it? Indeed. It is a function of how many stable matchings. Not the given graph, but some subgraphs and some related graphs have. So, yeah, I should be a little more careful before I say, yes, sir. So let's start from, given a matching, how easy is it to test if m is popular or not? And this actually, there are combinatorial algorithms for it, but I would rather use the machinery of max weight perfect matchings. This can be modeled as a max weight perfect matching problem under an appropriate edge weight function, which is as follows. So for any edge a, b, look at the votes a and b give to each other versus the respective partners in m. So m of a or m of b could be null also, which is the worst choice for any vertex to be left unmatched. So don't think of it as an unmatched vertex, it gets a single room, so that's a preferred state. That was just a story to begin with. So every vertex wants to be matched. Yeah, so the vote of a vertex for one neighbor versus another is plus one, if it prefers the first neighbor, minus one, if it prefers the second neighbor, zero if the two neighbors are the same. So any edge weight is one of zero plus two minus two. It could be plus one, plus one, minus one, minus one, or some combination of plus one, minus one, or both zeros when a, b is in the matching. And also it would help us to regard every matching as a perfect matching. So let's augment g with self-loops and just include self-loops for all vertices left unmatched, so that henceforth all matchings would be perfect. We also have to extend our edge weight function to self-loops and that's just the vote of a vertex for itself versus its partner in m and that would be one of zero minus one. Yeah, so the way we define this edge weight function is been defined so that for any perfect matching the weight of the perfect matching under this edge weight function is exactly the difference between the votes that n gets and m gets in their head-to-head election. And this is a characterization of popular matchings. m is popular if and only if for any perfect matching n its edge weight is at most zero. And actually though the definitions of stability and popularity seem quite different the difference between a stable matching and a popular matching is exactly due to this word perfect. m is stable if and only if the weight of any matching is non-positive and m is popular if and only if the weight of every perfect matching is non-positive. So it's easy to see both these characterizations. So popular matchings and stable matchings are actually much closer than what their definition appeared to be in the beginning. So just to illustrate the edge weight function on this graph if you look at the blue matching then in fact for both the edges in the blue matching their weights are zero and ac is a blocking edge and so its weight would be plus one one plus one which would be two for other edge weights you could just sum up the votes of the end points of the edge for each other and one could just check all these edge weights and for each self-loop the edge weight is minus one because every vertex prefers to be matched to a genuine neighbor than to itself which means it was left unmatched and it's easy to check that for any perfect matching in this graph its weight is at most zero so that's a proof of the popularity of the blue matching that for all perfect matchings their edge weight is at most zero. So let's write the LP for max weight perfect matching so this is our objective function find a matching that maximizes the sum of edge weights x sub e's are variables it's a perfect matching delta prime u is just the set of edges incident to u union the self-loop so and we also have offset constraints e square brackets b is a set of edges with both end points in the set b self-loops are not a part of e square brackets b so this is a well-known LP for max weight perfect matchings and m is popular is equivalent to saying the optimal value of this LP is zero so we argued earlier it's at most zero and in fact it's exactly zero because m itself has weight zero under this edge weight function so its dual will be interesting to us will be useful to us actually and the dual variables are alpha sub u's corresponding to these constraints and z sub b's corresponding to these constraints so every edge should be covered that's what really this constraint says self-loop should also be covered and alphas don't have to be non-negative because we talked of perfect matchings whereas z sub b's are non-negative and the earlier point that the optimal value of the primal LP has to be zero that was a characterization of popularity in the language of dual it translates to there has to be a dual feasible solution such that the dual objective function evaluates to zero and we call that has to be a dual optimal solution we call that a witness of a popular matching so in fact we can sharpen a witness so if m is popular then m always has an integral witness where alpha sub u for every vertex u has to be one of minus one plus one zero and in fact z sub b for all odd sets b is one of zero one two so this actually follows from total dual integrality of the formulation and the fact that m itself is a primal optimal solution so in fact the z sub b seem to be a little bothersome we have exponentially many variables suppose m is a matching that has a witness with far more structure let alphas be the way they were earlier but suppose z sub b is zero for all odd sets b can we say something more about m than just the fact that it's a popular matching so for that let's actually digress into fractional matchings so a fractional matching is just a vector so that for every vertex the sum of p is of edges incident to it including on its self-loop is equal to one maybe yeah so this example where p e is half for each of these three edges that's a fractional matching we are in non-bipartite graphs so a fractional matching need not be a convex combination of matchings as in this example so the function delta that we use to compare to integral matchings it generalizes easily to compare an integral matching with a fractional matching as follows just a linear definition and let's call a matching popular fractional if it never loses an election against a fractional matching and those matchings that have a witness alpha zero vector actually are popular fractional matchings and this is a stricter definition than popular matchings for instance if you look at this graph that consists of two triangles and an edge between them the red matching is a popular matching that can be checked however if you look at this fractional matching that takes each of these three edges with weight half and each of those three edges in the triangle with weight half that defeats our popular matching so in this p versus m election m gets one and half votes and p gets two and half votes because now vertices can give half votes and so this is a popular matching that's not popular fractional so popular fractional is a strict subset of popular matchings so let's go back to popular matchings I just wanted to introduce popular fractional matchings because we need it in a decomposition result that we show here any popular matching can be partitioned as m zero union m one where m zero is stable in a sub graph of our graph and on the remaining part m one is popular fractional we saw that in the previous slide what's a popular fractional matching so every popular matching actually has such a decomposition into a stable part and a popular fractional part so what really is the definition of that set C I was just writing the points I hope it's not too dense so since it's popular since m is popular we know it has an integral witness moreover we can find a witness where the sets B which have support on them under the vector Z actually form a laminar family Edmunds primal dual algorithm shows this so we can find an integral witness with a laminar structure on the sets B that have support on them and in fact all the sets B that have positive Z value due to complementary slackness they're constrained in the primal LP has to be tight so if you look at the maximal sets that have positive support on them each of them has just each of them is an odd set going by the previous constraint there's just one lone vertex that's left unmatched in each of these maximal sets and C is basically from each maximal set leave that lone vertex out take the remaining vertices and take the union over all these maximal sets that's our C and in fact m restricted to C is fractional and m restricted to the remaining vertices is popular fractional this claim is a little tricky this is straight forward so I thought maybe I would just go through it in fact the same alpha that was the first coordinate of a witness for m followed by the all zeros vector would be a witness for m restricted to the subset of vertices so we have to show that the self-loop are covered that's straight forward we have to show all edges are covered and thanks to the popularity of m and the fact that alpha that is a witness for m's popularity we have this red constraint however from the definition of C we know that there's no odd set that contains two vertices in v-c hence all edges are covered by the same alpha and it's also easy to show again by complementary slackness the sum of alpha values of all vertices in v-c the sum is zero so indeed alpha, the zero vector is a witness for m restricted to v-c so we can also sharpen our decomposition theorem to say that m0 is stable on actually a slightly larger subset and m1 is a special popular fractional matching on the remaining subset so special popular matching has an even more restrictive witness where we don't even allow alpha sub u to be zero for any vertex each alpha u is either plus one or minus one n prime is the number of vertices of v-u so our algorithm now is thanks to the decomposition theorem we can write it quite easily it's just enumerates, it just goes through all stable matchings in every sub graph and test if the union of these two matchings is popular if so we have a popular matching and when it goes through all possible combinations of stable and special popular fractional matchings and can't find their union being popular for all possibilities it just gives up and says g has no popular matching and because of our decomposition theorem we know that if there is a popular matching it has such a decomposition and we have basically done a brute force search over all this stable comma special popular fractional matchings and if we fail there is indeed no popular matching the blue part special popular fractional matchings is it easy to exactly so I am coming to that right now so Ruta asked me how easy is it to enumerate over the special popular fractional matchings indeed so I would just say that in one minute so if you look at any subset u and look at the sub graph induced on u so the result by Karleen et al tells us that the maximum number of stable matchings possible in this sub graph is c to the i where i is the number of vertices and in fact they can all be enumerated also in o star c to the i time this is an old result that is there in the monograph by Gusfield and Irving and coming to special popular fractional matchings we can show any special popular fractional matching has to be a stable matching in one of two to the t different graphs that we construct and each of them is on t vertices so each of them has at most c to the t stable matchings and we have two raised to t many of them so we can bond it by 2c raised to t so the whole machinery of stable matchings essentially gives us this bound t is the size of t- yeah exactly so the total number of candidate matchings tested by algorithm is we enumerate we go through all subsets enumerate all stable matchings on that subset special popular fractional matchings on the remaining part on the complement and that sums to 3c raised to n which was our bound for k and yeah so i do have one more result in this paper so one may say ok so instead of popular matchings if we restrict our attention to those integral matchings that are also popular fractional restrict subset of popular matchings are they easy is that a tractable class so our NP hardness proof earlier this year shows that even that subclass is NP hard however our machinery enables us to show maybe a truly fast exponential time algorithm for this subclass rather than k raised to n here i am able to show a bound of o star 2 to the n time for testing if g admits an integral matching that's also popular fractional so in bipartite graphs is there such a decomposition so bipartite graphs every popular matching is also popular fractional because fractional matching is just a convex combination of matchings and so if a convex combination defeats you it has to be the case that some integral matching itself defeats you so such a thing is obviously there will be a popular matching itself is there but we have actually nicer decompositions in bipartite graphs so but then i will have to use another new word for it but as such the decomposition is trivial in bipartite graph i am not too sure so what does this algorithm but all the we keep reducing things to stable matchings and with ties in preference list incomplete so i didn't assume complete preference list at all it was the starting graph just happened to be complete indeed indeed so ties i am not too sure because what is the notion of stability with ties there are several notions of stability something called strong stability weak stability and so one would have to be a little more careful about what we are talking about because and so strongly stable matchings need not even exist of course even stable matchings need not exist but i have to be a little careful i am not too sure how to do it with ties fractional matching which is popular that should be good yes that is easy it is a polynomial time algorithm exactly so Rohit's question was if i didn't care for integrality if i just wanted to find that popular fractional matching popular half integral matchings always exist just make a bipartite graph out of this and find a stable matching that would become a popular fractional but finding an integral matching that is popular fractional it need not exist and it is hard to find thank you