representing课程.pptVIP

  • 2
  • 0
  • 约4.05千字
  • 约 17页
  • 2016-12-08 发布于江苏
  • 举报
Yang Juan jyang@tseg.org College of Computer Science Technology Beijing University of Posts Telecommunications College of Computer Science Technology, BUPT -- ? Copyright Yang Juan §9.3: Graph Representations Isomorphism Graph representations: Adjacency lists. Adjacency matrices. Incidence matrices. Graph isomorphism: Two graphs are isomorphic iff they are identical except for their node names. College of Computer Science Technology, BUPT -- ? Copyright Yang Juan Adjacency Lists A table with 1 row per vertex, listing its adjacent vertices. a b d c f e College of Computer Science Technology, BUPT -- ? Copyright Yang Juan Directed Adjacency Lists 1 row per node, listing the terminal nodes of each edge incident from that node. P612 Figure 2 College of Computer Science Technology, BUPT -- ? Copyright Yang Juan Adjacency Matrices A way to represent simple graphs possibly with self-loops. Matrix A=[aij], where aij is 1 if {vi, vj} is an edge of G, and is 0 otherwise. Can extend to pseudographs by letting each matrix elements be the number of links (possibly 1) between the nodes. College of Computer Science Technology, BUPT -- ? Copyright Yang Juan Note An adjacency matrix of a graph is based on the ordering chosen for the vertices. The adjacency matrix of a simple graph is symmetric. aii=0 Sparse matrix( 稀疏矩阵) College of Computer Science Technology, BUPT -- ? Copyright Yang Juan Example3,4,5 College of Computer Science Technology, BUPT -- ? Copyright Yang Juan Adjacency matrix for a directed graph Adjacency matrix for a directed multigraph College of Computer Science Technology, BUPT -- ? Copyright Yang Juan Incidence matrices Let G=(V,E) be an undirected graph. Suppose that v1,v2,…,vn are the vertices and e1,e2,…,em are the edges of G. Then the incidence matrix with respect to this ordering of V and E is the n*m matrix M=[mij], where College of Computer Science Technology, BUPT -- ? Copyright Yang Juan Example 6,7 P614 Multiple

文档评论(0)

1亿VIP精品文档

相关文档