Steve, I don't know for sure whether this will help to solve your problem, but you may be interested to read about the algorithm devised by David Kendall for sorting 0-1 matrices, as described in
Incidence matrices, interval graphs and seriation in archeology. Pacific J. Math. Volume 28, Number 3 (1969), 565-570 which is available on Open Access at Project Euclid: http://projecteuclid.org/DPubS/Repository/1.0/Disseminate? view=body&id=pdf_1&handle=euclid.pjm/1102983306 [also = http://tinyurl.com/mw2oap ] On 22-Aug-09 19:38:47, Steve Lianoglou wrote: > On Sat, Aug 22, 2009 at 2:45 PM, Michael Kogan <michael.ko...@gmx.net> > wrote: > >>> >>> 1. Sort the rows after the row sums (greater sums first). >>> 2. Sort the columns after the first column (columns with ones in the >>> first row go left, columns with zeros go right). >>> 3. Save the left part (all columns with ones in the first row) and >>> the right part in separate matrices. >>> 4. Repeat steps 2 and 3 with both of the created matrices (now taking >>> the second row for sorting), repeat until all fragments consist of a >>> single column. >>> 5. Compose the columns to a sorted matrix. > >> If you want to go about this by implementing the algo you described, I >> think you'd be best suited via some divide-and-conquer/recursion >> route: > > Starting from step 2, that is. > > -steve > -- > Steve Lianoglou > Graduate Student: Computational Systems Biology >| Memorial Sloan-Kettering Cancer Center >| Weill Medical College of Cornell University > Contact Info: http://cbio.mskcc.org/~lianos/contact > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. -------------------------------------------------------------------- E-Mail: (Ted Harding) <ted.hard...@manchester.ac.uk> Fax-to-email: +44 (0)870 094 0861 Date: 22-Aug-09 Time: 22:24:49 ------------------------------ XFMail ------------------------------ ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.