给定一个加权有向图,我们想要找到全局最小割集--也就是说,一组边,如果去掉这些边,就会将图分成两半,并且与任何其他的割集相比,它们的总重量最小。
现在,尽管下面这些似乎有效,但我被告知推理是错误的。但坦率地说,我不知道他是怎么做到的,我也不确定他有多确定:
考虑由全局最小割集(即s-t- U,V,其中s in U, t in V)分隔的节点集。注意:我们不关心从V到U的边缘。
对于任何u in U, v in Vm,u-v-切不能小于s-t-cut,否则,s-t-削减将不是(全局的)最小。出于同样的原因,u中的两个顶点之间或V中的两个顶点之间的切线都不可能更小。
另一方面,u-v切割也不可能更
我想使用最大流算法(Edmond Karp / Ford-Fulkerson算法)找出无向图的边连通性(即,要移除以断开图的最小边数),
我知道我可以通过找到图的每两个节点之间的最小最大流来完成这项任务,但这将导致O(|V| ^ 2)个流网络,
int Edge-Connectivity(Graph G){
int min = infinite;
for (Vertex u: G.V){
for (Vertex v: G.V){
if (u != v){
//create directed graph Guv (
Let G = (V, E) be a flow network
with source s, sink t, and capacity function c(·). Assume that, for every
edge e ∈ E, c(e) is an integer. Define the size of an s-t cut (A, B) in G
to be the number of edges directed from A to B. Our goal is to identify,
from among all minimum cuts in G, a minimum cu
public class Graph
{
public Graph()
{
Vertices = new Dictionary<int, List<int>>();
}
public Dictionary<int,List<int>> Vertices { get; set; }
public void ApplyKrager()
{
var random = new Random();
while (Vertices.Count >
在最近的一次计算中,我被要求设计一种算法,即for a network having V vertices and E edges, if by adding an edge (it's capacity should be 1) results in increase the maximum flow.,我们必须设计这样的算法来找到这样的边。
算法应该比O(|E|* h(|V||E|))更快,其中h(|V||E|)是计算最大流所用的时间。
提前谢谢。如果不清楚,请告诉我。
我正在使用JGraphT,我使用EdmondsKarpMFImpl。
问题是:如何定义所有的边缘--什么是“参与”?
我试着使用getCutEdges方法,但它只返回1边。
我有以下图表:
(所有边都有一个权重值(1)和一个剩余容量值(10))
public SimpleDirectedWeightedGraph generateAbilene(){
Supplier<Integer> vSupplier3 = new Supplier<Integer>() {
private int id = 1;