robhaj / intro-to-graphs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Graph Theory

Node/Vertex(Points) and Edges(Lines)

vertexAndEdge

Directed vs Undirected

directedAndUndirected

Weighted vs Unweighted

weightedAndUnweighted

Ordered pairs/Set Notation

sixNodeGraph

  • V = {1,2,3,4,5,6}
  • E = {(1,2),{1,5},(2,3),(2,5),{3,4},{4,5},(4,6)}
  • G = (V,E)

V is an example of Set Notation

E is an example of Set of Ordered Pairs and Unordered Pairs

G represents the graph as 1 ordered pair.

Exercises

Find the quickest path from Vertex A to Vertex Z: img1

Find the quickest path from Vertex A to Vertex Z: img2

Find the longest path from Vertex A to Vertex Z: img3

Find the quickest path from Vertex A to Vertex Z: img4

Find the longest path from Vertex A to Vertex Z: img5

Create graphs from the following notations:

V = {A,B,C,D,E} E = {(A,E),{B,D},(C,E),{C,A},(E,D)}

V = {'Denver','Boulder','Fort Collins','Colorado Springs','Breckenridge'} E = {{'Denver','Boulder'},{'Fort Collins', 'Breckenridge'},('Boulder', 'Fort Collins')}

About