1. Trang chủ
  2. » Tất cả

Chapter 8 graphs

35 1 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề Introduction to Graphs
Tác giả Huynh Tuong Nguyen, Tran Vinh Tan
Trường học University of Technology - VNUHCM
Chuyên ngành Computer Science and Engineering
Thể loại Chương
Năm xuất bản 2015
Thành phố Ho Chi Minh City
Định dạng
Số trang 35
Dung lượng 408,34 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Introduction to Graphs Introduction to Graphs Huynh Tuong Nguyen, Tran Vinh Tan Contents Graph definitions Terminology Special Simple Graphs Representing Graphs and Graph Isomorphism Representing Grap[.]

Trang 1

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Graph definitions

Terminology

Special Simple Graphs

Representing Graphs and Graph Isomorphism

Discrete Structures for Computing on October 27, 2015

Huynh Tuong Nguyen, Tran Vinh TanFaculty of Computer Science and Engineering

Trang 2

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Graph definitions

Terminology

Special Simple Graphs

Representing Graphs and Graph Isomorphism

Special Simple Graphs

2 Representing Graphs and Graph Isomorphism

Trang 3

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Graph definitions

Terminology

Special Simple Graphs

Representing Graphs and Graph Isomorphism

Trang 4

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Graph definitions

Terminology

Special Simple Graphs

Representing Graphs and Graph Isomorphism

A graph (đồ thị)Gis a pair of(V, E), which are:

• V – nonempty set ofvertices(nodes) (đỉnh)

234

Trang 5

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Graph definitions

Terminology

Special Simple Graphs

Representing Graphs and Graph Isomorphism

Undirected Graph (Đồ thị vô hướng)

Definition (Simple graph (đơn đồ thị))

• Each edge connects two different vertices, and

• No two edges connect the same pair of vertices

An edge between two vertices u and v is denoted as {u, v}

Trang 6

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Graph definitions

Terminology

Special Simple Graphs

Representing Graphs and Graph Isomorphism

Definition (Multigraph (đa đồ thị))

Graphs that may have multiple edges connecting the same vertices

An unordered pair of vertices {u, v} are calledmultiplicity m(bội

m) if it has m different edges between

Trang 7

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Graph definitions

Terminology

Special Simple Graphs

Representing Graphs and Graph Isomorphism

Definition (Pseudograph (giả đồ thị))

Are multigraphs that have

• loops(khuyên)– edges that connect a vertex to itself

Trang 8

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Graph definitions

Terminology

Special Simple Graphs

Representing Graphs and Graph Isomorphism

Definition (Directed Graph (đồ thị có hướng))

A directed graphGis a pair of (V, E), in which:

• V – nonempty set of vertices

• E – set of directed edges (cạnh có hướng )

A directed edgestartat u andendat v is denoted as (u, v)

Trang 9

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Graph definitions

Terminology

Special Simple Graphs

Representing Graphs and Graph Isomorphism

In an undirected graph G = (V, E),

• two verticesuandv ∈ V are calledadjacent(liền kề ) if they

areend-points(điểm đầu mút) of edgee ∈ E, and

• eisincident with(cạnh liên thuộc)uandv

• eis said toconnect (cạnh nối )uandv;

The degree of a vertex

Thedegree of a vertex(bậc của một đỉnh), denoted bydeg(v)is

the number of edges incident with it, except that a loop

contributes twice to the degree of that vertex

• isolatedvertex (đỉnh cô lập): vertex of degree0

• pendantvertex (đỉnh treo): vertex of degree1

Trang 10

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Graph definitions

Terminology

Special Simple Graphs

Representing Graphs and Graph Isomorphism

In G, deg(a) = 2, deg(b) = deg(c) = deg(f ) = 4, deg(d) = 1,

Neiborhoods of these vertices are

N (a) = {b, f }, N (b) = {a, c, e, f },

In H, deg(a) = 4, deg(b) = deg(e) = 6, deg(c) = 1,

Neiborhoods of these vertices are

N (a) = {b, d, e}, N (b) = {a, b, c, d, e},

Trang 11

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Graph definitions

Terminology

Special Simple Graphs

Representing Graphs and Graph Isomorphism

Theorem (The Handshaking Theorem)

LetG = (V, E) be an undirected graph withmedges Then

Trang 12

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Graph definitions

Terminology

Special Simple Graphs

Representing Graphs and Graph Isomorphism

In an directed graph G = (V, E),

• uis said to beadjacent to(nôi tới )v andv is said to be

adjacent from (được nối từ)uif(u, v)is an edge ofG, and

• uis calledinitial vertex(đỉnh đầu) of(u, v)

• v is calledterminal (đỉnh cuối ) orend vertexof(u, v)

• the initial vertex and terminal vertex of a loop are the same

The degree of a vertex

In a graph G with directed edges:

• in-degree(bậc vào) of a vertexv, denoted bydeg−(v), is

the number of edges withv as their terminal vertex

• out-degree(bậc ra) of a vertex v, denoted bydeg+(v), is

the number of edges withv as their initial vertex

Note: a loop at a vertex contributes 1to both the in-degree and

the out-degree of this vertex

Trang 13

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Graph definitions

Terminology

Special Simple Graphs

Representing Graphs and Graph Isomorphism

Trang 14

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Graph definitions

Terminology

Special Simple Graphs

Representing Graphs and Graph Isomorphism

A complete graph (đồ thị đầy đủ ) on n vertices, Kn, is a simple

graph that containsexactly one edge between each pair of distinct

vertices

Trang 15

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Graph definitions

Terminology

Special Simple Graphs

Representing Graphs and Graph Isomorphism

A cycle (đồ thị vòng ) Cn, n ≥ 3, consists of n vertices

v1, v2, , vn and edges {v1, v2}, {v2, v3}, , {vn−1, vn}, and

{vn, v1}

Trang 16

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Graph definitions

Terminology

Special Simple Graphs

Representing Graphs and Graph Isomorphism

We obtain a wheel (đồ thị hình bánh xe) Wn when we add an

additional vertex to a cycle Cn, for n ≥ 3, and connect this new

vertex to each of the n vertices in Cn

Trang 17

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Graph definitions

Terminology

Special Simple Graphs

Representing Graphs and Graph Isomorphism

An n-dimensional hypercube (khối n chiều), Qn, is a graph that

has vertices representing the 2n bit strings of length n Two

vertices are adjacent iff the bit strings that they represent differ in

exactly one bit position

Q1

1110

Q2

101100

111110

Q3

Trang 18

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Graph definitions

Terminology

Special Simple Graphs

Representing Graphs and Graph Isomorphism

Applications of Special Graphs

• Local networks topologies

• Star, ring, hybrid

• Parallel processing

• Linear array

• Mesh network

Trang 19

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Graph definitions

Terminology

Special Simple Graphs

Representing Graphs and Graph Isomorphism

A simple graphGis called bipartite (đồ thị phân đôi ) if its vertex

setV can be partitioned into two disjoint setsV1andV2 such that

every edge in the graph connects a vertex inV1and a vertex inV2

(so that no edge inGconnects either two vertices inV1 or two

vertices inV2)

Example

C6 is bipartite

C6

Trang 20

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Graph definitions

Terminology

Special Simple Graphs

Representing Graphs and Graph Isomorphism

A complete bipartite Km,nis a graph that

• has its vertex set partitioned intotwo subsetsof m and n

vertices, respectively,

• with an edge between two vertices iff one vertex is in the first

subset and the other is in the second one

K3,3

Trang 21

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Graph definitions

Terminology

Special Simple Graphs

Representing Graphs and Graph Isomorphism

Trang 22

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Graph definitions

Terminology

Special Simple Graphs

Representing Graphs and Graph Isomorphism

Theunion(hợp) of two simple graphsG1= (V1, E1)and

G2= (V2, E2)is a simple graph with vertex setV1∪ V2and edge

setE1∪ E2 The union ofG1andG2is denoted byG1∪ G2

Trang 23

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Graph definitions

Terminology

Special Simple Graphs

Representing Graphs and Graph Isomorphism

Adjacency Lists (Danh sách kề)

Vertex Adjacent vertices

Trang 24

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Graph definitions

Terminology

Special Simple Graphs

Representing Graphs and Graph Isomorphism

a b c da

bcd

Trang 25

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Graph definitions

Terminology

Special Simple Graphs

Representing Graphs and Graph Isomorphism

Trang 26

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Graph definitions

Terminology

Special Simple Graphs

Representing Graphs and Graph Isomorphism

Trang 27

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Graph definitions

Terminology

Special Simple Graphs

Representing Graphs and Graph Isomorphism

Trang 28

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Graph definitions

Terminology

Special Simple Graphs

Representing Graphs and Graph Isomorphism

F

G

Trang 29

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Graph definitions

Terminology

Special Simple Graphs

Representing Graphs and Graph Isomorphism

G1= (V1, E1)andG2= (V2, E2)areisomorphic(đẳng cấu) if

there is aone-to-one functionf fromV1 toV2 with the property

that a and b are adjacent inG1iiff (a) andf (b)are adjacent in

G2, for allaandb inV1 Such a function f is called an

isomorphism (một đẳng cấu)

(i.e there is a one-to-one correspondence between vertices of the

two graphs that preserves the adjacency relationship.)

Trang 30

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Graph definitions

Terminology

Special Simple Graphs

Representing Graphs and Graph Isomorphism

Trang 31

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Graph definitions

Terminology

Special Simple Graphs

Representing Graphs and Graph Isomorphism

Trang 32

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Graph definitions

Terminology

Special Simple Graphs

Representing Graphs and Graph Isomorphism

G1

C

DE

F

G2

Trang 33

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Graph definitions

Terminology

Special Simple Graphs

Representing Graphs and Graph Isomorphism

G2

Trang 34

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Graph definitions

Terminology

Special Simple Graphs

Representing Graphs and Graph Isomorphism

Trang 35

Huynh Tuong Nguyen, Tran Vinh Tan

Contents Graph definitions

Terminology

Special Simple Graphs

Representing Graphs and Graph Isomorphism

Determine whether the graphs without loops with the incidence

matrices are isomorphic

• Extend the definition of isomorphism of simple graphs to

undirected graphs containing loops and multiple edges

• Define isomorphism of directed graphs

Ngày đăng: 02/04/2023, 06:12