{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

14 - Graphs - Elementary Graph Theory • WE will be...

Info icon This preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
Programming and Data Structures 1 Elementary Graph Theory WE will be looking at : What is a Graph? Adjacency Matrices Adjacency Lists Breadth First Search Depth First Search Minimum Spanning Trees; What are they? Kruskal’s Algorithm for creating a MST Prim’s Algofithm for creating a MST
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Programming and Data Structures 2 A Graph A graph can be thought of a collection of vertices (V) and edges (E), so we write, G = (V, E) Graphs can be directed , or undirected , weighted or unweighted . A directed graph, or digraph, is a graph where the edge set is an ordered pair. That is, edge 1 being connected to edge 2 does not imply that edge 2 is connected to edge 1. (i.e. it has direction – trees are special kinds of directed graphs) An undirected graph is a graph where the edge set in an unordered pair. That is, edge 1 being connected to edge 2 does imply that edge 2 is connected to edge 1.
Image of page 2