Shortest Paths with Multiplicative Cost. In a given undirected graph, the path cost is measured as a product of all the edges in the path. The weights are rational numbers (e.g., 0.25, 0.75, 3.75 etc) or integers (2, 3). There are no negative edges. Given such a graph as input, you are to output the shortest path between any two given vertices. Input is the adjacency matrix and the two vertices. You must output the path.
标签: Multiplicative undirected Shortest measured
上传时间: 2017-04-08
上传用户:邶刖
Edge Disjoint Cycles. You are given an input graph that is either directed or undirected. Write a program that reads in a vertex number and lists the number of edge disjoint cycles that start and end at this vertex. The output should also list the edges in each of the cycle discovered. Input will be the adjacency matrix preceded by a 0 or 1 representing Directed or undirected graphs respectively.
标签: undirected Disjoint directed Cycles
上传时间: 2017-04-08
上传用户:13188549192
A class on for undirected graphs. Tester is available
标签: undirected available Tester graphs
上传时间: 2013-12-12
上传用户:CHINA526
Write a program to decide if a graph has a cycle or not. The given graph can be a directed or undirected graph, which is indicated at the time of reading the input (0 for directed graph and 1 for undirected graphs). The input is given as an adjacency list.
标签: graph directed program decide
上传时间: 2013-12-23
上传用户:cursor
Specification File adjacencyListGragh class GeneralGraph: use adjacency list to implement the graph which data structure is vector Construct methods: * public GeneralGraph(): contain an empty vector store the vertex and a boolean determines whether graph is directed or not, defaulted is undirected
标签: adjacencyListGragh Specification GeneralGraph adjacency
上传时间: 2013-12-13
上传用户:lyy1234