Network flow algorithm related problems
I am trying to solve below question from tardos. Any suggestions or help would be appreciated.
You’ve been called in to help some network administrators diagnose the extent of a failure in their network. The network is designed to carry traffic from a designated source node s to a designated target node t, so we will model it as a directed graph G = (V,E), in which the capacity of each edge is 1, and in which each node lies on at least one path from s to t.
Now, when everything is running smoothly in the network, the maximum s-t flow in G has value k. However, the current situation - and the reason you’re here - is that an attacker has destroyed some of the edges in the network, so that there is now no path from s to t using the remaining (surviving) edges. For reasons that we won’t go into here, they believe the attacker has destroyed only k edges, the minimum number needed to separate s from t (i.e. the size of a minimum s-t cut); and we’ll assume they’re correct in believing this.
The network administrators are running a monitoring pool on node s, which has the following behavior: if you issue the command ping(v), for a given node v, it will tell you whether there is currently a path from s to v. (So pint(t) reports that no path currently exists; on the other hand, ping(s) always reports a path from s to itself.) Since it’s not practical to go out and inspect every edge of the network, they’d like to determine the extent of the failure using this monitoring tool, through judicious use of the ping command.
So here’s the problem you face: give an algorithm that issues a sequence of ping commands to various nodes in the network, and then reports the full set of nodes that are not currently reachable from s. You could do this by pinging every node in the network, of course, but you’d like to do it using many fewer pings (given the assumption that only k edges have been deleted). In issuing this sequence, your algorithm is allowed to decide which node to ping next based on the outcome of earlier ping operations.
Give an algorithm that accomplishes this task using only O(k log n) pings.
algorithm network-flow
add a comment |
I am trying to solve below question from tardos. Any suggestions or help would be appreciated.
You’ve been called in to help some network administrators diagnose the extent of a failure in their network. The network is designed to carry traffic from a designated source node s to a designated target node t, so we will model it as a directed graph G = (V,E), in which the capacity of each edge is 1, and in which each node lies on at least one path from s to t.
Now, when everything is running smoothly in the network, the maximum s-t flow in G has value k. However, the current situation - and the reason you’re here - is that an attacker has destroyed some of the edges in the network, so that there is now no path from s to t using the remaining (surviving) edges. For reasons that we won’t go into here, they believe the attacker has destroyed only k edges, the minimum number needed to separate s from t (i.e. the size of a minimum s-t cut); and we’ll assume they’re correct in believing this.
The network administrators are running a monitoring pool on node s, which has the following behavior: if you issue the command ping(v), for a given node v, it will tell you whether there is currently a path from s to v. (So pint(t) reports that no path currently exists; on the other hand, ping(s) always reports a path from s to itself.) Since it’s not practical to go out and inspect every edge of the network, they’d like to determine the extent of the failure using this monitoring tool, through judicious use of the ping command.
So here’s the problem you face: give an algorithm that issues a sequence of ping commands to various nodes in the network, and then reports the full set of nodes that are not currently reachable from s. You could do this by pinging every node in the network, of course, but you’d like to do it using many fewer pings (given the assumption that only k edges have been deleted). In issuing this sequence, your algorithm is allowed to decide which node to ping next based on the outcome of earlier ping operations.
Give an algorithm that accomplishes this task using only O(k log n) pings.
algorithm network-flow
add a comment |
I am trying to solve below question from tardos. Any suggestions or help would be appreciated.
You’ve been called in to help some network administrators diagnose the extent of a failure in their network. The network is designed to carry traffic from a designated source node s to a designated target node t, so we will model it as a directed graph G = (V,E), in which the capacity of each edge is 1, and in which each node lies on at least one path from s to t.
Now, when everything is running smoothly in the network, the maximum s-t flow in G has value k. However, the current situation - and the reason you’re here - is that an attacker has destroyed some of the edges in the network, so that there is now no path from s to t using the remaining (surviving) edges. For reasons that we won’t go into here, they believe the attacker has destroyed only k edges, the minimum number needed to separate s from t (i.e. the size of a minimum s-t cut); and we’ll assume they’re correct in believing this.
The network administrators are running a monitoring pool on node s, which has the following behavior: if you issue the command ping(v), for a given node v, it will tell you whether there is currently a path from s to v. (So pint(t) reports that no path currently exists; on the other hand, ping(s) always reports a path from s to itself.) Since it’s not practical to go out and inspect every edge of the network, they’d like to determine the extent of the failure using this monitoring tool, through judicious use of the ping command.
So here’s the problem you face: give an algorithm that issues a sequence of ping commands to various nodes in the network, and then reports the full set of nodes that are not currently reachable from s. You could do this by pinging every node in the network, of course, but you’d like to do it using many fewer pings (given the assumption that only k edges have been deleted). In issuing this sequence, your algorithm is allowed to decide which node to ping next based on the outcome of earlier ping operations.
Give an algorithm that accomplishes this task using only O(k log n) pings.
algorithm network-flow
I am trying to solve below question from tardos. Any suggestions or help would be appreciated.
You’ve been called in to help some network administrators diagnose the extent of a failure in their network. The network is designed to carry traffic from a designated source node s to a designated target node t, so we will model it as a directed graph G = (V,E), in which the capacity of each edge is 1, and in which each node lies on at least one path from s to t.
Now, when everything is running smoothly in the network, the maximum s-t flow in G has value k. However, the current situation - and the reason you’re here - is that an attacker has destroyed some of the edges in the network, so that there is now no path from s to t using the remaining (surviving) edges. For reasons that we won’t go into here, they believe the attacker has destroyed only k edges, the minimum number needed to separate s from t (i.e. the size of a minimum s-t cut); and we’ll assume they’re correct in believing this.
The network administrators are running a monitoring pool on node s, which has the following behavior: if you issue the command ping(v), for a given node v, it will tell you whether there is currently a path from s to v. (So pint(t) reports that no path currently exists; on the other hand, ping(s) always reports a path from s to itself.) Since it’s not practical to go out and inspect every edge of the network, they’d like to determine the extent of the failure using this monitoring tool, through judicious use of the ping command.
So here’s the problem you face: give an algorithm that issues a sequence of ping commands to various nodes in the network, and then reports the full set of nodes that are not currently reachable from s. You could do this by pinging every node in the network, of course, but you’d like to do it using many fewer pings (given the assumption that only k edges have been deleted). In issuing this sequence, your algorithm is allowed to decide which node to ping next based on the outcome of earlier ping operations.
Give an algorithm that accomplishes this task using only O(k log n) pings.
algorithm network-flow
algorithm network-flow
asked Nov 26 '18 at 0:45
user9355495user9355495
619
619
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Use Floyd-Fulkerson on the complete network to calculate a max flow, which will consist of k edge-disjoint paths.
Since exactly k edges have been deleted, and all flow is cut off, exactly one edge must have been deleted along each of these paths.
For each path, which will contain at most n edges, do a binary search to discover the position of the broken edge, using O(log n) pings to the nodes on the path.
Terrific answer, thank you i was stuck on how to link "max flow concept" here
– user9355495
Nov 26 '18 at 8:54
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
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
},
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%2fstackoverflow.com%2fquestions%2f53473482%2fnetwork-flow-algorithm-related-problems%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
Use Floyd-Fulkerson on the complete network to calculate a max flow, which will consist of k edge-disjoint paths.
Since exactly k edges have been deleted, and all flow is cut off, exactly one edge must have been deleted along each of these paths.
For each path, which will contain at most n edges, do a binary search to discover the position of the broken edge, using O(log n) pings to the nodes on the path.
Terrific answer, thank you i was stuck on how to link "max flow concept" here
– user9355495
Nov 26 '18 at 8:54
add a comment |
Use Floyd-Fulkerson on the complete network to calculate a max flow, which will consist of k edge-disjoint paths.
Since exactly k edges have been deleted, and all flow is cut off, exactly one edge must have been deleted along each of these paths.
For each path, which will contain at most n edges, do a binary search to discover the position of the broken edge, using O(log n) pings to the nodes on the path.
Terrific answer, thank you i was stuck on how to link "max flow concept" here
– user9355495
Nov 26 '18 at 8:54
add a comment |
Use Floyd-Fulkerson on the complete network to calculate a max flow, which will consist of k edge-disjoint paths.
Since exactly k edges have been deleted, and all flow is cut off, exactly one edge must have been deleted along each of these paths.
For each path, which will contain at most n edges, do a binary search to discover the position of the broken edge, using O(log n) pings to the nodes on the path.
Use Floyd-Fulkerson on the complete network to calculate a max flow, which will consist of k edge-disjoint paths.
Since exactly k edges have been deleted, and all flow is cut off, exactly one edge must have been deleted along each of these paths.
For each path, which will contain at most n edges, do a binary search to discover the position of the broken edge, using O(log n) pings to the nodes on the path.
edited Nov 26 '18 at 3:52
answered Nov 26 '18 at 1:15
Matt TimmermansMatt Timmermans
20.5k11633
20.5k11633
Terrific answer, thank you i was stuck on how to link "max flow concept" here
– user9355495
Nov 26 '18 at 8:54
add a comment |
Terrific answer, thank you i was stuck on how to link "max flow concept" here
– user9355495
Nov 26 '18 at 8:54
Terrific answer, thank you i was stuck on how to link "max flow concept" here
– user9355495
Nov 26 '18 at 8:54
Terrific answer, thank you i was stuck on how to link "max flow concept" here
– user9355495
Nov 26 '18 at 8:54
add a comment |
Thanks for contributing an answer to Stack Overflow!
- 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%2fstackoverflow.com%2fquestions%2f53473482%2fnetwork-flow-algorithm-related-problems%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