Description
A university network is composed of N computers. System administrators gathered information on the traffic between nodes, and carefully divided the network into two subnetworks in order to minimize traffic between parts.
A disgruntled computer science student Vasya, after being expelled from the university, decided to have his revenge. He hacked into the university network and decided to reassign computers to maximize the traffic between two subnetworks.
Unfortunately, he found that calculating such worst subdivision is one of those problems he, being a student, failed to solve. So he asks you, a more successful CS student, to help him.
The traffic data are given in the form of matrix C, where Cij is the amount of data sent between ith and jth nodes (Cij = Cji, Cii = 0). The goal is

此博客介绍了如何解决一个计算机网络割接问题,即在一个由N台计算机组成的网络中,通过重新分配节点来最大化两个子网间的流量。题目描述了一个不满的学生试图报复学校网络的场景,而你需要帮助他找到最佳的割接方案,以增加子网间的通信量。该问题可以转化为图论中的最大割问题,通过遍历所有可能的节点划分组合,寻找能最大化总流量的子集。AC代码展示了一种DFS搜索方法来求解此问题。
最低0.47元/天 解锁文章
1134

被折叠的 条评论
为什么被折叠?



