The problem is a kind of scheduling problem, I would like to identify what kind of problem this is or, at least, what kind of problems it relates to?
Let's say we have n sets of events S1,S2,...,Sn, where an event has the duration of one day.
Each event set has only one repetition per week.
Each event set has an event repeating period, may be once a week, every two weeks, once a month, etc...
I need to re-schedule the sets of events in order to optimize the planning.
The algorithm output is a re-schedule of events that optimize events occurrences of each set in order to get the minimum number of distinct events between the event sets, virtually the result should be an event set with the smallest possible events number.
Suppose to have to event sets S1 and S2, S1 repeats once a week, S2 repeats every two weeks.
W1 W2 W3 W4 W5 ... WSK S1. x x x x x S2. x x x
The resulting scheduling is a that the events in the same week of each sets must be set to the same day
Suppose to have to event sets S1 and S2, S1 repeats every two weeks, S2 repeats every three weeks.
W1 W2 W3 W4 W5 ... WSK S1. x x x S2. x x
Week 1 can be merged. But How can I manage W3,W4,W5?
Does S2 in Week 4, has to be merged with S1 in Week 3 or in Week 5?
What kind of rule can be defined to check if merging is possibile? Should I define a interval of days where an event can be moved? I think something is missing in the problem definition.
Suppose to have more than two event sets
W1 W2 W3 W4 W5 ... WSK S1. x x x x x S2. x x S3. x x
What kind of rule should I apply?
Is there any general algorithm?