graph-theory

Graph

  • Definition:
    A graph G = is a pair and consists of two sets V and E such that
    • is the set of vertices and
    • is the set of edges.
  • V cannot be empty, E cannot be empty.
  • A vertex can also be called an endpoint (node).
  • Each edge has one or two vertices.

Simple Graph

  • A graph is a simple graph if:
    • each edge connects two different vertices and
    • where no two edges connect the same pair of vertices.

简单图是一种没有自环和重复边的图。也就是说,在简单图中,每条边连接两个不同的点,且同一对顶点之间只有一条边。

Multigraph

  • A multigraph is a graph that may have multiple edges connecting the same pair of vertices.
  • If there are m different edges associated to the same unordered pair of vertices.

Multigraph(多重图)是一种有重复边的图。也就是说,在Multigraph中,两个顶点之间可以有多条边。
在图论中,Multiplicity(重数)指的是一条边在一个图中出现的次数。在简单图中,每条边的重数为1,而在Multigraph中,一条边的重数可以大于1。

Loop

  • A loop is an edge that connects one vertex to itself.
  • Graphs that may include loops, and possibly multiples edges connecting the same pair of vertices are called pseudo-graph.(伪图)

在图论中,Loop(自环)是一条连接同一个顶点的边。自环的两个端点是同一个顶点。在简单图中不存在自环,但在Multigraph中可以存在自环。自环的重数为自环的数量。

Directed Graph

  • A directed graph (V, E) consists of a nonempty set V and a set of directed edges E.
  • The edge (u, v) in a directed graph starts at u and ends at u.
  • The edge (v, u) starts at v and ends at u.
  • The edges in an undirected graph have no direction.

Degree

Undirected

  • The degree of a vertex in an undirected graph is the number of edges connected with it except that a loop at a vertex contribute twice to the degree of that vertex.
  • Denoted by where v is a vertex.

Directed

  • In-Degree and Out-Degree
  • The in-degree of a vertex (u) in a directed graph is the number of edges that end at this vertex, denoted by .
    The out-degree of a vertex in a directed graph is the number of edges that start at this vertex, denoted by

Handshaking Theorem

  • Theorem: For an undirected graph

Odd Degree Theorem

  • Theorem: An undirected graph has an even number of vertices of odd degree.
    (奇度点个数偶数)
  • Theorem: In a directed graph

Some Special Simple Graphs

Complete Graphs

  • A complete graph is a simple graph in which there is an edge between each pair of distinct vertices, denoted by where n is the number of nodes in the graph.

CompleteGraph

Cycle

  • A cycle is a graph that contains n vertices and n edges denoted by where n is the number of nodes in the graph.

Cycle

Wheel

  • A wheel is obtained by adding an additional vertex to the cycle , for n > 3, and connect this new vertex to each of the vertices in , by new edges.

Wheel

Cube

  • A cube of dimension n is a simple graph of vertices, where each vertex represents a bit string of length n. Two vertices are adjacent if and only if they differ by one bit.

Cube

Complete Bipartite Graphs

  • A simple graph is called bipartite if its vertex set V can be partitioned into two disjoint set , and , such that every edge in the graph connects a vertex in , and a vertex in ,
  • and , are called a bipartite of the vertex set V of G.

Bipartite Graph

Theorem

  • Theorem: A simple graph G = (V, E) is bipartite if and only if it ispossible to color each vertex with one of two colors so that noadiacent vertices have the same color.

Subgraphs and Proper Subgraphs

  • A subgraph H = (W, F) of graph G = (V, E) is made up of vertices and edges
  • A subgraph H of G is a proper subgraph if

Subgraphs

Union