LanX,
Not sure I get the problem

I really like the outfit analogy because I can't discuss the real data (work). Imagine you have a classroom of kids. Each kid is told that the next day they must all wear a hat, a shirt, a pair of pants, a belt and a pair of shoes. They may choose to wear a either a red, white or a blue hat. The choices for shirt are larger (red, white, blue, green, yellow and orange), etc.

The number of students will always be small in comparison to the number of distinct possible outfits. What you need to do is identify the two students who had the largest number of differences between them. In my example, the greatest distance is 5 (hat, shirt, pants, belt and shoes). It doesn't matter how many items are in a particular category - if they chose a different color hat then the distance is 1, if they also chose a different color belt the distance goes up to 2.

As I have said, I know that comparing all students against all other students is necessary in the worst case. I was hoping there would be a way to say I currently have found two students with at least 3 things different so I shouldn't consider students who have at least 2 things the same because they can't possibly exceed my current high water mark.

Cheers - L~R


In reply to Re^2: Help thinking about an alternate algorithm by Limbic~Region
in thread Help thinking about an alternate algorithm by Limbic~Region

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.