Redian新闻
>
一个关于simple cycle with zero weight的问题
avatar
一个关于simple cycle with zero weight的问题# Programming - 葵花宝典
d*g
1
要求证明是np-complete.
怎样从subset sum 问题 转化到这个问题。
Subset sum:
Given a set U of natural numbers {a1,a2....an) and a W, is there any subset
of U whose sum is equal to W.
Assume we know this problem is NP-COMPLETE
a directed graphG==(V,E),there is a weight w(e) for every edege e, which
would be positive or negative. Zero-weight-cycle problem is to decide if
there is a simple cycle in G so that sum of the edges weight is 0.
avatar
g*a
2
听上去像是家庭作业
粗略想来很简单,直接告诉你答案的话你印象不深
自己再好好想想

subset

【在 d********g 的大作中提到】
: 要求证明是np-complete.
: 怎样从subset sum 问题 转化到这个问题。
: Subset sum:
: Given a set U of natural numbers {a1,a2....an) and a W, is there any subset
: of U whose sum is equal to W.
: Assume we know this problem is NP-COMPLETE
: a directed graphG==(V,E),there is a weight w(e) for every edege e, which
: would be positive or negative. Zero-weight-cycle problem is to decide if
: there is a simple cycle in G so that sum of the edges weight is 0.

avatar
d*g
3
想了很久,没有得出答案。
而且马上要交了。。。。
avatar
l*x
4
飘过
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。