Graph Representation
 

* directed, undirected
* weighted
* tree  connected + No cycle
         1 path u~~v

 

Adjacency Matrix :  

  A B C D E F G H I J K L M
A 1 1 1 0 0 1 1 0 0 0 0 0 0
B 1 1 0 0 0 0 0 0 0 0 0 0 0
C 1 0 1 0 0 0 0 0 0 0 0 0 0
D 0 0 0 1 1 1 0 0 0 0 0 0 0
E 0 0 0 1 1 1 0 0 0 0 0 0 0
F 1 0 0 1 1 1 0 0 0 0 0 0 0
G 1 0 0 0 1 0 1 0 0 0 0 0 0
H 0 0 0 0 0 0 0 1 1 0 0 0 0 
I 0 0 0 0 0 0 0 1 1 0 0 0 0 
J 0 0 0 0 0 0 0 0 0 1 1 1 1
K 0 0 0 0 0 0 0 0 0 1 1 0 0 
L 0 0 0 0 0 0 0 0 0 1 0 1 1
M 0 0 0 0 0 0 0 0 0 1 0 1 1

Adjacency List : 

A: F C B G
B: A
C: A
D: F E
E: G F D
F: A E D
G: E A
H: I
I: H
J: K L M
K: J
L: J M
M: J L