1. Home
  2. Explore
  3. Computer Science
  4. Dynamic Graph Algorithms

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Dynamic Graph Algorithms

Transcript

PRESENTER: All right, hello, everyone. Welcome back from the lunch break. For this afternoon, I'm very excited to be introducing Thatchaphol, who will be presenting on dynamic graph algorithms. This will be the first lecture, as part of a 3-part series, two today, one more tomorrow if I remember right on dynamic graph algorithms. To introduce Thatchaphol, I'm delighted that he has agreed to give this presentation. Thatchaphol is a professor at the University of Michigan, where he's done-- over the last 20 years, he's been a rather prolific researcher in the area of dynamic graph algorithms and optimization methods. And I think a lot of his work has really kind of set some of the foundations that underlie a lot of what this program is about. Beyond his many, many publications, just getting faster algorithms, some of the tools and the techniques he's developed and like expander partitioning and the broad frameworks

he's used to solve not just algorithmic problems but data structure problems, you can see their influence all over in all of the works that motivate this entire program. So without further ado, thank you, Thatchaphol. THATCHAPHOL SARANURAK: Thank you so much, Aaron. I'm honored to be here. Like throughout my career, I listen to a lot of Simon's video. And so I'm happy to be here. OK, so today, I want to talk about dynamic graph algorithms. And first of all, what are dynamics algorithm?

So the way you should think about it is just the algorithm that interacts with the user. You have an algorithm, and there is a user. And the user will keep updating the input, and you keep like reporting the new output after each update. And to be more precise for this talk, it's going to be about dynamic graph algorithm. And the setting will be like this. So first, you will be given an input graph, G0, and you have time to pre-process it.

And then for each time step, you will be given an update, or a query, that's given to you online, on the fly. This update sequence is generated online. And then you just need to update your data structure, or answer the query. So for dynamic graph problem, the update usually are insertion or deletion of an edge, or a vertex sometimes. And the task can be various. It can answer the query like is the graph connected? Or given any two nodes, s and t, what is the distance?

Or the task might be like to maintain a big object, like minimum spanning tree, the graph change, you need to report how this tree change after each update. OK? And just to set up the basic terminology, so I will use Gi to denote the graph after I update. OK? So think of this as like a timeline. There are steps. In the beginning, you have G0. After each update you get, like the first update you get G1. After the second update, you get G2, and so on. And the update sequence, I would just

use it to denote the sequence of updates and queries. And for the update time, this update time is just the time needed to process each step. OK? And we set up the data structure, or the algorithm, have T worst-case update time if every step requires at most T time. So for example, if this is like the graph that denote the update time on each step, the worst case update time would be this much. But sometimes, it's more appropriate to measure something called amortized update time, which is just

the update time that is-- it's like an average time. It's the update time that is averaged over time steps. It's not averaged over a distribution or anything, just averaged over time steps. So more precisely, it's like after k steps, if the total time that you take until now from the beginning is at most kT, then you say that the update time, the amortized update time is at most T. So for example, in this picture, most of the updates take this much time.

So the amortized update time is like this. And pre-processing time is just the time to process the G0. So this is not counted in the update time. It's just the time when you see the first graph. The last terminology is the fully dynamic and partially dynamic. So we say that the algorithm is fully dynamic if they handle both insertion and deletion. Otherwise, it's called partially dynamic. Incremental algorithm handle insertion. Decremental algorithm handle deletions. So that's kind of the standard terms in the area.

So my goal in these two lectures, I hope to tell you three general templates on how to design dynamic graph algorithm. The first two are really classical. And many times when you talk to dynamic data structure people, they just say, just do that and send that techniques. And I want to tell you what exactly is [? at them. ?] The third one is vertex sparsifier, which is newer. But they are very generic and applicable. So everything is general. It just works for every problem.

Only the third template is specific to graph problem. Everything else works for every problem. And for each of the template, I really want to give you a complete proof of at least some [INAUDIBLE] concrete problem. So that you really see how it works from the beginning to the end. So before the first template, let's start with the warm-up one. We call it rebuild. So to talk about this template, we need to talk about some running sample of the problem.

And we will look at dynamic matching problem. So let's talk about matching. What are they? Well, matching is just a set of disjoint edges. For example, these red edges, they don't share any vertices. So they are matching. They form a matching. This is a matching of size 2. This one is a matching of size 3. And it's a maximum one. It's the biggest matching. And so given a graph, I will use G, mu of G to denote the size of maximum matching. And in this dynamic matching problem,

you have a graph with n vertices. Then there will be a sequence of edge insertion and deletion. It's fully dynamic. The goal is just to maintain this number, approximation of mu of G. And how to solve this one? For any dynamic data structure problem, what you can always do there is always a trivial solution. That is just to recompute everything from scratch after each update. And in this case, approximate matching can be computed in linear time in number of edges, so

number of edges over epsilon. So you can do that. But I want to show you how to speed up this from number of edges to number of vertices, so in update time. All right, so what's the algorithm? It's going to be super simple. So this is the algorithm. So the algorithm is like this. What we do is just first you compute the approximate matching, approximation of mu of G. Just by using static algorithm, compute it from scratch. And store it in mu tilde.

Once you have computed, for the next epsilon mu tilde steps, you do nothing. Just return what you have computed from before, just wait and return this number. Then, once you have waited this much, then you repeat. Go to the rebuild step. Compute it again, and wait and recompute. So that's the algorithm. So why this is correct?

So each update, whether it's insertion or deletion, can change the size of the maximum matching just by 1. One update-- one insertion can increase matching size by 1. Deletion can decrease the mu of G by 1. OK, so with this in mind, then you have what? You have that. I claim that like mu of G and mu tilde need to be like within 1 plus epsilon factor at all time. And the reason is like after review step, just right after the review step, you have that.

mu of G is within 1 plus epsilon of mu tilde. But then you wait. You wait for epsilon mu tilde further update. But then mu of G can change by this much. And which means what? It means that at any time, mu of G and mu tilde are just within 1 plus epsilon factor. So mu tilde is always 1 plus epsilon approximation of mu of G. So that's the correct algorithm. So what's left is just to analyze the update time. I claim that this update time is n, instead of number of edges. Let's analyze it. So the update times look like this. The time lines look like this. So you rebuild. You spend a lot of time. And you wait and do nothing and rebuild and wait.

So the update times, if you want to just compute amortized updated time, you just need to basically-- for each of these fares that you wait, you just compute the time that you rebuild amortized over this length of the phase-- so the size of the graph over mu of G. And I claim that this is just n? And why is that? And if this is true, we're done. So why is that? Well, I claim that number of edges is at most mu of G times 2n at most. So to see this, you can look at-- for example, look at any maximum matching. Let's call it M star. M star is of size of mu of G. Like this, the is a mu M star. And now, observe that every edge in the graph must be incident to some M star edges in M star.

So this one share some vertices with the blue edge. Every edge is incident to M star. Because otherwise, if you have another edge that is not incident to M star, you could add that to your matching, and you get a bigger matching. So note this in mind-- every edge is incident to M star. So then just consider this scenario. Suppose you delete one edge in M star. Let's say, delete this edge. That would remove at most 2n edges in the graph together with it. Because if I remove this guy, then this edge would be removed and this would remove it. So I would remove a degree of u plus degree of v, which is 2n at most. And then if I repeat this for mu of G time, I repeat this for every M star edges,

then there are no edges left in the graph. So it means that the total number of edges that you remove is at most mu G times 2n. So that v of G is at most 2 mu g. v of G is at most mu G times 2n because of this, we get that this thing is indeed at most n over epsilon square. And that's it. We get an algorithm with n amortized update time.

So just to recap what we just seen is really like a-- yes? AUDIENCE: So total time to update is number of edges divided by epsilon. Is just like 1 plus epsilon approximation to the perfect matching algorithm? THATCHAPHOL SARANURAK: So the question is whether we actually return just like 1 plus epsilon approximation-- AUDIENCE: No, no, no. So like you say that the time to recompute the matching is a number of edges divided by-- THATCHAPHOL SARANURAK: Yeah, right.

AUDIENCE: So is like an 1 plus epsilon approximate algorithm to compute the approximation? THATCHAPHOL SARANURAK: Yes. That you can compute from scratch any-- like an approximate matching in linear time in m over epsilon time algorithm. AUDIENCE: Thank you. THATCHAPHOL SARANURAK: OK. OK. So let's reflect on what we have seen is general. So actually, if you are given actually any algorithm, let's say it can handle L many updates. And it has rebuild time, tb, and worst-case update time, tu.

Then I claim that we just show how to get another algorithm, A prime, that can handle infinitely many updates, such that the amortized update time is tb over L plus tu. Because like what you do is just like for each page of length L, you rebuild. And then you update with this running update time, tu. And the amortized update time per phase is just Tb over L plus tu.

And for our case, we get like this thing, dynamic matching in n amortized time, where L is epsilon mu, tb is M-- E of G over epsilon. And tu is just 1, O of 1. Just by plugging this thing you get n amortized update time. So it's pretty simple. And next, so you see that one thing that is not really satisfying is that you get amortized update time. So let's try to improve this a bit to make it worst case.

AUDIENCE: Instead of worst-case time, you could just say amortized starting from the beginning, right? THATCHAPHOL SARANURAK: Amortized starting from the beginning? AUDIENCE: They said with average time for the first time L updates right? When my-- THATCHAPHOL SARANURAK: You mean this one can be-- AUDIENCE: The tu-- THATCHAPHOL SARANURAK: The tu is the worst case-- yeah, yeah, yeah, tu can be relaxed a bit if you have t-- so the question is if you replace tu by amortized update time from the beginning, you could get this thing as well, yeah, L. OK. OK.

Well, next, I will just show you how to improve this from amortized to worst-case. So that is the first template that we're going to look at, which is rebuild in the background. And this is a kind of developed basically by the classic paper, like by Valerie, by Mikhail, and by Monica. So let's see what it is exactly. So recall that we have this reduction given an algorithm that can handle L updates with some rebuild time and worst-case update time, you get this amortized update time using this kind of idea.

Let me simplify the picture a bit. Like this is still update time. I'm just going to write it easier. So what I do is now I just want worst-case update time is I want to remove this peak here. And the first step is I will show you an algorithm that actually is correct only half of the time, is correct only on half of the update sequence, not the whole thing. But you see that this is very easy to fix to be correct at all steps. Let's look at the algorithm.

The algorithm, A double prime with worst-case update time, is like this. So look at each phase of length L, like before. I would divide each phase of length L into three periods-- the red, yellow, and green one. Each period is like this. So the first L over 4 steps in the phase-- this for rebuild. And what we will do is if the starting time of the phase is t0, we will look at the graph at time t0 G t0, and try to rebuild the whole data structure for G t0. But the point is that now instead

of spending this whole review time on one step, you try to distribute the work evenly on the period. So you have L over 4 steps. For each step, you spend tb over L over 4 amount of time. Once you spend this much work, you stop, wait for the next update, and then spend more time, and wait for the next update and spend more time. If your total review time is tb, after L over 4 updates, you will be finished rebuilding. And during this period, you will just ignore all the updates.

So once you are finished, you build the data structure for the graph in the past because there are some updates given to you already. So that's why you need the next period, which is a catch up period. That is for the next L over 4 steps. What will you do? It's like the yellow one. You just feed two updates for each step. Instead of one step, you get one update. You just feed two update to your data structure from the past, like try to be like double speed.

And once you are done with-- you are working at double speed during this yellow period, when you're done, then you will have catch up with all the updates you have seen so far. And then after that, that's when you can be active. So for the next L over 2 steps, in the-- last L over 2 steps in the period-- in the phase, now your data structure is up to date. So you can feed the update normally, like one update per step, to the data structure. And you will get correct answer during this period.

So you see that green part here? You'll be correct. The red and yellow part, you are not quite correct. You don't have a correct answer for the current update. AUDIENCE: [INAUDIBLE] THATCHAPHOL SARANURAK: Yes. AUDIENCE: [INAUDIBLE] THATCHAPHOL SARANURAK: The question is, can we do this without knowledge of L ahead of time? I am not sure.

It seems possible. I don't know this right now. OK. But you see that indeed, the update-- the worst-case update time now is really like the same, tb over L plus tu. We had amortized one before. Now, we have worst-case one. But, yeah, this is correct only on half of the update sequence. So let's fix this. Let's try to be correct at all step. So trick is simple. Let's try to make two instances of A double prime, so A double prime 1 and A double prime 2. Make two copy of the data structure. This increase the update time by a factor 2. And you try to schedule them so that at every time step one of them is correct. So if A double prime 1 is like this,

then you just kind of make this period, shift it like this. And now, at every time step, one of them must be correct. So note that because for this second one, you have this guy, which is correct from the beginning. So you would need to spend pre-processing time. But the pre-processing time at time step 0 doesn't count in the update time. So that's fine. OK, so just to conclude, what we have right? We have this one. That is if you have an algorithm that can handle L updates with some review

time and worst-case update time, then you get another algorithm that can handle any length of update with tb over L plus tu, worst-case update time. And that's how we get simple dynamic matching algorithm with n. It's worst-case update time. And you can try to think about this that it's easy to improve this n to just max degree of G. So there's some hint here. But I make it hard to read.

Yeah, so this is much better if the graph is sparse. So let's go to the next template, which is called batching. Yes. AUDIENCE: Can I ask what the best runtime is for fully dynamic matching [INAUDIBLE]? THATCHAPHOL SARANURAK: Yeah, so the question is like what's the best update time for 1 plus epsilon matching right now, the answer is something like n to the 1 minus some function of epsilon. So it's strictly below linear, but by a tiny bit. Yeah. AUDIENCE: What about if they have

output [? base ?] matching? THATCHAPHOL SARANURAK: Very good question. So if you want to output the matching, basically this is still essentially the best one. There is some algorithm that actually the running time is root m. Actually, this thing can be replaced by root m as well. So if you want output matching itself, n or root m is the best one.

OK, next one, batching, this is used by many, many works. One of them, like the first one I saw is like the one by Mikhail. But there might be some earlier one. I'm not sure. AUDIENCE: I stole it from Valerie and Monica. I mean, but they did it for a different problem. So for this problem, I think [INAUDIBLE].. THATCHAPHOL SARANURAK: Thanks. Yeah. AUDIENCE: [INAUDIBLE] THATCHAPHOL SARANURAK: Oh, sorry, yes, yes. You're right. Right right. Yes. OK good. AUDIENCE: So I think--

THATCHAPHOL SARANURAK: OK, so to tell you about this idea, I will show you another [INAUDIBLE] problem, which is a real problem actually, decremental connectivity. So in this problem, you have a graph with n vertices and m edges. It is a sequence of edge deletion only. That's why we call it decremental. Let's say for simplicity, I just want to check if the graph is connected, the whole graph is connected or not at all time. Simple algorithm is just to do it from scratch, BFS,

and spend linear time, m time, per update. I will show you a simple algorithm, like spend m to the 2/3 worst-case update time. This is far from the best known algorithm, but it's a nice one to tell you the idea. So to get to this algorithm, what we'll look at is to look at one-batch version of the problem. So one-batch, what is the setting for one-batch algorithm? Which is often easier to design. You have a graph. And then the update is just a single set of edges, call it D a single batch of updates, d edge deletion.

And it can handle only this single batch, no more, like nothing else, just single batch. After this, it just need to answer one thing. That is after you delete this set of age by this single batch one, call it G prime-- G prime is like G minus D-- is this graph, updated graph still connected? So there is only one batch that you need to handle. And what will show soon that is a one-batch algorithm, such that the initialization time is almost linear. And at that time is something like d square.

And let's assume this for a bit. And let's see a simple way to get from this thing to the dynamic algorithm, such that it has this worst-case at that time. The one that handles sequence of update instead of one batch. So let's see the reduction. It's simple. A simple idea is that just if you want to handle an update sequence but you have only one-batch algorithm on your hand, let's say, what can we do? Well, given the i-th update in the sequence, what we do is just create a batch, which is just the first i-th update from the beginning until the i-th steps-- this is one batch-- and feed it to your batch algorithm, one-batch algorithm. In our case, this would take i squared time

because our algorithm has this update time of d square. So just from this simple idea what we get now is that we get some algorithm such that-- let's say, I want to handle-- it can handle L updates. And the review time, initialization time is just linear. But the update time for each time is at most L square. Just to handle the i-th update, just create one batch, give it to the one-batch algorithm. For the next one, just kind of rework everything. Create a batch of size i plus 1. Give it to one-batch algorithm, and so on.

And from this one, you will get an algorithm with this running time. How? We have this black box reduction. Given this kind of algorithm, you get an algorithm with worst-case update time with tb over L plus tu. And by plugging this thing in, you get an algorithm with m over L plus L squared update time. Choosing the right L, which is m to the 1/3, you get m to the 2/3 update time algorithm. Yes. AUDIENCE: So [INAUDIBLE] a weak assumption. I want to check.

So assume that the data structure is like rewindable that-- THATCHAPHOL SARANURAK: Yeah-- AUDIENCE: Time for-- THATCHAPHOL SARANURAK: Which, yeah, like-- the question is whether we can assume that the data structure is rewindable. And the answer is we can assume this without loss of generality. Yeah. There's a technique called persistence. You can estimate [INAUDIBLE]. OK. Yeah. Yes.

AUDIENCE: If it had used randomness, though, would this have been more concerning? THATCHAPHOL SARANURAK: It doesn't use randomness at all, yeah. AUDIENCE: If the data structure had used randomness-- THATCHAPHOL SARANURAK: OK. AUDIENCE: That might have caused issues for rewindability. THATCHAPHOL SARANURAK: Yeah, that might. Yes yes yes yeah. AUDIENCE: OK. THATCHAPHOL SARANURAK: Good point. OK. So let's see how to build this one-batch algorithm, the [? i-th batch ?] thing. OK. So you see that it's quite simple to design one-batch algorithm. And the idea is this. You have a graph. Initially, you just compute the spanning tree of a graph. Then you are given an update batch, like a set D of d edge deletion. So you just kind of delete some edges. Some of the edges is like you delete some tree edges here. Some deletion is non-tree edges.

So that deletion will divide, kind of split your spanning tree in the beginning into some components, T1 up to Td prime. d prime is kind of at most D plus 1. So you get this component from your spanning tree. And our goal, it would suffice to just check basically between every pair of this component, whether there is some non-tree edge that could reconnect this component together. If you can, then you're done. Basically, you look at this component, and you kind of want to know whether there

is some non-tree edge reconnecting this thing, this thing, or this thing. If you can check all this, you're done. So let's see how to do that. And to do that, we will need some basic tools in graph data structure, which is Euler-tour and basic tool in data structure in general, which is 2D-range query. Let's see, so the first one, which is 2D-range query is something that I will just tell you that it exists. And I assume it is simple to implement using some range tree. So this problem is like this. You have a set of points in 2D, P. And you can basically insert or delete a point into the set in log squared time. And then you can also query, which is you query some rectangle like this. So you just specify the endpoint of the rectangle. And given the query, it will answer you

with-- like return you some point in the range in log time. So that's 2D-range query. How about Euler-tour? This is just a way to represent any tree as a path. So let's see some examples. So suppose that you have this tree. Consider like when you kind of just walk around a tree. And then just write down which node you have seen from this walk, from this tour. So you have seen 1, 2, 3, 4, 5, and then 4, 3, 6, 7, 6, 3, 2, 1. So that's Euler-tour of the tree.

Now it's like giving a tree, you can kind of represent it as essentially like some sequence, which is like a path basically. And for any edge in the tree it will correspond to two edge in the Euler-tour of the tree. For example, here, this edge would correspond to two things here because you will see this edge twice in the tour.

So these are like two basic things. Let's see how to use it. So now the algorithm, the one-batch algorithm, that we will really implement is like this. To initialize, just compute some spanning tree, the green thing here. There will be some non-tree edge. That will be the low one in the tree. Compute the spanning tree. And compute the Euler-tour of that tree, just walk along this thing. And you get some Euler-tour here. I write it here and write it here too to create some 2D space.

So now, the next important step is this. For every non-tree edge, you'll be-- let's say, non-tree edge, the purple one here-- just add a point corresponding to this edge. So where do I add it? Well, so 1 and 3 here, I just add like 1 and 3. Just look at where is the first place that 1 exists? 1 appears is here. Where is the first place that 3 appears? It's here. That's what I mean by minrank. Like the first place that 1 occur and the first place that 3 occur is here. You just put the point here.

And this is another one. This one corresponding to these two guys. Now, the other three edges, non-tree edges, these two and these two is just this one. So just put this non-tree edges into the point, into the space, 2D space. So that's the pre-processing. Now, what we have next we are given one batch of update, the set D. So what we do? We get some deletion. Let's say this thing and this thing.

What I would do is this. First of all, if I delete some non-tree edge here, I would need to delete the corresponding point from the space. Just do that. That can be done in D time, D polylog-time. Next, when I delete a tree edge, this tree edge from 2, 2, 3, that actually partition the interval into parts. Let's say I delete an edge from 2, 2, 3, so that I cut it here and I cut it 3 here. So I get these intervals. Do it like vertically and horizontally.

So I get these intervals. The number of intervals is something like O of d because they are d deletion. Now I claim that all I need to do from here is just-- I kind of get D by D get here. So I just kind of query each of this part, whether there is a point or not. And you should be able to convince yourself that just by querying this thing, it means that you can check whether there is a non-tree edge between any like two component of the trees.

So that's the algorithm. And the running time, initialization time, is just spanning tree, Euler-tour, initialize the 2D range, which is linear time. How about this part? These two parts is just d time. But the last step, which is to query d square mini rectangle, that takes you d squared time. So that's why the update time is d square.

So that's what we get. We get an algorithm with initialization-- one-batch algorithm with linear initialization time, update time d squared. And just by previous reduction that we saw, we get incremental connectivity with m to the 2/3 worst-case update time. And you see this is generic. If you would have this thing too, if you improve this, and you could actually-- you would get just by rearranging, just by balancing, you get better update time.

And exercise again, and try to just make sure that you understand this. Do it offline. Suppose instead that you have 2-batch algorithm. So it's the algorithm that you start with the graph. Then there is a first batch, D1, given to you. And then it can handle yet another batch, D2.

And then you check whether the graph after this deleting D1 and D2, whether it's connected or not. Suppose you have an algorithm that the first initialization time is linear. The time to take care of the first batch is linear in the size of the first batch. And the time for the second batch is linear in the size of the second batch, not the first batch.

And you think of this as d1 is like m to the 2/3. And d2 here is m to the 1/3. So the second batch is smaller than the first one. If you have this algorithm, just maybe try to convince yourself that you could use the idea you have seen to get m to the 1/3 worst-case update time algorithm.

And if you get like k-batch algorithm, then it will just improve. And one remark is that there are actually several algorithms in literature that actually can handle k batch. And usually, when you can handle 2-batch, you can handle k-batch, but not for 1-batch. Usually, 1-batch is really easier than 2-batch. For example, the idea that we have seen today, it's not clear how to generalize it to make it to work with 2-batch. Because once you have kind of delete your-- once you have partition the 2D-range algorithm into d square mini grids, how to handle

the second batch not clear. Question. AUDIENCE: So why is the algorithm that showed is deletion only? THATCHAPHOL SARANURAK: Sorry, I don't-- AUDIENCE: Why does the algorithm that you show doesn't work for insertions? THATCHAPHOL SARANURAK: Oh, so exercise, it works for insertion. Yes. Yes. Yeah, you can try to see why actually it works for insertion. I just say this is for deletion because just for simplicity in presenting.

Good. Question? All right. AUDIENCE: Is there any intuition of why you would have k-batch? Or what do you-- I mean, you can try [INAUDIBLE] an example somehow it's natural or-- THATCHAPHOL SARANURAK: Oh, I see. Well, if you have an algorithm that handle k-batch--

I'm sorry, I'm not sure I get your question. AUDIENCE: Not the if you had one. But I'm saying why would you-- I mean like some natural condition of-- you have some decreasing batch sizes that will help you? THATCHAPHOL SARANURAK: Yes. Yes. Yes. Like so what's the intuition to get this running time, you mean? Or is it-- I'm not sure. Well, OK, so roughly speaking, if you have an algorithm with k-batch, that handle k-batch updates, yeah, to get this kind of algorithm,

the first batch would be the biggest one. The second batch would be like smaller by n to the 1 over k factor. This is even smaller and so on. And you would just schedule it so that you get this kind of thing. AUDIENCE: I may be trying to ask the same question. But what's a good exercise problem to think about where designing a k-batch algorithm is a natural? THATCHAPHOL SARANURAK: Good.

What's the natural algorithm that you can get k-batch algorithm. AUDIENCE: Good exercise, if we're giving exercises. THATCHAPHOL SARANURAK: Yes. Yeah, I don't have that in mind. The one that I know that actually handle k-batch, the problem that use this k-batch thing is to pruning expander, expanded pruning problem. But that might not be the simplest one. AUDIENCE: The easiest exercise. THATCHAPHOL SARANURAK: Yeah. AUDIENCE: We have the Zoom if anyone thinks of one later. THATCHAPHOL SARANURAK: Yes. Very good. AUDIENCE: Thank you. THATCHAPHOL SARANURAK: OK, so that's this second.

And-- so we have 10 minutes before the break. So I will use this to talk about something before the third template. Let me tell you a bit about vertex sparsifier. And this is something that actually is extensively studied in approximation and FPT. It's basically kernelization. And it has really nice connection to dynamic graph. So what are they? Well, vertex sparsifier, people also call it mimicking networks. The general setting is like this. Let's say you have a graph, a big, huge graph. And then you have a small set of terminal, S. And what we want to output is a small graph, H,

that contains the terminals at least. But the size of the graph H here should be of sized proportion to the terminal set. So it kind of shrink the graph dynamically. And yet H should preserve basically useful information in the graph that is related to the terminals. When H preserve information about G related to H, I kind of want to write like H approximate G with respect to the terminal set S. And we also call this like a sparsifier of G with respect to S.

So this is like a very nice thing, kind of compression. And let me tell you about at least-- I'm going to tell you how to construct-- this is not complex, but there is even simpler thing. But one example is like this. What is sparsifier for shortest path, which is based on the work by Mikhail and Yuri? You can show that for any number k, parameter k, the x is a graph, the sparsifier H, such that the size of the number of edges in H is just something like S time n to the 1 over k, so close to the size of the terminal.

But what we get is like it preserves useful information about H. That is for every pair s and t that are terminal, the distance between s and t-- sorry, let's say this is for any pair u and v in the terminal, the distance between u and v in the sparsifier and in the original graph are the same up to k factor.

So this kind of thing exists. And I will tell you how to construct a vertex classifier for like a different problem, which is called-- let it call minmax path. It has-- OK-- so what is minmax path? It has a close connection to minimum spanning tree. It's just a simple thing. So let's say that I have this simple graph here. And s, t minmax path is just a path from s to t that has minimum max weight.

And for example, in this graph, the minmax path from s to t is this path because it has smaller minimum weight-- smaller maximum weight in the path. And minmax of s, t is 7 here. If you go this way, the minmax is 9. OK? This is something that-- like [? intial. ?] And actually, the key point about this minmax path is that if you want information about minmax path, you can specify the graph into a tree. And what is that tree? A minimum spanning tree. So minimum spanning tree actually preserves all minmax path. OK? So before we take a break I want to tell you about this, and we continue after the break. So let's say that you have a graph. And let's say T is your minimum spanning tree.

And let me denote like a path from s to t in the tree. It's just a unique path from s to t in the tree. PT s, t is a unique path from s to t. If you have this minimum spanning tree in the graph, I claim that a unique path from s to t, like this one, in tree is itself s, t minmax path And why is that? Because let's assume for condition that it's not.

There would access another path, let's call it P prime that go from s to t, such that two thing happens. If you look at the maximum weight in this path, from s to t in the tree, the maximum edge weight-- maximum weight edge e max. The weight here-- let's say 9-- must be more than the weight of everything in this path, the purple path, because we assume that this tree is not-- this path is not a minmax path. So there is a better one, the purple one. So this weight here are all smaller than 9.

But if there is a path, then you can actually construct a smaller tree, which is-- well, just maybe like include this edge and delete e max from the tree. You get a tree that is with smaller weight. And that's why minimum spanning tree really preserves all minmax path. So remember this. And next I will show how to actually construct vertex sparsifier for minmax path after the break. OK. Thanks. [APPLAUSE] PRESENTER: Thank you. Any questions?

I've been waiting the whole talk to do my job of passing off the microphone. AUDIENCE: You mentioned rewinding earlier. What is that? THATCHAPHOL SARANURAK: Oh, so the question is what is rewinding? Rewinding just means like let's say you have some algorithm. And the algorithm proceed, like do something up to some point. And you just want to revert all of the configuration of the algorithm back to some point of time in the past. That's rewinding. And in the discussion, we just said that you can assume that you can always do this for any data structure using persistence.

PRESENTER: Any more questions? Well-- AUDIENCE: It's a great question. I just received this email from Simons. The tea time starts at 3:00 PM. And now you say here that our coffee break, well, of course, it's not the same as tea, but that's from 2:30 to 3:00. But is there any kind of synchronicity here or-- [LAUGHTER] PRESENTER: We will have a break from 2:30 to 3:00. And I look forward to seeing what's outside the door.

There's a regular tea time in general. I'm not exactly sure the synchronization of the tea times with the workshops, but I can look into it. Thank you. Any other questions? Maybe that's a good segue. So it's a coffee break now. We're taking a break for the next half hour. I'll see you all back in here at 3:00. Thank you.

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent