  Algorithms for finding arbitrary sets of Kochen-Specker (KS) qunits (n-level
systems) as well as all the remaining vectors in a space of an arbitrary
dimension are presented. The algorithms are based on linear MMP diagrams which
generate orthogonalities of KS qunits, on an algebraic definition of states on
the diagrams, and on nonlinear equations corresponding to MMP diagrams whose
solutions are either KS qunits or the remaining vectors of a chosen space
depending on whether the diagrams allow 0-1 states or not. The complexity of
the algorithms is polynomial. New results obtained with the help of the
algorithms are presented.
