08 Graphs Graphs Algorithm
08 Graphs Graphs Algorithm
- A nonlinear data structure that consists of vertices and edges (the vertices
are sometimes referred to as nodes and the edges are lines or arcs that
connect any two nodes in the graph.
Edges – are drawn or used to connect two nodes of the graph. It can be
ordered pair od nodes in a directed graph. Edges can connect any two
nodes in any possible way. There are no rules. Sometimes edge can be
labeled or unlabeled.
DIRECTED GRAPH
- This is usually indicated with an arrow on the edge; more formally, if v and
w are vertices, an edge is an unordered pair {v, w}, while a directed edge,
called an arc, is an ordered pair, {v, w} or {w, v}.
SEARCHING AND TRAVERSING
GRAPHS