Fellow programmers, remind me how to transform the list
a=(3,4,5,8,10), b=(1,3,8,10), c=(4,10), d=(8,10)
into
a=(e,4,5), b=(1,e), c=(4,10), d=(8,10), e=(3,d)?
Actually, for this purpose:
https://github.com/raliev/rulegroupspoc/blob/master/sampleoutput.txt
There is a matrix of 1 million users by 100,000 products and a set of rules dictating which product is available to which user. I have already developed a fast algorithm (still unoptimized) that creates a Products x Usergroups matrix, and calculates user groups. Under certain conditions, there will be significantly fewer user groups than products, and each product could be associated with a list of user groups, instead of a list of users. However, in the calculated groups, there are repetitions that could further reduce the list of groups to be stored alongside the products. This is where substituting “e” from the example above comes into play. But how to do this efficiently? Assume that there are 100,000 users, less than 50,000 groups.
