Is a set of points with lines connecting some of the points.
The points are called nodes or vertices ,and the lines are called edges.
Path in a graph is a sequence of nodes connected by edges.
Formal definition of the graph:
G = (V, E), where V is the set of nodes and E is the set
of edges.
Has two types:
Undirected graph:
في النوع دا انت مش عارف مين رايح لمين
V = {1, 2, 3, 4, 5}, E = {(1, 5), (1, 4), (2, 3), (2, 4),(3, 5)}, G = ({1, 2, 3, 4, 5}, {(1, 5),
(1, 4), (2, 3), (2, 4),(3, 5)})
has arrows instead of lines.
outdegree: the number of arrows pointing from a particular node. عدد node الاسهم الي خارجة من كل
indegree: the number of arrows pointing to a particular node. عدد الاسهم node الي داخلة لكل
رايحة لفين node هنا انت عارف كل