Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Tools / July 2003

Tip: Looking for answers? Try searching our database.

Algorithm help

Thread view: 
Jim - 16 Jul 2003 11:11 GMT
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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.