The problem:
I have a relation R where
domain set is: dom R = {A,B,C}, and
range set is: ran R = {1,2,3}.
The relations (maplets) are:
{A>1,A>3,B>2,B>3,C>1,C>3}
The following sets would be performed, if we use at most once every element
from each side of the relationship, within each new set. (E.g. {A>2,B>1} is
ok but {A>2,A>3,C>3} is not ok because A and 3 is being twice in the set).
We have:
first {A>1,B>2,C>3}
second {A>1,B>3} (not C3 because 3 is used)
third {A>1,C>3}
fourth {A>3,B>2,C>1}
etc.
I try to capture the sets with the most number of elements (first and fourth
line, that have 3 elements each) and be able to store these somehow, for
further manipulation.
I have spent long time with this problem, and I looked into the association
problem in operations management and in maths, but still, I couldn?t create
any algorithm.
Any help is appreciated.
Jim.
Jani Yusef - 17 Jul 2003 04:41 GMT
> The problem:
> I have a relation R where
[quoted text clipped - 24 lines]
> Any help is appreciated.
> Jim.
I'd love to help you but nowhere in your post do I see an actual question.
At this point all I can tell is that you'd likely make good use of java.util.Set
perhaps. But who knows!?!?
Jani Yusef - 17 Jul 2003 04:49 GMT
> The problem:
> I have a relation R where
[quoted text clipped - 24 lines]
> Any help is appreciated.
> Jim.
Oh yeah, in addition to my other post,
this is way off f-ing topic for this group!!
comp.lang.java.programmer would be more appropraite and has more eyes
on it I'd guess so you'd get a better response rate.
Michael Amling - 17 Jul 2003 15:11 GMT
> The problem:
> I have a relation R where
[quoted text clipped - 21 lines]
> problem in operations management and in maths, but still, I couldn’t create
> any algorithm.
I've never seen an algorithm for this, but I did notice that "2" can
pair with only one of ABC, and the maximal solutions use 2's only pairing.
Have you tried one of the newsgroups devoted to math or puzzles?
--Mike Amling