(Graph Theory) Graphs and Trees


Intro & Reference

This note briefly goes over some (i.e. not all) topics about graphs and trees. There are links to my other posts in this note for additional details such as proofs of theorems and application of various ideas.
Reference: Discrete Mathematics 8th Ed by Richard Johnsonbaugh.


Part 1. Graph

1. Graph & Simple Graph

  • A graph (or an undirected graph) G G G consists of a set V V V of vertices and a set E E E of edges such that each edge e ∈ E e \in E eE is associated with an unordered pair of vertices. If there is a unique edge e e e associated with the vertices v v v and w w w, we write e = ( v , w ) e = (v,w) e=(v,w) or e = ( w , v ) e = (w,v) e=(w,v). In this context, ( v , w ) (v,w) (v,w) denotes an edge between v v v and w w w in an undirected graph and not an ordered pair. If a graph has vertices V V V and edges E E E, we write G = ( V , E ) G=(V,E) G=(V,E).
  • For a graph G = ( V , E ) G=(V,E) G=(V,E) and v , w ∈ V v,w \in V v,wV, we say v v v and w w w are adjacent to each other iff there exists some edge e ∈ E e\in E eE that is incident on v v v and w w w.
  • Parallel edges in a graph are edges that are incident on the same pair of vertices.
  • A loop in a graph is an edge that is incident on only one vertex.
  • With the definitions of a graph, parallel edges, and a loop, we can then define simple graph so that we restrict future discussions to this “simple” type of graph:
    A simple graph is a graph with no loops or parallel edges.
  • Notice we can still have a “lone” vertex be part of a graph:
    An isolated vertex is a vertex that is not incident on any edges (so it is also not adjacent to any other vertices).
  • When we have a numerical weight (and thus non-negative because we typically do not have negative weights) assigned to each vertex of a graph, the graph becomes a weighted graph.

2. Ways to Represent a Graph

  • We will use an example to illustrate ways to represent a graph G G G:
    • The first way is to picture the graph:在这里插入图片描述
    • The second way is to define the graph by G : = ( V , E ) G:=(V,E) G:=(V,E) where V : = { a , b , c } , E : = { ( a , b ) , ( b , c ) , ( a , c ) } V:=\{a,b,c\}, E:=\{(a,b),(b,c),(a,c)\} V:={ a,b,c},E:={ (a,b),(b,c),(a,c)} (the order does not matter).
      Remark:If we have drawn and properly labled our graph like we did above, we can write E E E as { e 1 , e 2 , e 3 } \{e_1,e_2,e_3\} { e1,e2,e3} .
    • Moreover, we can use an adjacency matrix to represnt the graph above, and the ordering of the vertices we choose is ( a , b , c ) (a,b,c) (a,b,c).   a b c a 0 1 1 b 1 0 1 c 1 1 0 \begin{matrix} ~ & a & b &c \\ a & 0 & 1 & 1 \\ b & 1 & 0 & 1\\ c & 1 & 1 & 0 \end{matrix}  abca011b101c110

3. Path & Simple Connected Graph

The graphs we are primarily interested in are the simple connected graphs. We are going to define it by first introducing path.

  • For v 0 , v n ∈ V v_0,v_n\in V v0,vn

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值