I just ran that example through the code I posted (Note: My code uses letters for columns not rows as you have). The groupings produced:

23415 0000E 000BB 23415 AAAAA CCC0C DDD0D

gives rows 1 & 5 (your A & E), as a group which when subtracted from the remainer leaves rows 2, 3 & 4 (your {BCD}) as a group which is what you are after?

Full output from the unchanged program (except for inserting the new data (first line below)):

# my @grid = ( "AB0001","A0CD02","A0CD03","A0CD04","ABCDE5" ); c:\test>600418-2.pl This input AB0001 A0CD02 A0CD03 A0CD04 ABCDE5 sorted A0CD02 A0CD03 A0CD04 AB0001 ABCDE5 Tranformed looks like this AAAAA 000BB CCC0C DDD0D 0000E 23415 sorted 0000E 000BB 23415 AAAAA CCC0C DDD0D These are the sets where the letters denote the columns of the origina +l matrix (0 mean column not used in this set). And the numbers above, the rows they came from. 23415 0000E 000BB 23415 AAAAA CCC0C DDD0D

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."

In reply to Re^3: decomposing binary matrices by BrowserUk
in thread decomposing binary matrices by hv

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.