1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Readme [11.4K]
3 years ago
11

A computing company is running a set of processes every day. Each process has its own start time and finish time, during which i

t runs continuously. The company has developed a process_check module, that runs briefly (consider this to take just 1 point in time) and records important pieces of information about the processes running at that time. The company would like to run the process_check module as few times as possible each day, while making sure that the module is called at least once during the execution of each process.
Required:

Give an efficient algorithm that based on the start and finish time of each process will find the smallest set of possible moments of time at which to run the process_check module (making sure that the module is invoked at least once for each process).
Computers and Technology
1 answer:
Helga [31]3 years ago
5 0

Answer:

Above all else, let us show that this issue has the greedy choice property.

This implies that worldwide ideal arrangement can be gotten by choosing local ideal arrangements. Presently notice the following:

The global optimal solution of the issue requests us to track down the minimum number of times process_check module should be run.

It is likewise referenced that during each running interaction, process_check module should be called atleast once. Along these lines, the minimum possible number of process_check calls happens when process_check is made close to the quantity of the processes that are run.

Along these lines, we see that the global optimal solution is shaped by choosing optimal answer for the nearby advances.

Along these lines, the issue shows greedy choice property. Thus, we can utilize a greedy algorithm for this issue.

The greedy step in this calculation is to postpone the process_check as far as might be feasible. Thus, it should be run towards the finish of each interaction. So the following algorithm can be utilized:

Sort the cycles by utilizing the completion times.

Towards the finish of the 1st process in the arranged list, run the process_check module. Right now any process that is now running is removed the arranged rundown. The main interaction is additionally removed from the sorted list.

Now repeat stage 2, till all processes are finished.

In the above mentioned algorithm, the costliest advance is the step of sorting. By utilizing the optimal sorting algorithm, for example, merge sort, we can achieve it in O(n log n) asymptotic time.

Along these lines, this greedy algorithm additionally takes O(n log n) asymptotic time complexity.

You might be interested in
Which is the default option for autosum?
Drupady [299]

Answer:

Average is the following the default option of auto sum feature

7 0
3 years ago
________type of website is an interactive website kept constantly updated and relevant to the needs of its customers using a dat
Llana [10]

Answer:

Data-driven Website

Explanation:

A Data-driven website is a type of website that is continually updated by its administrators so as to meet users' needs. It is opposed to a static website whose information remains the same and is never changed once uploaded.

The data-driven website is used in a platform where information has to be continually updated. An example is an online platform where people place orders for goods and services. There are usually changing prices and new goods continually uploaded. So, to keep the consumers updated, the administrators of such platforms would use a data-driven platform.

8 0
3 years ago
When making a While Loop in Python, what button should I press?
olganol [36]
D. None of the above
8 0
4 years ago
In a C++ program, one and two are double variables and input values are 10.5 and 30.6. After statement cin >> one >>
melisa1 [442]

Answer:

The answer is "Option d"

Explanation:

In the given C++ program code, It is defined, that two double type variable "one and two" is defined, that holds the two double value that is "10.5 and 30.6".

In this code, it uses the "cin" method for input values from the user ends, when we execute this code, it provides the console screen, that inputs the double type value from the user side, and other given choices were wrong because it holds different values.

3 0
4 years ago
Which type of computer is best for download the sims 4 game?
In-s [12.5K]

Answer:

LOL I DON'T EVEN KNOW

Explanation:

5 0
3 years ago
Read 2 more answers
Other questions:
  • Explain three ways you can get home safely if the friend you rode with has drugs or alcohol in his or her system and you prevent
    8·1 answer
  • To open the find and replace dialog box with shortcut keys, hold down ctrl and press ________
    15·1 answer
  • What savings account has the best rate of return on his interest
    12·1 answer
  • Write a program that will ask the user to input a phrase (multiple word sentence), and an integer value. A static function will
    14·1 answer
  • BRALYEST TO FIRST PERSON THAT IS CORRECT!!! Select the correct navigational path to add titles to your printable worksheet. Clic
    9·2 answers
  • What is an important step to take before entering your first data into your database?
    10·2 answers
  • How does a scriptwriter show the design team how different player actions should affect the game?
    6·1 answer
  • Which of the following factors is most likely to result in low shipping and handling costs? A higher than average hourly pay rat
    10·2 answers
  • Most jobs in computer disciplines require which minimum level of education?
    12·2 answers
  • Design an application for the Sublime Sandwich Shop. The user makes sandwich order choices from list boxes, and the application
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!