Graph Digraph loop Multigraph Pseudograph loop Partite sets

  • Slides: 34
Download presentation

一些基本的圖形 Graph (無向圖) Digraph (有向圖) loop Multigraph (多圖) Pseudograph loop

一些基本的圖形 Graph (無向圖) Digraph (有向圖) loop Multigraph (多圖) Pseudograph loop

分集合 Partite sets p A graph G is m-partite if it can be partitioned

分集合 Partite sets p A graph G is m-partite if it can be partitioned into m partite sets such that each edge of G joins two vertices in different partite sets This graph can be partitioned into 3 partite sets V 1={A, B} V 2={C} V 3={D} 每一個邊所連到的點都在不同的分集合!

雙分圖 Bipartite graphs p p A graph that can be decomposed into two partite

雙分圖 Bipartite graphs p p A graph that can be decomposed into two partite sets but not fewer is bipartite It is a complete bipartite if its vertices can be divided into two non-empty groups, A and B. Each vertex in A is connected to B, and viceversa The graph is bipartite Complete bipartite graph K 2, 3

平面圖 Planar graphs p A planar graph is a graph that can be embedded

平面圖 Planar graphs p A planar graph is a graph that can be embedded in a plane so that no edges intersect Planar: NOT Planar: =

在電腦上表示圖的方法 Incident list p Incident matrix p Adjacency list p Adjacency matrix p

在電腦上表示圖的方法 Incident list p Incident matrix p Adjacency list p Adjacency matrix p

Adjacency list and adjacency matrix A: B B: A, C, D C: B, D

Adjacency list and adjacency matrix A: B B: A, C, D C: B, D D: B, C adjacency list adjacency matrix

連通性問題(Connectivity) p Question : 判斷一個圖形是否具有連通性 p Main Algorithms: n n 深度搜尋法(Depth-first search) 廣度搜尋法(Breadth-first search)

連通性問題(Connectivity) p Question : 判斷一個圖形是否具有連通性 p Main Algorithms: n n 深度搜尋法(Depth-first search) 廣度搜尋法(Breadth-first search)

深度搜尋法(Depth-first search) p Example: a graph with 10 vertices (1) (2) (8) (3) (9)

深度搜尋法(Depth-first search) p Example: a graph with 10 vertices (1) (2) (8) (3) (9) (10) 完成! (5) (4) (7) (6)

廣度搜尋法(Breadth-first search) (0) Check (1) (3) (2) (1) (4) (1) (3) (3) A B

廣度搜尋法(Breadth-first search) (0) Check (1) (3) (2) (1) (4) (1) (3) (3) A B D E C H J F G I Queue A BDE DEC EC C HJFG JFGI GI I 完成!

References Graph Theory, Ronald Gould p 圖論演算法, 黃國卿 p 沿著歐拉的足跡──圖論初探 p http: //www. all-science-fairprojects.

References Graph Theory, Ronald Gould p 圖論演算法, 黃國卿 p 沿著歐拉的足跡──圖論初探 p http: //www. all-science-fairprojects. com/science_fair_projects_encycl opedia/ p