hello hi I had an interesting idea earlier, hoping someone will listen say I have a collection of data tagged w/ keywords I want to be able to match those data by the keywords as data are interned in a structure responsible for managing them, each keyword gets a unique positive integer we'll start at 1... so, we'll say there's an article object with keywords foo, bar, and baz foo has been interned already, its number is 3...bar and baz are new and get the integers 8 and 9 the structure is then associated with all the (x + n) ... polynomials that can be formed with these numbers using a multidimensional array * gaff has quit (Connection timed out) so we have x^2 + 11x + 24, x + 9, etc... the first coefficient will always be 1, so it can be factored out altogether * Manyfold has quit (Read error: 104 (Connection reset by peer)) * mElo97 (n=0x0Fab@AStDenis-104-1-21-41.w80-8.abo.wanadoo.fr) has joined #math * justinca (n=jkhm@pdpc/supporter/student/justinca) has joined #math then these combinations are interned in the multidimensional array along with the total number of terms associated with the number on second thought, this will produce some very big numbers an a lot of wasted space if you have results like x^3 + 20 x^2 + 103x + 216, then you will get array indices [20]->[103]->[216] this might pay in the long run, but you could also consider splitting up the numbers by place value and how do you plan to extract the factors? and when you have them, what do they mean? [2]->[0]->[1]->[0]->[3]->[2]->[1]->[6], etc arctanx, you don't need to extract them say you are looking for all 'bar' and 'baz' items oh right, matching data IIRC, I said the numbers were 8 and 9 the fastest and most memory efficient way to do that would be a bit mask so, x^2 + 17x + 72 * jcsteele has quit (Read error: 110 (Connection timed out)) arctanx, ? just assign different keywords to different powers of 2, and bitwise and your mask against each set of data are you using some kind of program on the computer to do this? arctanx, this is theoretical right now I'm sure it's been done to death, I just want to see if there is any validity to my idea so, anyway, you are looking for all 'bar' and 'baz', this yields the polynomial x^2 + 17x + 72 * Appleman1234 (n=Appleman@CPE-124-185-115-49.qld.bigpond.net.au) has joined #math again, the first coefficient is always 1, so ignore it...using the (bad) array scheme I described earlier, this would go to [17]->[72] under [17]->[72] is another array, it starts at one and each index holds all the items that can be identified by the polynomial described above (17,72)...the index itself tells you how many terms are associated with the item so, if you were looking for JUST 'bar' and 'baz', you want all the items under [17]->[72]->[2] if you want everything /with/ the tags 'bar' and 'baz' (and 'foo', 'qux', whatever other qualifiers, if any), you would get the data under [17]->[72]->[2..n], not just [17]->[72]->[2] I hope this makes sense