I have a question about ranking algorithm that might hasn't exist so far:
I have a list ordered by a score, for example a following list (denotes list-a):
Now I have new information to know that the list should be ranked as follow (denotes list-b):
The question in here is: How to construct a new ranking for the list-a follow restriction in list-b?
We can say that the new list must:
- It must follow the rank in the list-b
- Try to have less conflict with the rank in the list-a. (e.g about conflict: list-a says a>b, but now we say b>a => conflict).
The problem in here is the list-b doesn't have information about c, e, g (marked by red color in list-a). Now we need to construct a new ranking for list-a follow restriction in list-b.
My current solution:
Sure that we can solve it by using a brute force strategy as follow: add to the list-b the missing items c, e, g one by one and find the best place for it by:
- Select one place for it in list-b (e.g: a > c > d > b > f)
- Next check number of conflict with list-a, then select a position that have less conflict.
For example with c, we can do as follow:
When we have equal number of conflict for different position, then we select the first position (i guess). Just follow this way, we can add up to the final item.
This is my "bad way" to do it, so do you have any better idea for this problem? Because my list is really long (about 1 million items), if follow this way, it must be too expensive for computation.
Looking forward to hearing your suggestion.