graphs solution we'll examine two of these algorithms called kruskal' algorithm and dijkstra' algorithmboth named for the people that formulated the algorithm to solve their respective problems graph notation little notation will help in the graph definitions in this set is an unordered collection of items for instancev { is the set of the first natural numbers subset of set is some collectionpossibly emptyof items from its superset the set { is subset of the cardinality of set is its size or number of elements the cardinality of the set is written as | the cardinality of is and is so | and | graph ( ,eis defined by set of verticesnamed vand set of edgesnamed the set of edges are subsets of where each member of has cardinality in other wordsedges are denoted by pairs of vertices consider the simpleundirected graph given in fig the sets { and {{ },{ },{ },{ },{ },{ },{ },{ },{ },{ },{ },{ },{ },{ },{ }define this graph since each edge is itself set of cardinality the order of the vertices in each edge set does not matter for instance{ is the same edge as { many problems can be formulated in terms of graph for instancewe might ask how many colors it would take to color map so that no two countries that shared border were colored the same in this problem the vertices in fig would represent countries and two countries that share border would have an edge between them the problem can then be restated as finding the minimum number of colors required to color each vertex in the graph so that no two vertices that share an edge have the same color directed graph ( ,eis defined in the same way as an undirected graph except that the set of edgeseis set of tuples instead of subsets by defining {(vi vj where vi vj means that edges can be traversed in one direction fig an undirected graph this copy belongs to 'acha