public Graph(String[] s, int[][] m){
		int n = s.length;
		
		if(m.length != n || m[0].length != n){
			System.out.println("Dimension does not match, exit!");
			System.exit(0);
		}
			
		for(int i=0;i<s.length;i++){
			vertexList.add(new Vertex(s[i]));
		}
		for(int i=0;i<n;i++){
			for(int j=0;j<n;j++){
				if(m[i][j] == 1){
					Vertex u = vertexList.get(i);
					Vertex v = vertexList.get(j);
					u.addEdge(v);
				}
			}
		}
	}