Hi,
I am new to Knime, and so far I’ve been able to find answer to all of my questions on this page, but I’m really struggling with this one.
I have lists of tasks (TASKGROUP). I’ll show 4 lists, but the real problem could have thousands of lists, say 3000:
List 1: tasks A, B, C, D
Count of tasks: 4
List 2: tasksC, D, E, F
Count of tasks: 4
List 3: tasks A, D, F
Count of tasks:3
List 4: tasks B, C, D, F
Count of tasks: 4
I want to group the lists so that the resulting groups have:
- approximately the same amount of tasks
- the minimum sum of unique tasks.
Example:
List (1 + 2)
COUNT of TASKS: A, B, C, D, E, F = 6 tasks
Sum of tasks: 4+4 = 8
List (3 + 4):
COUNT of TASKS: A, B, C, D, F = 5 tasks
Sum of tasks: 3+4 = 7
Total unique tasks = 6 + 5 = 11 unique tasks
The 2 groups have respectively 8 and 7 as sum of tasks, which is acceptable.
Alternative solution
List (1 + 4):
COUNT OF TASKS: A, B, C, D, F = 5 unique tasks
Sum of tasks: 4+4 = 8 tasks
List (2 + 3):
COUNT OF UNIQUE TASKS: A, C, D, E, F = 5 unique tasks
Sum of tasks: 3+4 = 7 tasks
Total unique tasks: 5 + 5 = 10 unique tasks, which would be a better solution than the first one.
The 2 groups still have 8 and 7 as total tasks.
The number of groups should be editable, and it can range from 1 to 100.
The minimization of the overall number of unique tasks is the priority.
It is not important how many lists I have to group to achieve (approximately) the same sum of tasks.
The purpose is to create scenarios:
- 1 group → all the 3.000 lists are merged together, the result is a simple count of unique items
- 2 groups → the purpose is to find the smart grouping to minimize the sum of unique items of the 2 groups
- 3 groups → …
- 4 groups → …
- 3.000 groups → each list is a group, where the result is the sum of the distint count of items in each list
Thank you very much.