Posts

Showing posts from December, 2021

GRAPHS DATA STRCUTURE

Image
Definition and Concepts A graph G consists of non-empty set V called the set of nodes (points,vertices) of the graph, a set E which is the set of edges of the graph, and a mapping from the set of edges E to a set of pairs of elements of V. G = (V, E) We shall assume throughout that both sets V and E are finite. Every edge of the graph G, we can associate a pair of nodes(u, v) where u, v belong to set V, then we say that the edge x connects the nodes u and v. Any two nodes which are connected by an edge in a graph are called adjacent nodes. In a graph G = (V, E), an edge is directed from one node to another node is called directed edge. A graph in which every node has directed edges is called directed graph, or a digraph. An edge which has no specific direction is called undirected edge. A graph which consists of undirected edges is called undirected graph. A graph which consists of both directed and undirected graphs is called a mixed graph. A city map showing only the one-way streets