Articles, Blog , , , , , 2 Comments

The Hopcroft-Karp algorithm goes like this. We first initialize the matching to the empty set, then we repeat the following. First, we build an alternating level graph rooted at the unmatched vertices on the left part of the partition using breadth-first search. Let’s pause for a moment here and see how this works in an

Read More

Articles, Blog , , , , , 6 Comments

Now we turn to the concept of a vertex cover, which will play a role analogous to the one played by the concept of minimum cut in our discussion of maximum flows. Given a graph, G, we say that S is a vertex cover if every edge is incident on a vertex in S. Thus

Read More

Articles, Blog , , , , , 0 Comments

We’ve defined P as a set of languages, but ultimately we want to talk about it as a set of problems. Unfortunately, this isn’t as easy as it might seem. The encoding rules we use for turning an abstract problem into a string can effect whether or not the language is in P. Let’s see

Read More

Articles, Blog , , , , , 0 Comments

We turn now to the key part of the analysis where we show that each phase of the Dinic algorithm takes V times E time. As with Edmonds-Karp, we will use a level graph. In this case, however, the algorithm actually builds the graph, whereas in Edmonds-Karp we simply used it for the analysis. The

Read More

Articles, Blog , , , , , 0 Comments

This idea that we should prefer heavier flows brings us to the scaling algorithm. One idea is to find the heaviest possible flow. We could do this by starting with an empty graph and then adding an edge with the largest remaining residual capacity until there was an ST path. But this would be unnecessarily

Read More

Articles, Blog , , , , , 0 Comments

The answer is this here. We start from state 4, so I write that out, as q, followed by the binary representation of 4. We read an x, so I write out the representation of that symbol, and then we go back to state q4. So I write that out again here. And then we

Read More

Articles, Blog , , , , , 3 Comments

>From the class P we now turn to the class NP. At the beginning of the lesson I said that NP is the class of problems variable in polynomial time. This is true but it’s not how we typically define it. Instead, we define NP as the class of problems solvable in polynomial time on

Read More

Articles, Blog , , , , , 0 Comments

We start the search for a deeper understanding, with the idea of the augmenting path. Recall that in our original treatment of the max flow problem, we were given a flow over some graph, and we defined the residual network, which captured the ways in which we were allowed to modify this flow. This included

Read More