Skip to main content
. Author manuscript; available in PMC: 2012 Jun 1.
Published in final edited form as: Parallel Comput. 2011 June-July;37(6-7):261–278. doi: 10.1016/j.parco.2011.04.002

Algorithm 1.

Nullspace Algorithm (sketch) [31].

Assume we have a stoichiometry matrix Nm×q that has full row rank m and in the form as given in Proposition 1, compressed if needed using the methods of Section 2.3. Further, let qirrev and qqirrev be the number of irreversible and reversible reactions, respectively. The Nullspace Algorithm may be briefly sketched as follows:
  1. Denote the initial right nullspace Kq× (qm) (Eq. (2)) of the stoichiometry matrix Nm×q as:
    K=(qm)(m)[R(1)qmR(2)]=[IR(2)] (7)

    where the upper matrix of K, denoted as R(1), is an identity matrix I(qm) × (qm).

  2. For k = (qm), …, (q − 1),

    1. Generate convex combinations of all possible pairs of columns in R so as to annihilate the (k + 1)th entry of the resulting column. Each combination is formed using a column ii whose (k + 1)th entry is positive combined with a column jj whose (k + 1)th entry is negative. Following the results from [25] we may perform the operation of bit-wise logical disjunction over the column parts belonging to matrix R(1), while performing the algebraic convex combination over column parts in matrix R(2).

    2. Eliminate duplicate columns among those generated from R(1) in the previous step.

    3. Apply the rank test as given in Proposition 2 to each candidate mode, discarding those that fail the test.

    4. Append matrix R column-wise with the newly computed elementary modes which were accepted by the rank test in the previous step.

    5. If the (k + 1)th reaction is irreversible, discard those old columns whose (k + 1)th entry is negative.

    In the next step, the (k + 1)th row (the top row of R(2)) is moved to become the bottom row of R(1). Following [25], R(1) can be kept only as a bit mask, so the (k + 1)th row is converted to a bit mask (a 1 bit stands for a non-zero value).

  3. When the computation is complete, matrix R(1) will be of dimension q × nems, where the nems is the total number of elementary flux mode columns, while R(2) will be empty. It is then necessary to recalculate the numerical values. This process has linear complexity in the number nems of elementary modes computed [25].