UCF Local Programming Contest 2015 I. Longest Path(竞赛图 求哈密顿路径)

$任意两个点之间有且仅一条有向边,这是一个竞赛图。竞赛图一定存在哈密顿路径。Longest PathYou are visiting a lovely garden, with several points of interest. Every pair of points of interest have a single, one way path (edge) connect...
摘要由CSDN通过智能技术生成

$任意两个点之间有且仅一条有向边,这是一个竞赛图。竞赛图一定存在哈密顿路径。

 

竞赛图(百度百科)

竞赛图是通过在无向完整图中为每个边缘分配方向而获得的有向图(有向图)。 也就是说,它是一个完整图形的方向,等价于一个有向图,其中每对不同的顶点通过单个有向边连接,即每对顶点之间都有一条边相连的有向图称为竞赛图。设D为n阶有向简单图,若D中基图为n阶无向完全图,则称D是n阶竞赛图。

性质:每对顶点之间都有一条边

任何有限数量n个顶点的竞赛图都包含一个哈密尔顿路径,即所有n个顶点上的直线路径。

 

Longest Path

You are visiting a lovely garden, with several points of interest.  Every pair of points of interest have a single, one way path (edge) connecting them.  (The paths are one way so that guests don't get upset having to deal with other guests walking in the opposite direction.)  Luckily, you get to decide which point of interest to begin from.  Naturally, to get your money's worth, you'd like to visit as many of the points of interest as possible without revisiting any point of interest, since that would be a waste of time.  Determine a walking path that allows you to visit the maximal number of

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值