多源点、多汇点最大流问题

该博客介绍了如何解决一个涉及电力网络的问题,即在一个包含发电站、消费者和调度员的网络中,计算从多源点到多汇点的最大电力输送量。文章提供了一个实例,描述了数据集的输入格式,并给出了解决此类问题的思路,即通过添加超级源点和超级汇点,然后利用最大流算法进行求解。博主建议使用队列实现算法。

[poj 1459] (http://poj.org/problem?id=1459)
题目描述:
Power Network(给力电网)
Time Limit: 2000MS Memory Limit: 32768K
Total Submissions: 25274 Accepted: 13175
Description

A power network consists of nodes (power stations, consumers(消费者) and dispatchers(调度员)) connected by power transport lines. A node u may be supplied with an amount s(u) >= 0 of power, may produce an amount 0 <= p(u) <= pmax(u) of power, may consume an amount 0 <= c(u) <= min(s(u),cmax(u)) of power, and may deliver(投递) an amount d(u)=s(u)+p(u)-c(u) of power. The following restrictions(限制) apply: c(u)=0 for any power station, p(u)=0 for any consumer, and p(u)=c(u)=0 for any dispatcher. There is at most one power transport(运输) line (u,v) from a node u to a node v in the net; it transports an amount 0 <= l(u,v) <= lmax(u,v) of power delivered by u to v. Let Con=Σuc(u) be the power consumed in the net. The problem is to compute the maximum value of Con.
这里写图片描述

An example is in figure 1. The label(标签) x/y of power station u shows that p(u)=x and pmax(u)=y. The label x/y of consumer u shows that c(u)=x and cmax(u)=y. The label x/y of power transport line (u,v) shows that l(u,v)=x and lmax(u,v)=y. The power consumed(充满的) is Con=6. Notice that there are other possible states(规定) of the network but the value of Con cannot exceed(超过) 6.
Input

There are several data sets in the input. Each data set encodes(编码) a power network. It starts wi

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值