A graph is represented generally in a physical data structure
The graph is composed of two set.
| Node |
|---|
| a |
| b |
| c |
| Node | adjacent to Node |
|---|---|
| a | b |
| a | c |
| b | a |
| b | c |
| c | a |
| c | b |
The graph is composed of set.
| Node | |
|---|---|
| a | |
| b | |
| c | |
| Node | adjacent to Nodes |
|---|---|
| a | b,c |
| b | a,c |
| c | a,b |
Adjacency matrix is a matrix of adjacent vertices where the coordinates (x,y) may be stored in a set
| a | b | c | |
|---|---|---|---|
| a | 0 | 1 | 1 |
| b | 1 | 0 | 1 |
| c | 1 | 1 | 1 |