Friends! Help me come up with an algorithm for the following task:

It is necessary to programmatically repeat the behavior of the person sending the message, such as Twitter. There are, say, 100 ready messages. In the time of the beginning of the day one message leaves, at lunch time - 20 messages. From the beginning of the day until lunchtime, messages should be sent more and more often, and after dinner, the opposite. We get a look like a normal distribution.

How can this problem be described? Implementation is not important.

Thank.

    1 answer 1

    • Make a sample of 100 random variables from 0 to 1 with a normal distribution, sort in ascending order and multiply each number, say, by a segment [07:15, 23:30].

    If anything, then multiplying a number by a segment is not a strict mathematical operation :)

    • You will receive a sequence of the form {07:18, 07:23, 07:43, ...} , and it is at these times that messages need to be sent.
    • multiply each number, say, by a segment [07:15, 23:30]. Not quite understand how to multiply a number by a segment? - psycho_Octopus
    • one
      @psyho_Octopus 07:15 + (23:30 - 07:15) * t - Costantino Rupert
    • Only with such a decision is not satisfied the condition that messages for dinner will be sent more and more often. For example: 8-00 9-00 9-30 10-00 10-20 10-40 11-00 11-10 11-20 11-30 ... - psycho_Octopus
    • one
      @psyho_Octopus Yes? And why do you think that this condition is not satisfied? - Costantino Rupert
    • Perhaps I did not understand how to make a sample of 100 random variables from 0 to 1 with a normal distribution. Can you tell me? - psycho_Octopus