notes20b

Forexample hasedge 12 withweight6so 01 6 1 0

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 0 1 0. 1 if and only if has edge , , 0 otherwise. For example, has edge 1,2 but not 1,4 , From ∗ , we have: 1 2 3 4 5 6 123456 010010 101010 010100 001011 110100 000100 We can add edge weights by replacing the 1's with the appropriate edge weight. For example, has edge 1,2 with weight 6, so 01 6, 1 0 6. Our new adjacency matrix is: 123456 10 6 0 0 2 0 26 0 4 0 5 0 30 4 0 7 0 0 40 0 7 0 1 3 52 5 0 1 0 0 60 0 0 3 0 0 Complexity Comparision Only space complexity was covered in class. Edge List Adjacency List Adjacency...
View Full Document

This note was uploaded on 02/04/2014 for the course CS 234 taught by Professor Baranoski during the Spring '09 term at Waterloo.

Ask a homework question - tutors are online