Farm Tour 最小费用最大流

本文介绍了最小费用最大流的概念,通过一个农场参观的例子来阐述。在有向图中,寻找以费用为权的最短路径,并在此路径上输送最大流量,当边的流量达到最大后,考虑反向边。通过反复寻找最短费用路径和最大流,直到无法找到新的最短路,从而得出最小费用最大流。题目描述了一个实际应用,FJ在农场展示路径问题,要求不重复使用路径且总距离最短,输出最短旅行的长度。
摘要由CSDN通过智能技术生成

最小费用最大流
先说一下我个人的理解,首先以费用为权的有向图寻求最短路,在这条最短路上运送最大的货物,即尽可能大的流,当一条边的流已经等于其最大容量时,这条边就相当于没有了,此时只剩下反向流,然后重复这步操作,每次寻找费用最短路,在这条最短路上寻找最大流,当找不到最短路时,即找到最小费用最大流。

When FJ’s friends visit him on the farm, he likes to show them around. His farm comprises N (1 <= N <= 1000) fields numbered 1…N, the first of which contains his house and the Nth of which contains the big barn. A total M (1 <= M <= 10000) paths that connect the fields in various ways. Each path connects two different fields and has a nonzero length smaller than 35,000.

To show off his farm in the best way, he walks a tour that starts at his house, potentially travels through some fields, and ends at the barn. Later, he returns (potentially through some fields) back to his house again.

He wants his tour to be as short as possible, however he doesn’t want to walk on any given path more than once. Calculat

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值