Site Search:

Digraph.java with bfs bipartite detection visual (with Dot language)



%3 0 0 1 1 0->1 3 3 0->3 2 2 1->2 4 4 1->4 2->3 5 5 2->5 3->4 6 6 3->6 4->5 7 7 4->7 5->6 8 8 5->8 6->7 9 9 6->9 15 15 16 16 15->16 17 17 16->17 19 19 19->19


Java output:





strict digraph {
0[color=red];
1[color=blue];
2[color=red];
3[color=blue];
4[color=red];
5[color=blue];
6[color=red];
7[color=blue];
8[color=red];
9[color=blue];
15[color=blue];
16[color=red];
17[color=blue];
19[color=red];
16->17;
0->1;
0->3;
1->2;
1->4;
2->3;
2->5;
19->19;
3->4;
3->6;
4->5;
4->7;
5->6;
5->8;
6->7;
6->9;
15->16;
}
number of points: 14
number of edges: 17
is bipartite:true

No comments:

Post a Comment