Graph Theory (Part 1)


Table of Contents

  1. Definitions
    1. Examples
  2. Definitions for Nondirected Graphs
    1. Example
  3. Definitions for Directed Graphs
    1. Example
  4. General Definitions for Any Graph
  5. Additional Terminology
  6. Weighted Graphs

Definitions

Examples

Nondirected Graph                         Directed Graph
-----------------                         -----------------
V = {v1, v2, v3, v4}                      V = {v1, v2, v3, v4}
E = {{v1,v2},{v1,v3},{v2,v3},{v3,v4}}     E = {{v1,v3},{v3,v4},{v4,v3},{v4,v2}}

 v1  o---------o  v2                      v1 o           o v2
      \       /                              |           ^ 
       \     /                               |           |
        \   /                                |           |
         \ /                                 |           |
          o  v3                              V           | v4
          |                               v3 o<----------o<--
          |                                  |               |
          o  v4                               ---------------

Definitions for Nondirected Graphs

Example

     v1 o    o v2
        |   /|
        |  / |   o v5
        | /  |
        |/   |
     v3 o----o v4

Definitions for Directed Graphs

Example

     Vertex  In-degree  Out-degree
     ------  ---------  ----------
       a        0          2
       b        2          0
       c        0          1
       d        1          0

     a o---------->o d
       |
       |
       |
       |
       V
     b o<----------o c

General Definitions for Any Graph

Additional Terminology