E
E
EgoRedMC2018-05-01 20:45:51
Algorithms
EgoRedMC, 2018-05-01 20:45:51

What is the name of such a task?

I am more than sure that such a task exists, perhaps even in a generalized form. Please tell me what it's called.
The task sounds like this:
It is necessary to create a TV program.
Each TV show has the following fields:
start time, end time, number, priority.
It is necessary that the most priority TV show is watched at every moment of time.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
C
Codebaker, 2018-05-01
@Codebaker

You should read about the problems that scheduling theory solves.

M
Mercury13, 2018-05-02
@Mercury13

If we assume that any program can only be watched in its entirety, this will be the task of applications (=activity-selection problem) .
Solved by a greedy algorithm in this form. The highest priority transmissions are taken and the classical problem of applications is solved: we take the one that ends the earliest, then the one that ends the earliest and does not contradict the existing one ... Lower priority ones are inserted into the “windows” by the same algorithm, etc.
If we assume that you can throw unwatched passes - everything is simple. When a higher priority transmission occurs, we switch to it.

S
Sergey Sokolov, 2018-05-01
@sergiks

I don't know what this task is called.
It is solved by sorting the time of events and their enumeration: at each such moment it is necessary to make a decision "to stay / switch".
There is a priority of the current transfer (if it has not ended yet). And there are priorities for other programs at this moment (the beginning ones are especially interesting).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question