a - objects with several "categories", b, for example, a1 has three cateories b1, b2, b3. The problem is to reduce the number of categories (which can grow quite large) into groups that always meet together. "The largest common subset."
So, for example, given the following data set:
a1{ b1,b2,b3 } a2{ b2,b3 } a3{ b1,b4 }
We can find that b2 and b3 are always combined.
b23 = {b2,b3}
.. and we can reduce the set of categories to this:
a1{ b1, b23 } a2{ b23 } a3{ b1,b4 }
So my problem is to find some kind of algorithm to solve this problem.
I started looking at the Longest Common Sequence problem, and it might be a solution. that is, repeat the grouping of categories such as b' = LCS(set_of_As) until all categories have passed. However, this is not all. I have to somehow restrict the input domain to make this possible.
Skip something obvious? Any hints of a problem domain you can point me to? Does anyone recognize any other approach to such a problem.
Petter nordlander
source share