Week 15 Reflection
Week 15 Reflection
A graph is a data structure in graph theory and algorithm that consists of a set of
vertices (or nodes) connected by edges (or arcs). Graphs are classified into two types:
directed graphs (also known as digraphs) and undirected graphs. An undirected graph
has edges that have no direction. In other words, if an edge connects vertex A to vertex
B, it also connects vertex B to vertex A. The edges of an undirected graph represent
symmetric relationships between nodes. A social network, for example, can be
represented as an undirected graph, with nodes representing people and edges
representing friendships. A directed graph, on the other hand, is one in which the edges
have a direction. That is, if an edge connects vertex A to vertex B, it does not always
connect vertex B to vertex A. The edges of a directed graph represent asymmetric
relationships between nodes. A transportation network, for example, can be represented
as a directed graph, with nodes representing cities and edges representing one-way
roads.
In summary, there are two types of graphs used in graph theory and algorithms,
and the type of graph used depends on the problem being solved.