(Graph Theory) The Hand Shaking Lemma & Application

Definitions

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.

Degree of a Vertex

  • The degree of a vertex v v v, denoted δ ( v ) \delta(v) δ(v), is the number of edges incident on v v v. Notice that a loop contributes + 2 +2 +2 degree of the vertex by definition. This is because we want the formula ∑ v ∈ V δ ( v ) = 2 ∣ E ∣ \sum_{v\in V}\delta(v)=2|E| vVδ(v)=2E for a graph G : = ( V , E ) G:=(V,E) G:=(V,E) to hold in general. This formula will be proved below.

Lemma

  • In a graph, the number of vertices with odd degrees are always even.
  • Remark: the reason this lemma is called the Hand Shaking Lemma is because another way to put it is like this: “in a party, the number of people who shakes hands with an odd number of other people is even”.

Proof

  • Observe that, in a graph, because each edge is adjacent to two (not necessarily distinct) vertices, it contributes to two degrees in total.
  • Therefore, we may make the following proposition to formally express this idea.
  • Proposition
    • In a graph G : = ( V , E ) , ∑ v ∈ V δ ( v ) = 2 ∣ E ∣ G:=(V,E), \sum_{v\in V}\delta(v)=2|E| G:=(V,E),vVδ(v)=2E.
    • Proof: the proof follows the observation above.
  • Therefore, in a graph G : = ( V , E ) G:=(V,E) G:=(V,E), suppose we have k , 0 ≤ k ≤ ∣ V ∣ k,0≤k≤|V| k,0kV vertices with odd degrees, so ∣ V ∣ − k |V|-k Vk vertices have even degrees. The sum of those ∣ V ∣ − k |V|-k Vk is definietly an even number because the sum of even numbers is always even. The sum of those k k k vertices with odd degrees, on the other hand, is even iff k k k is even. However, we know that these two sums will sum up to 2 ∣ E ∣ 2|E| 2E by the proposition, so k k k has to be an even number.
  • Side Remark: Sum of odd number of odd numbers is always odd? We can simply prove it: Suppose we have a 1 , . . . . , a n a_1,....,a_n a1,....,an that are odd numbers, and n n n is odd. Suppose thier sum, denoted s s s, is even. Then s + 1 s+1 s+1 is odd, but 1 + ∑ i = 1 n a i = 1 + n + ∑ i = 1 n ( a i − 1 ) 1+\sum_{i=1}^na_i=1+n+\sum_{i=1}^n(a_i-1) 1+i=1nai=1+n+i=1n(ai1) is odd, so we get a contradiction, so the sum, s s s, has to be even.

Application

Preliminary Definitions

  • Let G : = { V , E } G:=\{V,E\} G:={V,E} be a graph. We call ( V ′ , E ′ ) (V',E') (V,E) a subgraph of G G G iff
    • V ′ ⊆ V , E ′ ⊆ E V'\sube V, E'\sube E VV,EE.
    • For every edge e ′ ∈ E e'\in E eE, if e ′ e' e is incident on v ′ , w ′ v',w' v,w, then v ′ , w ′ ∈ V ′ v',w' \in V' v,wV.
  • A component of a graph G G G containing the vertex v v v is the subgraph that contains and only contain all the vertices and edges that are contained in some path starting from v v v. Oberve from the definition that a component is always a connected (sub)graph.

Example

  • There are 100 100 100 cities. Each city has 50 50 50 roads connected to it, and each road connects two different cities. From every city, you can drive to every other city. Show that upon removing any single road, you can still drive from each city to another.
  • Proof
    • Firstly, observe that we can rephrase the setup as a connected graph, say G G G, with 100 100 100 vertices, where each vertex has a degree of 50 50 50.
    • Suppose we remove an edge (i.e. a road), and this graph is no longer connected. Suppose this edge is incident on vertices v 1 v_1 v1 and v 2 v_2 v2.
    • Assume this graph is no longer connected, then there exists two distinct verteices v ∈ G v\in G vG and w ∈ G w\in G wG such that there is no path between them. Therefore, we have at least two (disconnected) components under the assumption.
    • Observe that after removing the edge, the degree of both v 1 v_1 v1 and v 2 v_2 v2 are 49 49 49 (which is odd).
    • Thus, with the degrees of the other vertices unchanged, it is impossible for v 1 , v 2 v_1,v_2 v1,v2 to be in two different components of G G G because the Hand Shaking Lemma states that in any graph, the number of vertices with odd degrees is even, and each component is a graph, so it’s impossible for a component to have only one vertex of degree 49 49 49(odd) and other vertices of degree 50 50 50(even). Therefore, under the assumption of disconnectivity, v 1 , v 2 v_1,v_2 v1,v2 are in the same component.
    • Then we add back the edge we removed. This should give us the original connectedgraph G G G, but as v 1 v_1 v1 and v 2 v_2 v2 are in the same component, adding back this vertex will not connect the component they are in with other component(s), so disconnectivity maintains, which gives us a contradiction. This means removing an edge maintains the connectivity.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值