简单最短路径问题编程c语言,最短路径动态规划问题及C语言_实现.pdf

第33卷 第2期 内 蒙 古 农 业 大 学 学 报 V01.33 No.2

2012年 3月 Mar.2012

Journalof Inner Mongolia AgriculturalUniversity

最短路径动态规划 问题及 C语言实现

张 捷 , 张仁杰 , 王科岩

(1. 内蒙古农业大学能源与交通工程学院,呼和浩特 010010;2. 计算机与信息工程学院,呼和浩特 010010)

摘要: 利用动态规划思想求解运输最短路径问题并不是一个新的问题,但利用这种思想编写计算机程序,辅助完

成其最短路径的求解,可以为解决最短路径问题提供了一个有效的工具。在编写程序 时建立数学模型、借助数学工

具写出其源程序,并在Vc环境下得以实现。程序简单易懂,并没有单纯地对Dijkstra算法进行改进,而是编写了一

种新的程序克服了Dijkstra算法不能实现多路径输出的缺点,在现实生活中为运输出行提供 了更多的选择,更有实

用价值。

关键词: 最短路径; 动态规划; C语言编程

中图分类号:TP312C 文献标识码:A 文章编号:1009—3575(2012)02—0162~04

DYNAMlC PROGRAMMING PROBLEMS OFTHESHORTEST

PATHANPD C LANGUAGE IMPLEMENTATION

ZHANGJie, ZtlANGRen—jie, WANGKe—yan

(1. CollegeofEnergyandTransportationEngineering,InnerMongoliaAgricultureUniversity,ttohhot 010010,China;

2. CollegeofComputerandInformationEngineering,InnerMongoliaAgricultureUniversi@,tlohhot010010,China)

Abstract: Itisntanew problem thatusingdynamicprogrammingalgorithm forsolvingtheshortestpathtransportationproblem ,butit

providesaneffectivetoolforsolvingthesho~estpathproblem thatthethoughtofcompilingthecomputerpmgram assistingtocomplete

itsshortestpathsolution.Inthepreparationofprocedures,amathematicalmodelisestablished.Bymeansofmathematicaltoolsthe

sourcecodeCallbewrittenandachievedintheVCenvironment.Theprogramsareeasytounderstandandnotsimplytoimproveonthe

Dijkstraalgorithm,buttowriteanewproceduretoovercometheshortcomingthatDijkstraalgorithmcantachievemulti—pathoutput.

Itprovidesmorechoice,morepracticalvalueinreallifeofrtransportnadtrave1.

Keywords: Shortestpath; dynamicprogramming; Cprogramminglanguage

径问题上其计算复杂,用时较长。为此人们研究出

1 概述 用动态规划的思想解决实际问题。具体采用顺序标

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值