About $E_i$ in “An $n^{frac{5}{2}}$ Algorithm for Maximum Matchings in Bipartite Graphs” by Hopcroft and...
up vote
1
down vote
favorite
I am reading "An $n^{frac{5}{2}}$ Algorithm for Maximum Matchings in Bipartite Graphs" by Hopcroft and Karp. And I cannot understand the following definition of $E_i$.
Because
$${(u, v) | (u, v) in bar E, v in L_i, u in L_i} = emptyset,$$
I think the follwoing definition is more natural:
$$E_i = {(u, v) | (u, v) in bar E, v in L_i, u notin L_0 cup L_1 cup cdots cup L_{i-1}}, i=0, 1, 2, cdots.$$
Why did the authors define $E_i$ as follows?
The graph $G = (V, E)$ is bipartite if the set of vertices $V$ can be partitioned into two sets, $X$ and $Y$, such that each edge of $G$ joins a vertex in $X$ with a vertex in $Y$. An element of $X$ will be called a boy, and an element of $Y$, a girl.
Let $M$ be a matching in a bipartite graph $G$. We discuss the implementation of Step 1 of Algorithm A, in which a maximal vertex-disjoint set of shortest augmenting paths relative to $M$ is found. First we assign directions to the edges of $G$ in such a way that augmenting paths relative to $M$ become directed paths. This is done by directing each edge in $E - M$ so that it runs from a girl to a boy, and each edge in $M$ so that it runs from a boy to a girl. The resulting directed graph is $bar G = (V, bar E)$, where
$$bar E = {(y, x) | {x, y} in E - M, x in X, y in Y} cup {(x, y) | {x, y} in M, x in X, y in Y}.$$
Next we extract a subgraph $hat G$ of $bar G$, with the property that the directed paths of $hat G$ running from a free girl to a free boy correspond one-to-one to the shortest augmenting paths in $G$ relative to $M$. This is done as follows.
Let $L_0$ be the set of free boys, and let
$$E_i = {(u, v) | (u, v) in bar E, v in L_i, u notin L_0 cup L_1 cup cdots cup L_i}, i=0, 1, 2, cdots,$$
$$L_{i+1} = {u | text{for some } v, (u, v) in E_i}, i = 0, 1, 2, cdots.$$
graph-theory algorithms matching-theory
add a comment |
up vote
1
down vote
favorite
I am reading "An $n^{frac{5}{2}}$ Algorithm for Maximum Matchings in Bipartite Graphs" by Hopcroft and Karp. And I cannot understand the following definition of $E_i$.
Because
$${(u, v) | (u, v) in bar E, v in L_i, u in L_i} = emptyset,$$
I think the follwoing definition is more natural:
$$E_i = {(u, v) | (u, v) in bar E, v in L_i, u notin L_0 cup L_1 cup cdots cup L_{i-1}}, i=0, 1, 2, cdots.$$
Why did the authors define $E_i$ as follows?
The graph $G = (V, E)$ is bipartite if the set of vertices $V$ can be partitioned into two sets, $X$ and $Y$, such that each edge of $G$ joins a vertex in $X$ with a vertex in $Y$. An element of $X$ will be called a boy, and an element of $Y$, a girl.
Let $M$ be a matching in a bipartite graph $G$. We discuss the implementation of Step 1 of Algorithm A, in which a maximal vertex-disjoint set of shortest augmenting paths relative to $M$ is found. First we assign directions to the edges of $G$ in such a way that augmenting paths relative to $M$ become directed paths. This is done by directing each edge in $E - M$ so that it runs from a girl to a boy, and each edge in $M$ so that it runs from a boy to a girl. The resulting directed graph is $bar G = (V, bar E)$, where
$$bar E = {(y, x) | {x, y} in E - M, x in X, y in Y} cup {(x, y) | {x, y} in M, x in X, y in Y}.$$
Next we extract a subgraph $hat G$ of $bar G$, with the property that the directed paths of $hat G$ running from a free girl to a free boy correspond one-to-one to the shortest augmenting paths in $G$ relative to $M$. This is done as follows.
Let $L_0$ be the set of free boys, and let
$$E_i = {(u, v) | (u, v) in bar E, v in L_i, u notin L_0 cup L_1 cup cdots cup L_i}, i=0, 1, 2, cdots,$$
$$L_{i+1} = {u | text{for some } v, (u, v) in E_i}, i = 0, 1, 2, cdots.$$
graph-theory algorithms matching-theory
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I am reading "An $n^{frac{5}{2}}$ Algorithm for Maximum Matchings in Bipartite Graphs" by Hopcroft and Karp. And I cannot understand the following definition of $E_i$.
Because
$${(u, v) | (u, v) in bar E, v in L_i, u in L_i} = emptyset,$$
I think the follwoing definition is more natural:
$$E_i = {(u, v) | (u, v) in bar E, v in L_i, u notin L_0 cup L_1 cup cdots cup L_{i-1}}, i=0, 1, 2, cdots.$$
Why did the authors define $E_i$ as follows?
The graph $G = (V, E)$ is bipartite if the set of vertices $V$ can be partitioned into two sets, $X$ and $Y$, such that each edge of $G$ joins a vertex in $X$ with a vertex in $Y$. An element of $X$ will be called a boy, and an element of $Y$, a girl.
Let $M$ be a matching in a bipartite graph $G$. We discuss the implementation of Step 1 of Algorithm A, in which a maximal vertex-disjoint set of shortest augmenting paths relative to $M$ is found. First we assign directions to the edges of $G$ in such a way that augmenting paths relative to $M$ become directed paths. This is done by directing each edge in $E - M$ so that it runs from a girl to a boy, and each edge in $M$ so that it runs from a boy to a girl. The resulting directed graph is $bar G = (V, bar E)$, where
$$bar E = {(y, x) | {x, y} in E - M, x in X, y in Y} cup {(x, y) | {x, y} in M, x in X, y in Y}.$$
Next we extract a subgraph $hat G$ of $bar G$, with the property that the directed paths of $hat G$ running from a free girl to a free boy correspond one-to-one to the shortest augmenting paths in $G$ relative to $M$. This is done as follows.
Let $L_0$ be the set of free boys, and let
$$E_i = {(u, v) | (u, v) in bar E, v in L_i, u notin L_0 cup L_1 cup cdots cup L_i}, i=0, 1, 2, cdots,$$
$$L_{i+1} = {u | text{for some } v, (u, v) in E_i}, i = 0, 1, 2, cdots.$$
graph-theory algorithms matching-theory
I am reading "An $n^{frac{5}{2}}$ Algorithm for Maximum Matchings in Bipartite Graphs" by Hopcroft and Karp. And I cannot understand the following definition of $E_i$.
Because
$${(u, v) | (u, v) in bar E, v in L_i, u in L_i} = emptyset,$$
I think the follwoing definition is more natural:
$$E_i = {(u, v) | (u, v) in bar E, v in L_i, u notin L_0 cup L_1 cup cdots cup L_{i-1}}, i=0, 1, 2, cdots.$$
Why did the authors define $E_i$ as follows?
The graph $G = (V, E)$ is bipartite if the set of vertices $V$ can be partitioned into two sets, $X$ and $Y$, such that each edge of $G$ joins a vertex in $X$ with a vertex in $Y$. An element of $X$ will be called a boy, and an element of $Y$, a girl.
Let $M$ be a matching in a bipartite graph $G$. We discuss the implementation of Step 1 of Algorithm A, in which a maximal vertex-disjoint set of shortest augmenting paths relative to $M$ is found. First we assign directions to the edges of $G$ in such a way that augmenting paths relative to $M$ become directed paths. This is done by directing each edge in $E - M$ so that it runs from a girl to a boy, and each edge in $M$ so that it runs from a boy to a girl. The resulting directed graph is $bar G = (V, bar E)$, where
$$bar E = {(y, x) | {x, y} in E - M, x in X, y in Y} cup {(x, y) | {x, y} in M, x in X, y in Y}.$$
Next we extract a subgraph $hat G$ of $bar G$, with the property that the directed paths of $hat G$ running from a free girl to a free boy correspond one-to-one to the shortest augmenting paths in $G$ relative to $M$. This is done as follows.
Let $L_0$ be the set of free boys, and let
$$E_i = {(u, v) | (u, v) in bar E, v in L_i, u notin L_0 cup L_1 cup cdots cup L_i}, i=0, 1, 2, cdots,$$
$$L_{i+1} = {u | text{for some } v, (u, v) in E_i}, i = 0, 1, 2, cdots.$$
graph-theory algorithms matching-theory
graph-theory algorithms matching-theory
asked Nov 23 at 10:24
tchappy ha
389110
389110
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
The definition Hopcroft and Karp give is more natural because it's a standard description of a breadth-first search. (Well, a breadth-first search in the reversed graph.) It is immediate from this definition that $L_{i+1}$ is disjoint from $L_0 cup L_1 cup dots cup L_i$, which is very useful to know.
It's true that the conditions
begin{align}
u ¬in L_0 cup L_1 cup L_2 cup dots cup L_i, \
u ¬in L_0 cup L_1 cup L_2 cup dots cup L_{i-1}, \
u ¬in L_{i-1} cup L_{i-3} cup L_{i-5} cup dots cup L_{i-1bmod 2}
end{align}
are all equivalent, because the graph is bipartite, so we could use any of them in the definition. The second (which you're proposing) and the third are longer, and it would take some small amount of work to explain why they're equivalent to the natural, first definition. (More importantly, they make the reader needlessly stop and think: "Why are we allowing $u in L_i$? Is that an important case? Wait, no, $u in L_i$ can't ever happen anyway.")
In exchange, we save on "amount of things we have to check for containing $u$". This is not really a consideration when describing the algorithm. It might theoretically be a consideration for implementing the algorithm, but in practice you'd probably label vertices with a flag "is this vertex in any of the $L_i$ defined so far?" and just check all the in-neighbors of $v$ to see whether they have that flag set or not.
Thank you very much again, Misha Lavrov, for a very nice explanation. By the way, I didn't notice the third equivalent condition. Thank you.
– tchappy ha
Nov 24 at 1:59
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3010202%2fabout-e-i-in-an-n-frac52-algorithm-for-maximum-matchings-in-bipartit%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
The definition Hopcroft and Karp give is more natural because it's a standard description of a breadth-first search. (Well, a breadth-first search in the reversed graph.) It is immediate from this definition that $L_{i+1}$ is disjoint from $L_0 cup L_1 cup dots cup L_i$, which is very useful to know.
It's true that the conditions
begin{align}
u ¬in L_0 cup L_1 cup L_2 cup dots cup L_i, \
u ¬in L_0 cup L_1 cup L_2 cup dots cup L_{i-1}, \
u ¬in L_{i-1} cup L_{i-3} cup L_{i-5} cup dots cup L_{i-1bmod 2}
end{align}
are all equivalent, because the graph is bipartite, so we could use any of them in the definition. The second (which you're proposing) and the third are longer, and it would take some small amount of work to explain why they're equivalent to the natural, first definition. (More importantly, they make the reader needlessly stop and think: "Why are we allowing $u in L_i$? Is that an important case? Wait, no, $u in L_i$ can't ever happen anyway.")
In exchange, we save on "amount of things we have to check for containing $u$". This is not really a consideration when describing the algorithm. It might theoretically be a consideration for implementing the algorithm, but in practice you'd probably label vertices with a flag "is this vertex in any of the $L_i$ defined so far?" and just check all the in-neighbors of $v$ to see whether they have that flag set or not.
Thank you very much again, Misha Lavrov, for a very nice explanation. By the way, I didn't notice the third equivalent condition. Thank you.
– tchappy ha
Nov 24 at 1:59
add a comment |
up vote
1
down vote
accepted
The definition Hopcroft and Karp give is more natural because it's a standard description of a breadth-first search. (Well, a breadth-first search in the reversed graph.) It is immediate from this definition that $L_{i+1}$ is disjoint from $L_0 cup L_1 cup dots cup L_i$, which is very useful to know.
It's true that the conditions
begin{align}
u ¬in L_0 cup L_1 cup L_2 cup dots cup L_i, \
u ¬in L_0 cup L_1 cup L_2 cup dots cup L_{i-1}, \
u ¬in L_{i-1} cup L_{i-3} cup L_{i-5} cup dots cup L_{i-1bmod 2}
end{align}
are all equivalent, because the graph is bipartite, so we could use any of them in the definition. The second (which you're proposing) and the third are longer, and it would take some small amount of work to explain why they're equivalent to the natural, first definition. (More importantly, they make the reader needlessly stop and think: "Why are we allowing $u in L_i$? Is that an important case? Wait, no, $u in L_i$ can't ever happen anyway.")
In exchange, we save on "amount of things we have to check for containing $u$". This is not really a consideration when describing the algorithm. It might theoretically be a consideration for implementing the algorithm, but in practice you'd probably label vertices with a flag "is this vertex in any of the $L_i$ defined so far?" and just check all the in-neighbors of $v$ to see whether they have that flag set or not.
Thank you very much again, Misha Lavrov, for a very nice explanation. By the way, I didn't notice the third equivalent condition. Thank you.
– tchappy ha
Nov 24 at 1:59
add a comment |
up vote
1
down vote
accepted
up vote
1
down vote
accepted
The definition Hopcroft and Karp give is more natural because it's a standard description of a breadth-first search. (Well, a breadth-first search in the reversed graph.) It is immediate from this definition that $L_{i+1}$ is disjoint from $L_0 cup L_1 cup dots cup L_i$, which is very useful to know.
It's true that the conditions
begin{align}
u ¬in L_0 cup L_1 cup L_2 cup dots cup L_i, \
u ¬in L_0 cup L_1 cup L_2 cup dots cup L_{i-1}, \
u ¬in L_{i-1} cup L_{i-3} cup L_{i-5} cup dots cup L_{i-1bmod 2}
end{align}
are all equivalent, because the graph is bipartite, so we could use any of them in the definition. The second (which you're proposing) and the third are longer, and it would take some small amount of work to explain why they're equivalent to the natural, first definition. (More importantly, they make the reader needlessly stop and think: "Why are we allowing $u in L_i$? Is that an important case? Wait, no, $u in L_i$ can't ever happen anyway.")
In exchange, we save on "amount of things we have to check for containing $u$". This is not really a consideration when describing the algorithm. It might theoretically be a consideration for implementing the algorithm, but in practice you'd probably label vertices with a flag "is this vertex in any of the $L_i$ defined so far?" and just check all the in-neighbors of $v$ to see whether they have that flag set or not.
The definition Hopcroft and Karp give is more natural because it's a standard description of a breadth-first search. (Well, a breadth-first search in the reversed graph.) It is immediate from this definition that $L_{i+1}$ is disjoint from $L_0 cup L_1 cup dots cup L_i$, which is very useful to know.
It's true that the conditions
begin{align}
u ¬in L_0 cup L_1 cup L_2 cup dots cup L_i, \
u ¬in L_0 cup L_1 cup L_2 cup dots cup L_{i-1}, \
u ¬in L_{i-1} cup L_{i-3} cup L_{i-5} cup dots cup L_{i-1bmod 2}
end{align}
are all equivalent, because the graph is bipartite, so we could use any of them in the definition. The second (which you're proposing) and the third are longer, and it would take some small amount of work to explain why they're equivalent to the natural, first definition. (More importantly, they make the reader needlessly stop and think: "Why are we allowing $u in L_i$? Is that an important case? Wait, no, $u in L_i$ can't ever happen anyway.")
In exchange, we save on "amount of things we have to check for containing $u$". This is not really a consideration when describing the algorithm. It might theoretically be a consideration for implementing the algorithm, but in practice you'd probably label vertices with a flag "is this vertex in any of the $L_i$ defined so far?" and just check all the in-neighbors of $v$ to see whether they have that flag set or not.
edited Nov 23 at 17:31
answered Nov 23 at 17:24
Misha Lavrov
43.4k555103
43.4k555103
Thank you very much again, Misha Lavrov, for a very nice explanation. By the way, I didn't notice the third equivalent condition. Thank you.
– tchappy ha
Nov 24 at 1:59
add a comment |
Thank you very much again, Misha Lavrov, for a very nice explanation. By the way, I didn't notice the third equivalent condition. Thank you.
– tchappy ha
Nov 24 at 1:59
Thank you very much again, Misha Lavrov, for a very nice explanation. By the way, I didn't notice the third equivalent condition. Thank you.
– tchappy ha
Nov 24 at 1:59
Thank you very much again, Misha Lavrov, for a very nice explanation. By the way, I didn't notice the third equivalent condition. Thank you.
– tchappy ha
Nov 24 at 1:59
add a comment |
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3010202%2fabout-e-i-in-an-n-frac52-algorithm-for-maximum-matchings-in-bipartit%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown