If I am having a set of adjacent matrices network data, how can I check if this data come a bipartite network?
Probably by using Matlab?
The data set is huge, can I check it by using the plot of degree distribution? Or the "$\log\log$" plot.
Thanks for helping.
The most straightforward way to check if $G$ is bipartite is to try to $2$-color it: pick a vertex to be in one part (or one color), which tells you what all its neighbors must do, which tells you about all of their neighbors, and so on. Eventually, you either get a conflict or color the graph.
(Or at least color a connected component. If your coloring stops advancing, you pick a vertex in a different connected component and keep going.)
We can do this by breadth-first search. Color a vertex with the first color and add it to the queue. Then repeatedly pick a vertex $v$ off the queue and do the following:
If we ever see a conflict, the graph is not bipartite. If the queue is empty but not all vertices have been colored, the graph is disconnected and we start over from an arbitrary uncolored vertex. If all vertices have been colored, the graph is bipartite.
Or, if you like, you can think of this as a matrix computation: if $A$ is the adjacency matrix, let $x^{(0)}$ be the vector $(1,0,0,\dots,0)$ and iterate the following procedure: let $y^{(i)} = Ax^{(i)}$ and compute $x^{(i+1)}$ from $y^{(i)}$ by replacing all of its nonzero entries with $1$. Then:
Eigenvalue computations, or things like checking for odd cycles by looking for nonzero diagonal entries in $A^3, A^5, A^7, \dots$, are going to be much slower. Also, you can't check for bipartiteness from the degree sequence, because the cube graph (which is bipartite) has the same degree sequence as two disjoint copies of $K_4$ (which are not bipartite).