Skip to main content
added 41 characters in body
Source Link
Doc Brown
  • 220.5k
  • 35
  • 410
  • 625

Asking "does the workload problem belong to a class of algorithms" makes not much sense - the problem itself is not an algorithm. However, I assume your real question is to which class of algorithms your proposed solution belongs.

I see this in the category of sweep line algorithms. Though yours is not really a geometric problem, the main idea is the same: take alle relevant points "where something changes" on the x-axis (here the time line), sort them in ascending order, and then process them from left to right. In this processing step, some kind of "state" is changed at each relevant point in time. In geometric problems, this kind of state is often a geometric set of points or something similar, in your case it is simply the total workload.

The only thing I would change in your algorithm is, I would not use a dictionary as container. A simple list of number pairs ("point in time", "workload change") will do it, ordered by their first value. That does not change much to your solution, especially not the running time, it just avoids problems with duplicate keys.

Asking "does the workload problem belong to a class of algorithms" makes not much sense. However, I assume your real question is to which class of algorithms your proposed solution belongs.

I see this in the category of sweep line algorithms. Though yours is not really a geometric problem, the main idea is the same: take alle relevant points "where something changes" on the x-axis (here the time line), sort them in ascending order, and then process them from left to right. In this processing step, some kind of "state" is changed at each relevant point in time. In geometric problems, this kind of state is often a geometric set of points or something similar, in your case it is simply the total workload.

The only thing I would change in your algorithm is, I would not use a dictionary as container. A simple list of number pairs ("point in time", "workload change") will do it, ordered by their first value. That does not change much to your solution, especially not the running time, it just avoids problems with duplicate keys.

Asking "does the workload problem belong to a class of algorithms" makes not much sense - the problem itself is not an algorithm. However, I assume your real question is to which class of algorithms your proposed solution belongs.

I see this in the category of sweep line algorithms. Though yours is not really a geometric problem, the main idea is the same: take alle relevant points "where something changes" on the x-axis (here the time line), sort them in ascending order, and then process them from left to right. In this processing step, some kind of "state" is changed at each relevant point in time. In geometric problems, this kind of state is often a geometric set of points or something similar, in your case it is simply the total workload.

The only thing I would change in your algorithm is, I would not use a dictionary as container. A simple list of number pairs ("point in time", "workload change") will do it, ordered by their first value. That does not change much to your solution, especially not the running time, it just avoids problems with duplicate keys.

added 1 character in body
Source Link
Doc Brown
  • 220.5k
  • 35
  • 410
  • 625

Asking "does the workload problem belong to a class of algorithms" makes not much sense. However, I assume you what you really meanyour real question is to which class of algorithms your proposed solution belongs.

I see this in the category of sweep line algorithms, though it. Though yours is not really a geometric problem, the main idea is the same: take alle relevant points "where something changes" on the x-axis (here the time line), sort them in ascending order, and then process them from left to right. In this processing step, some kind of "state" is changed at each relevant point in time. In geometric problems, this kind of state is often a geometric set of points or something similar, in your case it is simply the total workload.

The only thing I would change in your algorithm is, I would not use a dictionary as container. A simple list of number pairs ("point in time", "workload change") will do it, ordered by their first value. That does not change much to your solution, especially not the running time, it just avoids problems with duplicate keys.

Asking "does the workload problem belong to a class of algorithms" makes not much sense. However, I assume you what you really mean is to which class of algorithms your proposed solution belongs.

I see this in the category of sweep line algorithms, though it is not really a geometric problem. The only thing I would change in your algorithm is, I would not use a dictionary as container. A simple list of number pairs will do it, ordered by their first value. That does not change much to your solution, especially not the running time, it just avoids problems with duplicate keys.

Asking "does the workload problem belong to a class of algorithms" makes not much sense. However, I assume your real question is to which class of algorithms your proposed solution belongs.

I see this in the category of sweep line algorithms. Though yours is not really a geometric problem, the main idea is the same: take alle relevant points "where something changes" on the x-axis (here the time line), sort them in ascending order, and then process them from left to right. In this processing step, some kind of "state" is changed at each relevant point in time. In geometric problems, this kind of state is often a geometric set of points or something similar, in your case it is simply the total workload.

The only thing I would change in your algorithm is, I would not use a dictionary as container. A simple list of number pairs ("point in time", "workload change") will do it, ordered by their first value. That does not change much to your solution, especially not the running time, it just avoids problems with duplicate keys.

added 1 character in body
Source Link
Doc Brown
  • 220.5k
  • 35
  • 410
  • 625

Asking "does the workload problem belong to a class of algorithm"algorithms" makes not much sense. However, I assume you what you really mean is to which class of algorithms your proposed solution belongs.

I see this in the category of sweep line algorithms, though it is not really a geometric problem. The only thing I would change in your algorithm is, I would not use a dictionary as container. A simple list of number pairs will do it, ordered by their first value. That does not change much to your solution, especially not the running time, it just avoids problems with duplicate keys.

Asking "does the workload problem belong to a class of algorithm" makes not much sense. However, I assume you what you really mean is to which class of algorithms your proposed solution belongs.

I see this in the category of sweep line algorithms, though it is not really a geometric problem. The only thing I would change in your algorithm is, I would not use a dictionary as container. A simple list of number pairs will do it, ordered by their first value. That does not change much to your solution, especially not the running time, it just avoids problems with duplicate keys.

Asking "does the workload problem belong to a class of algorithms" makes not much sense. However, I assume you what you really mean is to which class of algorithms your proposed solution belongs.

I see this in the category of sweep line algorithms, though it is not really a geometric problem. The only thing I would change in your algorithm is, I would not use a dictionary as container. A simple list of number pairs will do it, ordered by their first value. That does not change much to your solution, especially not the running time, it just avoids problems with duplicate keys.

Source Link
Doc Brown
  • 220.5k
  • 35
  • 410
  • 625
Loading