The Isomorphic Version of Brualdi ’ s and Sanderson ’ s Nestedness

The discrepancy BR for an m × n 0, 1-matrix from Brualdi and Sanderson in 1998 is defined as the minimum number of 1 s that need to be shifted in each row to the left to achieve its Ferrers matrix, i.e., each row consists of consecutive 1 s followed by consecutive 0 s. For ecological bipartite networks, BR describes a nested set of relationships. Since two different labelled networks can be isomorphic, but possess different discrepancies due to different adjacency matrices, we define a metric determining the minimum discrepancy in an isomorphic class. We give a reduction to k ≤ n minimum weighted perfect matching problems. We show on 289 ecological matrices (given as a benchmark by Atmar and Patterson in 1995) that classical discrepancy can underestimate the nestedness by up to 30%.


Introduction
In applied fields like ecology, a 0, 1-matrix M often represents the presence or absence of certain relationships between species or objects, for example, which bee species pollinates which plants or the occurrence and absence of species on several islands.M is often called a contingency table.Such a matrix M can represent a bipartite graph (A bipartite graph G = (U, V, E) consists of two disjoint vertex sets U and V such that all edges are of the form {u, v}, where u ∈ U and v ∈ V).Connections of bees and plants are given by edges.Matrix M is then called a bi-adjacency matrix.(For a bipartite graph G = (U, V, E) with m := |U| and n := |V|, we construct its m × n bi-adjacency matrix M as follows: rows 1, . . ., m represent vertices u 1 , . . ., u m in U, and columns 1, . . ., n correspond to vertices v 1 , . . ., v n in V.If edge {u i , v j } ∈ E, then we set M i,j = 1; otherwise, we have M i,j = 0.) Ecologists call a matrix nested if we find for every row pair i, j in M the following condition; if i has equal or a smaller number of 1 s than j then M i,k = 1 if and only if M j,k = 1.Consider in Figure 1 the nested matrix N that represents the relationships between bee and plant species, and their corresponding bipartite graph.
A bipartite graph and its bi-adjacency matrix N. Matrix N is nested because each bee pollinates the same plants as all bees which pollinate more or an equal number of plants.
The term nestedness has already been introduced in 1937 by Hultén [1].A comprehensive history, discussion, and a definition of nestedness is given by Ulrich et al. [2].They describe nestedness as follows: "In a nested pattern, the species composition of small assemblages is a nested subset of the species composition of large assemblages".Interpreting nestedness regarding biological properties in networks is quite interesting.In matrix N of Figure 1 bees b, c, and d pollinate less plants than bee a.However, it does not happen that these bees pollinate other plants than bee a.In a nested matrix, we find, for an arbitrary pair of bee species, that the bee species with less than or an equal number of pollinated plants always pollinates a subset of the plant species that is pollinated from the other one.Hence, it cannot happen that a specialized bee pollinates other plants than a bee which pollinates more plant species.An opposite scenario is that all bee pairs pollinate pairwise different plants like in matrix M of Example 1. Imagine the extinction of a specialized bee in a nested matrix.Since this bee only pollinates plants, which are also pollinated from more generalized bees (bees which pollinate more plants), the pollination for all plants is still preserved.Even the extinction of a generalized bee would preserve the pollination of plants that are still pollinated by specialized bees.In contrast, the extinction of bee a in matrix M of Example 1 would lead to the extinction of plants A and D because no other bee can provide this service for these plants.Real data matrices are mostly not nested (which can be seen in our experimental Section 3).However, it seems that understanding "how much" ecological matrices are nested is important due to the fact that nestedness has been suggested as key to the stability of complex ecological systems.More information about stability and nestedness can be found, for example, in the following articles [3][4][5][6].
Notice that it is always possible to exchange columns and rows in a given matrix such that one finds non-increasing column and row sums.This indeed results in a different matrix.Anyway, it contains exactly the same relationships as before, and let us consider Example 2.
Example 2. Exchanging columns 2 and 3 in matrix N of Figure 1 , which does not fulfill the property of non-increasing column sums.Moreover, in this matrix, it is more difficult to recognize nestedness because rows 2, 3 and 4 do not consist of consecutive 1 s followed by consecutive 0 s.However, if columns and rows are ordered in regards to non-increasing row and column sums, it is easy to decide whether a given matrix is nested or not.We give a mathematical definition for nestedness.

Definition 1 (nestedness).
Let M be an m × n 0, 1-matrix where the columns 1, . . ., n and rows 1, . . ., m are sorted such that we find for the column sums c 1 ≥ c 2 ≥ • • • ≥ c n , and for the row sums s Then, matrix M is called nested if and only if each of the m rows start with consecutive 1 s followed by consecutive 0 s.
In graph theory, a nested matrix is usually referred to as Ferrers matrix [7].We will use equivalently the two terms.Moreover, a whole theory around Ferrers matrices exists, and it is worth reconsidering theoretical insights regarding the nestedness metrics.Let M be an m × n 0, 1-matrix with non-increasing row sums (r 1 , . . ., r m ) and non-increasing column sums (c 1 , . . ., c n ).The corresponding Ferrers matrix F is the matrix where each row i of F starts with r i 1 s followed by n − r i 0 s.It can be achieved in several shifts.A shift is the movement of a 1 in a row from a right to a left column with entry 0, i.e., it is an exchange of entries M i,j = 1 and M i,j = 0 for j > j leading to the matrix M with M i,j = 0, M i,j = 1 and M k, = M k, for all index pairs of M with (k, ) = (i, j) or (k, ) = (i, j ).The corresponding Ferrers matrix of matrix M in Example 1 can be seen in Example 3. It can be achieved by shifting 1 s to the left.Matrix F has the same row sums like M but different column sums.
Example 3 shows that Ferrers matrix F has the same row sums as M but different column sums.They can be calculated in counting for each row i in M the number of rows which have at least row sum i.
Remark 1.Let M be an m × n 0, 1-matrix M where the columns 1, . . ., n and rows 1, . . ., m are sorted such that we find for the column sums c 1 ≥ c 2 ≥ • • • ≥ c n , and for the row sums s Furthermore, let F be its corresponding Ferrers matrix.Then, Matrix F also has row sums (r 1 , . . ., r n ) but different column sums, i.e., (c 1 , . . ., c n ), where c i = |{j | j is row in M with r j ≥ i}|.
Remark 1 gives row and column sums for a corresponding Ferrers matrix F of M. The vector (c 1 , . . ., c n ) of column sums is also known as conjugate vector of (r 1 , . . ., r n ).Furthermore, it is a classical result that there is exactly one matrix with these column and row sums [8] (Section 2).Remark 2. The corresponding Ferrers matrix F of a matrix M is unique.
Ferrers matrices together with majorisation theory are classical concepts for deciding the question: whether a matrix M (or its bipartite graph) exists with given row and column sums.When matrix M is interpreted as the bi-adjacency matrix, then the corresponding graph of matrix F (considered now as bi-adjacency matrix) is then a threshold graph.For an overview about these problems, we recommend Brualdi's book [9] or Mahadev's and Peled's book [10].
In most real world data, a matrix M is not nested.Hence, the natural question arises of "how far the ecological matrix is from being nested".Brualdi and Sanderson answered this question with the metrics of discrepancy disc(M) [11].(In ecology, it is common to use the notion BR instead of disc [2]).It is based on the fact that every matrix M has a unique Ferrers matrix F that can be achieved by shifting 1 s in each row from larger to smaller column indices with entry 0 (see Remark 2).The discrepancy of a given matrix M is the minimum number of shifts of 1 s to the left required to achieve its Ferrers matrix.A value of 0 represents a nested matrix.This means that the the larger the discrepancy is (the more shifts are needed to yield the Ferrers matrix), the less a matrix is nested.Hence, the discrepancy metrics measures the strength to be non-nested.Consider matrix M in Example 4 and its unique Ferrers matrix F. In the first row, it is possible to shift the 1 in the third column to the second column, and the 1 of the fourth column to the third one.However, one only needs a single shift, i.e., moving the 1 of the fourth column to the second one.Following this approach for each row, we find disc(M) = 4.The discrepancy can be easily calculated.However, there is a conceptual problem when applied to an ecological data set.Exchanging two different columns i and i in M, holding the same column sums, leads to another matrix M with M = M .The values of the discrepancy for M and M can be different.However, both bi-adjacency matrices represent exactly the same relationships between bees and plants.Moreover, these bi-adjacency matrices correspond to two different labelled bipartite graphs.(A graph is labelled if all vertices in vertex set V are indexed by a unique number, i.e., V consists of vertices v : 1, . . ., v n where n := |V|.)Their structure, however, is exactly the same.Formally, those graphs are called isomorphic.(Two labelled graphs G = (V, E) and G = (V, E ) are called isomorphic if there exists a permutation σ : V → V of vertex labels such that edge {v In matrix M , we only need to shift three 1 s to achieve F leading to disc(M ) = 3.
For ecological purposes, these labels are not necessary.They are only assigned to columns and rows due to the mathematical denotation of columns and rows.The value of the discrepancy is dependent on a "random" order of bees and pollinators in a data set, and its resulting order of columns and rows in its bi-adjacency matrix.
We propose an extended metric based on the discrepancy to repair this problem.We define for a matrix M set M, which contains all matrices that can be achieved by permuting in M columns and rows with identical sums.(Notice, if we consider all matrices in M as bi-adjacency matrices, then the corresponding set of bipartite graphs is isomorphic.Consider a bipartite graph G = (U, V, E) in this set.The definition of isomorphic graphs allows only the permutation of vertex labels with the same vertex degree in U or V.This corresponds to the permutation of columns and rows in the corresponding bi-adjacency matrix with the same sums.)However, changing the row order in M would not change the discrepancy of M because the number of minimal shifts in each row stays the same.Finding an optimal labelling for a given bipartite graph G, such that its bi-adjacency matrix has a minimum discrepancy under all bi-adjacency matrices of isomorphic graphs of G, can be done by only permuting the columns of its bi-adjacency matrix.We define the isomorphic discrepancy of M as the minimum number of shifts under all matrices in M to achieve F. In other words, the isomorphic discrepancy finds an optimal labelling for a bipartite graph regarding a minimum number of shifts in its bi-adjacency matrix to achieve its nested matrix F. In Example 4, the discrepancy of M would be overestimated or the nestedness be underestimated, respectively.
We show that the isomorphic discrepancy for a matrix M can be calculated in transforming our problem into less than n minimum perfect weighted matching problems in a bipartite graph.(Given a bipartite graph, G = (U, V, E) with |U| = |V|, and weight function w : E → R. The perfect matching problem asks for a subset M ⊂ E of edges such that each vertex of G is in exactly one edge of M. The minimum perfect weighted matching problem asks for a perfect matching M minimizing w(M) = ∑ m i ∈M w(m i ).)More clearly, we construct for each fixed column sum s a bipartite graph G s separately.Each edge {u i , v j } in a minimum perfect weighted matching of G s tells us that column i in matrix M needs to be moved on position j.In the resulting matrix, all columns with sum s are reordered without violating the non-increasing column sums property.We repeat this approach whenever there exist at least two columns with the same column sum.The resulting matrix is a matrix in I M with a minimum discrepancy.One of the most important books about matching theory is from Lovász and Plummer [12].One suitable algorithm for our scenario is from Gabow [13], which achieves an O(n 3 ) asymptotic running time, if we follow our approach.
Please observe that there exist other approaches and assumptions of what a nested matrix N for M has to look like.One approach is to find an M ∈ M such that a minimal number of 0 s can be replaced by 1 s to become nested.This problem is known as the minimal chain completion problem and was shown to be NP-complete in 1981 by Yannakakis [14].(It is an open problem whether there is an algorithm to find a solution in polynomial asymptotic running time for NP-complete problems.For more information consider the classical book of Garey and Johnson [15].)The opposite problem is to delete a minimal number of 0s in M ∈ M to achieve a nested matrix that is also NP-complete (exchange the rules of 1 s and 0 s to see this).An approximation algorithm was given in the Phd-thesis of Juntilla in 2011 [16].There are different definitions of nestedness in the ecological community, and several procedures to compute it.For an overview, see the nestedness guide [2] which also includes the discrepancy of Brualdi and Sanderson (there called BR).In the next section, we give a formal definition of isomorphic discrepancy, and show how it can be calculated in asymptotic running time O(n 3 ).

The Discrepancy Problem for Isomorphic Matrices
Let M be an m × n bi-adjacency matrix with non-increasing row sums (r 1 , . . ., r m ), and non-increasing column sums (c 1 , . . ., c n ), and G the corresponding bipartite graph.Furthermore, let G be the set of all isomorphic graphs of G.Then, all bi-adjacency matrices corresponding to a graph G ∈ G can be achieved by permuting columns and rows with equal sums in M. We denote the set of these matrices by M. The discrepancy of M given by Brualdi and Sanderson [17] is the minimum number of shifts to achieve the corresponding Ferrers matrix F as described in the last section.We denote the discrepancy of M by disc(M).We now give the definition of the isomorphic discrepancy Id(M) of M, which is defined by In other words, we try to find a matrix in M with minimal discrepancy.We also want to mention that this new metric should be invariant against the transposition of M. This can be achieved by transposing M to its transposed matrix M t and determining Id(M t ).The general isomorphic discrepancy of M is then the minimum value (or the mean value) of Id(M) and Id(M t ).We here focus on Id(M) because the calculation of Id(M t ) can be done analogously.
A simple approach is to permute all columns and rows with equal sums, and to choose a permutation of M that yields the minimum discrepancy.This can lead to the determination of exponentially many possible permutations.Please observe that it is sufficient for our problem to permute columns in M and keep the rows fixed.The reason is that exchanging the order of rows with the same sums leads to exactly the same discrepancy because the corresponding rows of the Ferrers matrix are identical.Consider our Example 4. It can be seen that each permutation of the first three rows in M or M lead to the same kind of shifts, and so to the same discrepancy as before.Following this approach, we will not necessarily generate all matrices in M, but the subset I M that consists of all matrices that were yielded by a permutation of columns in M with the same sum.Hence, matrices in I M possess the whole range of possible discrepancies that occur for matrices in M. Hence, it is sufficient to permute columns for the calculation of Id(M).More formally, we find Consider all matrices with row sums (r 1 , . . ., r m ) and column sums (c 1 , . . ., c n ).Then, it follows that all of them possess the same unique Ferrers matrix F with column sums (c 1 , . . ., c n ).(Recall that the lists are non-increasing.)Brualdi and Shen showed [11] that there is always one matrix A with row sums (r 1 , . . ., r m ) and column sums (c 1 , . . ., c n ) that has minimum possible discrepancy disc(A) = ∑ n j=1 (c j − c j ) + , where (a) + := max{a, 0} for a ∈ R. Matrix A can be found by moving in F 1 s from columns j with c j − c j > 0, to columns i with c i − c i < 0. Consider Example 5.

Example 5. For matrix M
, we have disc(M) = 4, and corresponding Ferrers matrix shifting three 1 s of the second column in F to the fourth column.However, the minimum discrepancy under all isomorphic matrices of M is 4, i.e., Id(M) = 4.This is true because each permutation σ of the last three columns of M leads to a matrix M σ with disc(M σ ) = 4.A discrepancy of 3 cannot be achieved by a permutation of columns from M.
The set of all matrices with row sums (r 1 , . . ., r m ) and column sums (c 1 , . . ., c n ) can be partitioned in isomorphic matrix sets M i .Example 5 shows that not all sets possess a matrix A with minimum possible discrepancy.If this had been the case, we would already know the value Id(M) for each matrix.Unfortunately, it is not the case.
We want to develop a simple formula to calculate the discrepancy of a given matrix.We need this formula later to devise an approach for the isomorphic version.Notice that a shift in a matrix M will always be applied when F i,j = 1 and M i,j = 0. Since M and F have identical row sums, and due to the construction of F, there must always be an index j > j with F i,j = 0 and M i,j = 1.In matrices of our Examples 4 and 5, we marked these 0 s and 1 s.This means that the number of absences of 1 s in M, when they are present in F, correspond to the number of minimum shifts disc(M).We define the difference of the jth columns A j and A j of m × n 0, 1-matrices A and A by Back to our problem, we find (F j − M j ) ≥ c j − c j for all j.The reason is that a column F j has c j 1 s and a column M j has c j 1 s.This means that the minimum difference of both columns happens if all 1 s in M j also occur in F j .Then, (F j − M j ) = c j − c j .Consider in Example 4 the third columns of M, M and F. M has all 1 s of F, whereas M has only two of them.Hence, In cases where you find a 1 in M j , which does not occur in F j , this 1 needs to be shifted to a 'left' column j where F has a 1 and M a 0. A 1 from a 'right' column j in M has to be shifted to M j to achieve the c j 1 s in F. In Example 4, this is the case for M 6,3 .We put this connection in another formula for the discrepancy.Proposition 1.Let M be an m × n 0, 1-matrix with non-increasing row sums (r 1 , . . ., r m ) and non-increasing column sums (c 1 , . . ., c n ).Let F be the corresponding Ferrers matrix.Then, the minimum number of shifts disc(M) to achieve F from M can be calculated by disc(M) = ∑ n j=1 (F j − M j ).
Proof.The proof is by induction on the number n of columns.For one column, we have M = F and so disc(M) = 0 and (F 1 − M 1 ) = 0. We assume that disc(M) = ∑ k j=1 (F j − M j ) holds for all matrices with m rows and k ≤ n − 1 columns (induction hypothesis IH).Let us now consider a matrix an m × n matrix M. Notice that (F n − M n ) = 0 for each matrix M and its corresponding Ferrers matrix F due to the construction of F. In column n − 1 of M, we consider the set I of all indices i where F i,n−1 = 1 and M i,n−1 = 0. Due to the construction of a Ferrers matrix, and since F and M have equal row sums, we find for all i ∈ I that F i,n = 0 and M i,n = 1.We construct matrix B by exchanging, for all indices i ∈ I, all entries M i,n−1 = 0 to 1, and all corresponding entries M i,n = 1 to 0. Basically, we apply |I| shifts from the nth column to the (n − 1)th column.In matrix B, we only find shiftable 1 s in smaller columns than in column n due to our construction.We delete the last column of B and get the m × (n − 1) matrix B .We apply the induction hypothesis on B .Since (a) matrices B and B have exactly the same number of minimal shifts (because in the first (n − 1) columns they are completely identical, and B has in the nth column no shiftable 1 s due to our construction), and (b) M has |I| more shifts (in the nth column) than B, and (c) matrices M and B are identical in the first n − 2 columns, and M has in the n − 1th column |I| more shifts, we get We denote an element of I M by M σ where σ : {1, . . ., n} → {1, . . ., n} is a permutation of the columns of M that exchanges columns with same column sums.Recall (Equation ( 2)) that this approach covers all possible discrepancies that exist in set M. A permutation σ can be divided in the convolution of k permutations σ i if M possesses k different column sums, i.e., (c 1 , c 2 , . . ., c n ) = (x 1 , . . ., x 1 , x 2 , . . ., x 2 , . . ., x k , . . ., x k ).Each σ i : {1, . . ., n} → {1, . . ., n} permutes all columns with column sum x i independently, and keeps the indices of columns with different sums, i.e., σ = • k i=1 σ i .We denote the set of all possible permutations σ i by Σ i , and for all σ by Σ.For matrix M in Example 4, we get six different matrices in set I M .Each of them is built by a permutation σ = σ 1 • σ 2 where σ 1 is the identity permutation which keeps the first column on index 1, and σ 2 permutes the second, third and fourth columns of M. The same is true for M in Example 4. Notice that, I M ∩ I M = ∅.Let s i be the number of columns with column sum x i .We construct k different m × s i sub-matrices M i .Each of them consists of all columns in M with column sum x i .We denote the column indices j in M i by the same indices like in M, i.e., j ∈ {s The next Proposition states that calculating the minimum discrepancy of each matrix M i can be done separately.The sum of all minimum discrepancies for each M i is then the minimum discrepancy of M. Proposition 2. Let M be an m × n matrix M with non-increasing row sums (r 1 , . . ., r m ) and non-increasing column sums (c 1 , . . ., c n ) = (x 1 , . . ., x 1 , x 2 , . . ., x 2 , . . ., x k , . . ., x k ).Let F be the corresponding Ferrers matrix of M.Then, the isomorphic discrepancy of matrix M is Proof.Since the isomorphic discrepancy is the minimum discrepancy in the set of all matrices in I M (Equation ( 2)), and for each matrix B ∈ I M there exists a permutation σ = • k i=1 σ i with σ ∈ Σ and B = M σ , we get for the isomorphic discrepancy of M Id(M) Since each σ is the convolution of k permutations σ i that permute only the column indices with same sums (σ = • k i=1 σ i ), we can rewrite Together with Equation ( 4), and since σ permutes columns with each fixed sum x i independently, we get Proposition 2 states that we need to find for each sub-matrix M i in M with fixed column sums x i a column order (a permutation σ i ) that minimizes the following sum: We transform the calculation of Id(M) for each sub-matrix M i (i ∈ {1, . . ., k}) of M to the determination of minimum weighted perfect matching problem in a labelled weighted complete bipartite graph (A bipartite graph G = (U, V, E) is called complete if and only if each pair of vertices u, v with u ∈ U and v ∈ V is connected by an edge, i.e., {u, v} ∈ E. If we have a weight function w : E → R which assigns to every edge in G a weight, then G is called weighted G e., we consider the exactly same indices of columns in F as in sub-matrix M i .For simplicity we denote vertices u j by M i j , or, v j by F j , respectively.We assign each edge {M i j , F j } ∈ E i the weight w(M i j , F j ) := (F j − M i j ).Now, we calculate a minimum weighted perfect matching P i = {{M i 1 , F j 1 }, . . ., {M i s i , F j s i }} in each G i .Hence, P i minimizes Equation (5).Moreover, an edge {M i , F j } in P i tells us that we have to put column in M on position j .That is, P i calculates how to permute the columns in M i such that the discrepancy is minimal.Consider Example 6.Hence, we have to construct two complete bipartite graphs G We get for G 1 vertices M 1 ,M 2 , F 1 , F 2 , and for G 2 vertices M 3 , M 4 , M 5 , F 3 , F 4 , F 5 .The edge weights between a vertex M i j and F j are w(F j , M i j ) := (F j − M i j ).This leads in G 1 to a weight of 1 for all edges.Hence, every perfect matching P 1 in G 1 has weight w(P 1 ) = 2, and is minimal.The order of the columns in M 1 does not matter.On the contrary, in G 2 , we find the minimum perfect weighted matching P 2 = {{M 3 , F 4 }, {M 4 , F 3 }, {M 5 , F 5 }} of weight w(P 2 ) = 0. Notice that w(F 3 , M 5 ) = 1 and w(F 3 , M 3 ) = 1.All other weights in G 2 are 0. Hence, the perfect matching P * = {{M 3 , F 3 }, {M 3 , F 3 }, {M 5 , F 5 }} corresponds to the order of columns in M with weight w(P * ) = 1, which is not the minimum.We need to exchange columns 3 and 4 in M. We get matrix Notice that disc(M ) = 2 corresponds to the value w(P 1 ) + w(P 2 ) = 2. Theorem 1. Calculating the isomorphic distance Id(M) of an m × n 0, 1-matrix M needs O(n 3 ) asymptotic time.

Proof. Let
}} be a minimum weighted perfect matching in bipartite graph G i for each i ∈ {1, . . ., k}.Then, permutation σ i : {1, . . ., n} → {1, . . ., n} with σ i ( ) = j for all edges {M i , F j } ∈ P i , and σ i (j) = j for all j with c j = x i is a permutation of the columns in sub-matrix M i , which minimizes w(σ i ) in Equation ( 5).With Proposition 2, and because the perfect matching has minimum weight, we get for σ : Let us now assume that each permutation σ that minimizes w(σ 1 ), . . ., w(σ k ) corresponds in each graph G i to a perfect matching P i with {M j , F j } ∈ P i if σ i (j ) = j for F j ∈ V F i and M j ∈ U M i .This matching is by construction minimal.
Let s i be the number of columns with sum x i .Then, the computation of a minimum weighted perfect matching in G i is O(s 3 i ) (see, for example, [13]).Since we get a total asymptotic running time of O(n 3 ).
Please observe that under certain conditions the construction of several graphs G i can be avoided.This happens for example when the corresponding Ferrers columns are completely equal like in Example 6 in G 1 .Then, all edge weights in G i are also equal, and therefore, each perfect matching is a solution.

Discrepancy versus Isomorphic Discrepancy in Ecological Matrices
The discrepancy of Brualdi and Sanderson for a given a matrix M (the column and row sums are non-increasing) can range between the minimum and maximum discrepancy in I M .The current value depends on a "random order of data", and their corresponding order of columns and row in a matrix.To avoid this variance, we introduced the isomorphic metric Id(M) that corresponds to the minimum discrepancy in I M .We want to find out how much this problem really matters in real world matrices.The question is, if the discrepancy value for one single data set (corresponding to a bipartite graph), can change the general statement of how strongly a bipartite network is nested (how small is the discrepancy) completely, or, if the range of possible values is very small, and hence the "order of columns and rows" is negligible.Answering this question, we consider a benchmark data set in ecology of Atmar and Patterson [18].They offered the first software for several nestedness metrics, and tested it on 291 occurrence matrices representing the absence or presence of animals (mammals, insects, birds) on islands or areas in several regions of the world.These matrices range between dimension 12 (3 × 4-matrix), and dimension 11940 (20 × 597-matrix).A complete overview of the matrix dimensions is given in Figure 2. In addition, 289 bipartite matrices from them can still be downloaded [19].(The authors mention in their paper a data set consisting of 294 matrices.The data set we found contains only 291 of their matrices.Two of them (Artreeff.txtund Bajapo.txt)were not complete.)Each of the data text files contains, besides the occurrence matrix, a citation of the paper where the original data set comes from.The maximum discrepancy max B∈I M {disc(B)} can be calculated analogously to the determination of Id(M) with the difference, that we calculate maximum and not minimum weighted perfect matchings.In Figure 3a, one observes for all 289 matrices M, in Atmars and Pattersons benchmark, the values D(M).Furthermore, we want to see if we find a dependency between the number of 1 s in matrix M, and its difference value M. We observe that the discrepancy difference, i.e., the overestimation (underestimation) of the discrepancy (nestedness), can range between 0 and 220 for a matrix M. Most values lay between 0 and 70.However, it is difficult to decide how strong this overestimation really is in considering

Example 1 .
Matrix M = nested since each bee pollinates a different plant than every other bee.

Example 3 .
Matrix F = corresponding Ferrers matrix of matrix M in Example 1.

Figure 2 .
Figure 2. Dimensions of 289 occurence matrices in Atmar and Patterson's benchmark data.

3. 1 .
Experiment: Possible Range of Discrepancy in One Isomorphic ClassA matrix M in I M can possess discrepancy values between Id(M) (recall that the isomorphic discrepancy is the minimum discrepancy in I M ), and maximum discrepancy max B∈I M {disc(B)} in I M .A matrix M with a 'random order' of the rows and columns (without violating the non-increasing order of row and column sums) can have a discrepancy in this range.We determine the discrepancy differenceD(M) = max B∈I M {disc(B)} − Id(M),which shows the possible range of the discrepancy value in I M .Hence, the order of the columns and rows in a matrix can change the discrepancy (nestedness) by the value of the discrepancy difference.
bipartite graphs, i.e., both graphs look the same but plants C and D have in M column indices 3 and 4, whereas in matrix M plant C and D are labelled with 4 and 3.Moreover, in M, we need to shift the four bold 1 s to achieve its corresponding Ferrers matrix F