Question #62137

With examples clearly distinguish between undirected graphs and directed graphs

Expert's answer

Answer on Question #62137, Programming & Computer Science / MatLAB | Mathematica | MathCAD | Maple

With examples clearly distinguish between undirected graphs and directed graphs

Answer:

A graph is a collection of nodes (sometimes called vertices) and edges (sometimes called arcs), where nodes represent some objects and edges – connections between them.

The graph edges sometimes have weights, which indicate the strength (or some other attribute, for example, length or capacity) of each connection. Such graphs are called weighted graphs.

Undirected graphs have edges that do not have a direction. The edges indicate a two-way relationship, in that each edge can be traversed in both directions. If the graph edges have weights, then the costs of traverse in both directions are equal.

Example:



The figure above shows the undirected weighted graph with 9 nodes and 15 edges. This graph can represent the travel map where nodes are towns, edges are roads between them, and weights are distances between towns (or, alternatively, time of travel). For example, the fact that nodes 6 and 8 are connected by the edge with weight 4 means that the distance between towns 6 and 8 equals to 8 miles.

Directed graphs have edges with direction. The edges indicate a one-way relationship, in that each edge can only be traversed in a single direction. If the graph edges have weights, then two nodes can be connected with two edges with different weights which means that the costs of traverse in both directions are not equal.

Example:



The figure above shows the directed weighted graph with 4 nodes and 6 edges. This graph can represent the railroad map where nodes are towns, edges are railroad routes between them, and weights are ticket costs in hundred dollars. For example, the fact that nodes 0 and 3 are connected by two directed edges with weights 1 and 3 means that the cost of travel from town 0 to town 3 equals to 100,butthecostoftravelfromtown3totown0equalsto100, but the cost of travel from town 3 to town 0 equals to300.

http://www.AssignmentExpert.com

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS