Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

algorithmic

Name: Anonymous 2010-07-14 15:57

Hello /prog/,given a set of let's say 2000 integers 1,2,...,2000
and a 2000*2000 matrix A such that A(i,j) is either true or false, i need to find all the subsets J of cardinal 7 such that for all i,j in J, A(i,j) is true, and i need to do it very fast.

The best way i could find consists in generating a matrix  2000*2000 B such that B(i,j) is the list of all k such that A(i,k) and A(j,k) are true and k>j>i and an array C such that C(i) is the list of all k such that A(i,k) is true and k>i.
Then i just select a first element i1, then a second which is a member of C(i1), a third, member of B(i1,i2) and so on , calculating intersections of lists of B.
Unfortunately,this is not fast enough. I also thought about generating a 3D matrix D but it would require too much memory.

Any ideas ?

Name: Anonymous 2010-07-14 18:53

I will not be the first admitting that I understand your playing field, so to speak, but don't understand your goal.  I believe, and this is just my belief, you want to, for any given i and any given j, test the boolean status of all matrix cells A such that A(i, j) to A(i, 2000) and A(i, j) to A(2000, j) is true and create smaller subsets of this field based on that information, taking more information as you go?  Am I even halfway to your idea?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List