public void WelshPowell(){
        
        Graph<Integer> graph = new Graph<Integer>(false);
        graph.addEdge(1, 2);
        graph.addEdge(2, 3);
        graph.addEdge(1, 4);
        graph.addEdge(4, 6);
        graph.addEdge(1, 7);
        graph.addEdge(1, 8);
        graph.addEdge(2, 9);
        graph.addEdge(1, 3);
        graph.addEdge(3, 4);
        graph.addEdge(2,4);
        graph.addEdge(3, 7);
        graph.addEdge(2, 7);

        ComparatorVertex c = new ComparatorVertex();
        Set<Vertex<Integer>> sortedSet = new TreeSet<Vertex<Integer>>(c);
        for(Vertex<Integer> v : graph.getAllVertex()){
            sortedSet.add(v);
        }
        
        Map<Long,String> assignedColor = new HashMap<Long,String>();
        Map<Long,String> finalAssignedColor = new HashMap<Long,String>();
        
        Map<String,Boolean> colorsUsed = new TreeMap<String,Boolean>();
        colorsUsed.put("Green", false);
        colorsUsed.put("Blue", false);
        colorsUsed.put("Red", false);
        colorsUsed.put("Yellow", false);
        colorsUsed.put("Orange",false);

        Set<Vertex<Integer>> removeSet = new HashSet<Vertex<Integer>>();
        while(sortedSet.size() != removeSet.size()){
            String color = null ;
            
            for(Vertex<Integer> v : sortedSet){
                if(removeSet.contains(v)){
                    continue;
                }
                boolean allUncolored = allAdjacentUnColored(v.getAdjacentVertexes(),assignedColor);
                if(allUncolored){
                    color = getUnusedColor(colorsUsed);
                    assignedColor.put(v.getId(), color);
                    removeSet.add(v);
                    finalAssignedColor.put(v.getId(), color);
                }
            }
            colorsUsed.remove(color);
            assignedColor.clear();
        }
        
        System.out.println(finalAssignedColor);
    }
http://www.geeksforgeeks.org/graph-coloring-set-2-greedy-algorithm/
src/com/interview/graph/GraphColoring.java