Data Structures and Algorithms 7 - edX
Ming Zhang" Data Structures and Algorithms "
Data Structures and Algorithms7
Instructor: Ming Zhang Textbook Authors: Ming Zhang, Tengjiao Wang and Haiyan Zhao Higher Education Press, 2008.6 (the "Eleventh Five-Year" national planning textbook)
Chapter 7
Graphs
Chapter 7. Graphs
? 7.1 Definition and terms of graphs ? 7.2 Abstract data type of graphs ? 7.3 Storage structure of graphss ? 7.4 Traversals of graphs ? 7.5 The shortest paths ? 7.6 Minimum-cost spanning trees
2
Ming Zhang "Data Structures and Algorithms"
Chapter 7
Graphs
7.3 Storage structure of graphs
Adjacency matrix
? An Adjacency matrix of a graph represents the adjacency relation of vertices, an element of which indicates whether an edge exists
? Let G = be a graph with n vertices, its adjacency matrix it is a two-dimensional array A[n, n], defined as:
A[i, j] {1,if (vi ,v j )E orvi ,v j E 0,if (vi ,v j )E orvi ,v j E
? For a graph with n vertices, its adjacency matrix consumes O(n2) storage space, no matter how many edges the graph has
3
Ming Zhang "Data Structures and Algorithms"
Chapter 7
Graphs
7.3 Storage structure of graphs
Adjacency matrixes of directed graphs
0 1 0 0 0
1
0
0
0
1
V0
V1
A = 0 1 0 1 0
V2
1
0
0
0
0
V3
V4
0 0 0 1 0
4
Ming Zhang "Data Structures and Algorithms"
Chapter 7
Graphs
7.3 Storage structure of graphs
Adjacency matrixes of undirected graphs
0 3 0 15
A=
3 0
0 4
4 0
0 6
15
0
6
0
V0
3
V1
15
4
V2 6 V3
5
Ming Zhang "Data Structures and Algorithms"
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- part 2 graph algorithms and data structures tim roughgarden
- gasarch
- ods python open data structures
- chapter 8 data structure arrays
- data structures and algorithms 7 edx
- python data structures cheat sheet intellipaat
- raphics and visualization
- ods python screen open data structures
- a first course on data structures github pages
- data organization trees and graphs
Related searches
- american structures and design
- brain structures and their functions
- brain structures and functions worksheet
- subcortical structures and their functions
- us government structures and institutions
- academic essay structures and format
- structures and functions of the brain
- cerebral structures and function
- market structures and their characteristics
- body structures and functions answers
- supply chain structures and relationships
- circulatory system structures and functions