CodeBus
www.codebus.net
Search
Sign in
Sign up
Hot Search :
Source
embeded
web
remote control
p2p
game
More...
Location :
Home
Search - shortest path graph
Main Category
SourceCode
Documents
Books
WEB Code
Develop Tools
Other resource
Search - shortest path graph - List
[
VC/MFC
]
dijkstra
DL : 1
dijkstra算法 问题描述 目前网络上电子地图的使用很普遍。利用电子地图可以很方便地确定从一个地点到另一个地点的路径。特别地,可确定在城市中的公交换乘路线。 电子地图可以看成是一个图,而公交线路图可看成是带权有向图G =(V,E),其中每条边的权是非负实数。 你的任务:对给定的一个(无向)图G,及G中的两点s、t,计算从顶点s到顶点t的最短距离和最少路段数。 输入 输入文件中有若干组测试数据(组数不超过20)。 每组测试数据的第1行是一个正整数n,表示地图G的顶点数,n<50。 接下来的n行采用邻接矩阵方式描述这一个地图,第i行有n个数,依次表示第i个顶点与第1、2、3、…、n个顶点的路径长。假如两个顶点间无边相连,用一个-1表示。相邻的两个整数之间用空格隔开。注意,图中每个顶点 i处都没有自己到自己的边。 再在下面的一行上给出两个整数s、t,表示上述地图上的两个顶点。 每组测试数据输入结束后空一行。 输入直到文件结束。-Description of the problem At present the use of electronic maps on the network are common. The use of electronic maps can be easily identified from one location to another location path. In particular, can be determined in the cities bus transfer routes. E-map can be seen as a map, while the bus route map can be seen as a weighted directed graph G = (V, E), in which each edge of the right of a non-negative real number. Your task: given a (undirected) Figure G, and G, two points s, t, calculated from the vertex s to vertex t, the shortest distance and the minimum number of sections. Input Input file there are several groups of test data (group of not more than 20). Each test data row 1 is a positive integer n, said the map of G, vertices, n <50. The next n lines describe the use of adjacency matrix, a map, the first i have n number of rows in turn said that the first i vertices with the first 1,2,3, ..., n vertices of the path length. If the two ver
Date
: 2025-12-28
Size
: 862kb
User
:
谷
[
VC/MFC
]
yy
DL : 0
存储结构为邻接表,是无向图,使用迪杰斯特拉算法实现求两点的最短距离,并且输出路径序列。-Storage structure adjacent to the table, is the undirected graph, Dijkstra algorithm using the shortest distance between two points in demand and output path sequence.
Date
: 2025-12-28
Size
: 1kb
User
:
张雷
[
VC/MFC
]
Algorithm-Analysis-and-Design-Paper
DL : 0
本文主要是浅析了Floyd算法在校车安排与站点优化中的应用问题。为了求解出各区域间的距离,我们建立了有权无向图,方便了求解过程。利用图论中的Floyd算法求解出了各个区域之间的最短路径,得到了D矩阵和R矩阵(其中D矩阵直观的表达出任意两个区之间的最短路径,R矩阵又列出了任意两个区最短路径具体的路线),进而成功解决了如何安排有限个站点使得教师及其他工作人员获得满意度最高的问题。-This article is Analysis of the Floyd algorithm in the school bus arrangements and site optimization in the application. In order to solve the distance between the regions, we have established a right to an undirected graph, facilitate the solution process. The use of graph theory Floyd algorithm out the shortest path between the various regions to get the D matrix and R matrix (D matrix which any two out of visual expression in the shortest path between the areas, R matrix and list any two specific areas of the shortest path route), and then successfully resolved how to arrange a limited number of sites making teachers and other staff received the highest satisfaction problems.
Date
: 2025-12-28
Size
: 49kb
User
:
黎明
[
VC/MFC
]
tujiqiyingyong
DL : 0
将城市乘车路线看成有向图,求出两个地方的最短路径-The city bus line as a directed graph, find the shortest path of the two places
Date
: 2025-12-28
Size
: 1kb
User
:
吕茂辉
[
VC/MFC
]
Bellman-ford
DL : 0
单源最短路径(从源点s到其它所有顶点v); (2)有向图和无向图(无向图可以看作(u,v),(v,u)同属于边集E的有向图); (3)边权可正可负(如有负权回路输出错误提示); (4)差分约束系统。 -Single source shortest path (from s to all other vertices V) (2) the directed graph and undirected graph (undirected graph can be thought of as (U, V), (V, U) belong to the same set of edges E directed graph) (3) the right side can be positive or negative (such as a negative right loop output error) (4) system of difference constraints
Date
: 2025-12-28
Size
: 6kb
User
:
刘畅
[
VC/MFC
]
daohang
DL : 0
这个是在学数据结构里,图的那一张所要学的图的遍历,图的最短路径。这个导航系统,完全兼容了这些内容!-This data structure is in school, a figure that you want to learn a graph traversal, the shortest path. This navigation system is fully compatible with these contents!
Date
: 2025-12-28
Size
: 8kb
User
:
陈洪杨
[
VC/MFC
]
Graph
DL : 0
该ppt包含了图的数据结构及基本操作,同时还有图的最短路径,深度,广度遍历等-This ppt contains the graph data structure and basic operation, as well as the shortest path, depth, breadth traversal
Date
: 2025-12-28
Size
: 55kb
User
:
谢文婷
[
VC/MFC
]
CPP
DL : 0
1,最短路径问题: 给你n个点,m条无向边,每条边都有长度d和花费p,给你起点s终点t,要求输出起点到终点的最短距离及其花费,如果最短距离有多条路线,则输出花费最少的。 输入: 输入n,m,点的编号是1~n,然后是m行,每行4个数 a,b,d,p,表示a和b之间有一条边,且其长度为d,花费为p。最后一行是两个数 s,t 起点s,终点t。n和m为0时输入结束。 (1<n<=1000, 0<m<100000, s != t) 输出: 输出 一行有两个数, 最短距离及其花费。 2,建立一个图 3,建一个图书馆管理系统,说明:程序使用说明: 本程序是简单的图书管理系统,分为添加新书、浏览全部图书和删除图书三个功能。 输入1可添加新书,分别输入书名、ISDN、价格和作者后,即添加完成。 输入2可浏览全部的图书。 输入3可删除图书,输入要删除的行号,即可删除该行,如果输入的行号是最后一行,即删除全部。 4,最小生成树prim算法 5,C++primer 教材电子版(第四版)-1, the shortest path problem: Give you n points, m strip undirected edges, each side has a length d and spending p, to give you a starting point s end t, the required output starting the shortest distance to the end of its cost, if the shortest distance between multiple routes, the output of the least expensive. Input: Input n, m, the point number is 1 ~ n, then the m rows, each row 4 numbers a, b, d, p, between a and b represents an edge and having a length of d, cost for p . The last line is the two numbers s, t starting point s, end t. n and m are 0:00 input ends. (1 <n <= 1000, 0 <m <100000, s! = T) Output: There are two output a line number, the shortest distance and cost. 2, the establishment of a graph 3, built a library management system, Definitions: Instructions for use: This program is a simple library management system, divided into adding new books, browse books and books delete all three functions. Enter 1 to add new books, and receive
Date
: 2025-12-28
Size
: 2.33mb
User
:
刘小喵
[
VC/MFC
]
Jump-Point-Search-_-Shortest-Path
DL : 0
关于图论的算法,可以提高自己的编程竞技水平,从而拿到奖项。-algorithm about graph
Date
: 2025-12-28
Size
: 534kb
User
:
cheng
[
VC/MFC
]
分支界限法求解单源点最短路径
DL : 0
给定下示有向图,利用分支限界法的思想,计算并输出其单源最短路径。(Given the directed graph, using the idea of branch and bound method, the shortest path of single source is calculated and output.)
Date
: 2025-12-28
Size
: 164kb
User
:
沉沦丶
CodeBus
is one of the largest source code repositories on the Internet!
Contact us :
1999-2046
CodeBus
All Rights Reserved.