Consider the following statements
Directed Graph-1:
a1->p1->b1
b1->p2->c1
b1->p3->c2
b1->p4->c3
Directed Graph-2:
a1->p4->c2
a1->p1->b1
a2->p2->b1
b1->p3->c1
a2->p5->b2
Here 'a', 'b' and 'c' are vertices and all 'p' are edges. The direction is from node a to node b/c. When a graph is drawn, it looks similar to the graph in slide-8 of http://www.slideshare.net/fvanvollenhoven/network-analysis-with-hadoop-and-neo4j
In Graph-1 there is a cluster starting from node b1 and in Graph-2 there are two clusters connected at b1. By cluster I mean, all the outgoing edges connected to one vertex and also the vertices involved in that group (of out-going edges). Is there a quick and easy way to find these clusters using any of the existing java based graph APIs? I also would like to find the edges connecting to the clusters (like a1 p1 b1 in Graph-1 and b1 p3 c1 in Graph-2). Am I missing/misusing some graph terminology here? I looked at Good Java graph algorithm library? but didn't find exactly what I am looking for.
The graphs are very small, about 20 vertices and 10 edges.
Note: added Neo4j tag since I felt it is a good candidate for this. Neo4j specific question: Is there a way to get all out going edges whose count is greater than 1? (Exploring cypher now).
Thanks in advance.