public DAGraph getStronglyConnectedComponent() {
        DAGraph cc = new DAGraph();
        // first depth first search
        DGraph tmp = new DGraph(this);
        tmp.transitiveClosure();
        ArrayList<Node> last = tmp.depthFirstSearch()[1];
        // transposition of the graph
        DGraph transposedGraph = new DGraph(this);
        transposedGraph.transpose();
        // sort nodes according to the reverse last sort
        ArrayList<Node> sort = new ArrayList();
        Object [] array = last.toArray();
        for (int i = array.length - 1; i >= 0; i--) {
            sort.add((Node) array[i]);
        }
        // second depth first search according to sort
        TreeSet<Node> visited = new TreeSet();
        for (Node n : sort) {
            if (!visited.contains(n)) {
                last = transposedGraph.depthFirstSearch(n, visited, sort)[1];
                visited.addAll(last);
                TreeSet sCC = new TreeSet(last);
                // a strongly connected component is generated
                cc.addNode(new Node(sCC));    // addition of
            }
        }
        // edges between strongly connected component
        for (Node ccFrom : cc.getNodes()) {
            for (Node ccTo : cc.getNodes()) {
                for (Node from : (TreeSet<Node>) ccFrom.getContent()) {
                    for (Node to : ((TreeSet<Node>) ccTo.getContent())) {
                        if (tmp.getSuccessorNodes(from).contains(to)) {
                            cc.addEdge(ccFrom, ccTo);
                        }
                    }
                }
            }
        }
        cc.reflexiveReduction();
        return cc;
    }