Graph
•	Trees are special cases of graphs. Binary trees are special types of trees.
•	Graph theory is covered in greater detail in MAT305.
•	Basic definitions from chapter 12.
•	Graph is a pair (V,E). V are set of vertices. E is a set of edges, e, where e = (v1, v2) v1 and v2 are in V.
•	directed edges and undirected edges
•	if (v1,v2) is a directed edge then there is an edge from v1 to v2, but not necessarily an edge from v2 to v1.
•	In addition to specifying that there is an edge from v1 to v2 we can also associate a weight with the edge.
•	A directed graph with weights associated with each edge is called network.
•	Let us develop Network ADT.
class Network
{
	public:
	Network(int n);
	~Network();
	bool Exist(int j, int k);
	double Weight(int j, int k);
	int Edges();
	int Vertices();
	void Add(int j, int k, double w);
	void Delete(int j, int k);
	int InDegree(int j);
	int OutDegree(int k);
};
•	How can we implement a graph?
•	Adjacency matrix
•	Adjacency list
•	If there is an edge from j to k, then k is adjacent to j.
•	Adjacency matrix will store a pair in location (j,k) of the type (bool x,double w). if (j,k) is an edge x is true and w gives us the weight. if x is false, w has undefined value.
•	Adjacency list for vertex j, is a list of vertices adjacent to the vertex j. There is a list for every vertex.
•	See the board for examples.