Size: 507
Comment:
|
← Revision 3 as of 2004-10-19 22:24:03 ⇥
Size: 475
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 6: | Line 6: |
1 → 2 → 4/ 2 → 5/ 3 → 6 → 5/ 4 → 2/ 5 → 4/ 6 → 6/ |
1 --> 2 --> 4/ 2 --> 5/ 3 --> 6 --> 5/ 4 --> 2/ 5 --> 4/ 6 --> 6/ |
Graph encoding schemes:
Adjacency list: Below we represent a graph of 6 nodes with an adjacency list.
1 --> 2 --> 4/ 2 --> 5/ 3 --> 6 --> 5/ 4 --> 2/ 5 --> 4/ 6 --> 6/
Adjacency matrix: Below we reperesent the same graph of 6 nodes with an adjacency matrix.
1 2 3 4 5 6 1 0 1 0 1 0 0 2 0 0 0 0 1 0 3 0 0 0 0 1 1 4 0 1 0 0 0 0 5 0 0 0 1 0 0 6 0 0 0 0 0 1
- Obviously the list saves space and the matrix saves access time.