{'fraction_non_alphanumeric': 0.035840984974958266, 'fraction_numerical': 0.0066256260434056765, 'mean_word_length': 4.215918367346939, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Scheduling Under Power and Energy Constraints

Given a system model where machines have distinct speeds and power ratings but are otherwise compatible, we consider various problems of scheduling under resource constraints on the system which place the restriction that not all machines can be run at once. These can be power, energy, or makespan constraints on the system. Given such constraints, there are problems with divisible as well as non-divisible jobs. In the setting where there is a constraint on power, we show that the problem of minimizing makespan for a set of divisible jobs is NP-hard by reduction to the knapsack problem. We then show that scheduling to minimize energy with power constraints is also NP-hard. We then consider scheduling with energy and makespan constraints with divisible jobs and show that these can be solved in polynomial time, and the problems with non-divisible jobs are NP-hard. We give exact and approximation algorithms for these problems as required.


Introduction
For sustainability, it is highly desirable that every system of machines be as efficient as can be with regard to the resources that it consumes. This also requires appropriate usage of machines within a larger system, in addition to proper design and operation of individual machines for good solo performance. Of particular concern is the appropriate scheduling of jobs over a system of machines. Scheduling of jobs can be considered effective when it meets stated goals such as minimal makespan (time to completion), minimal energy consumed, and minimal cost incurred. Thus, it is necessary to attempt to create effective scheduling algorithms in line with such desirable goals. The concern for energy efficiency by scheduling can exist in many types of systems, not just computing systems, hence the design and analysis of such algorithms can be appropriately classified under the rubric of computational sustainability.
General literature on scheduling [1,2] has considered a multitude of objectives related to time, but has not considered energy and power in the general setting. Some domain-specific literature [3] focuses on energy optimality, but calls on particular features and technologies of those domains (such as DVFS), and does not consider the limits on scheduling due to power, energy or makespan. Classical work on energy-efficient scheduling, such as by Yao et al. [4], has focused on the specific properties of computer processors, and this trend is also seen in recent work [5,6,7] which also discuss energy efficiency issues in computing systems exclusively. Their approaches and results bring few insights into questions concerning energy efficiency in systems such as for chemical engineering [8], passenger transportation [9], manufacturing processes [10], and electrical power plants [11], which are controlled by computers but not amenable to analyses solely by framing the problem as concerning computer processors and electronic components.
It is well known that energy costs are of great significance not only in data centers [12,13], but in large industrial systems as well [14] as home appliances, and that the energy consumed by idle machines (also called "standby power" [15]) is responsible for a significant part of their overall energy usage. Hence, the lack of attention to idle power in analyses concerning energy efficiency in general systems is of concern. It is estimated [16] that idle power constitutes 5-10% of usage in residential settings, and that it is responsible for 1% of global CO 2 emissions.
Even the literature on scheduling for meeting more than one goal, which is called multi-objective scheduling [17,18,19], does not address these issues.
A recent paper by Mansouri et al. [20] takes an important first step in considering makespan as well as energy in general systems, but it considers only a two-machine system; it does not seem to directly deal with idle power consumption in machines, and also does not consider restrictions on power available.
Additionally, however, it is also seen in practice that many if not most systems also operate under constraints that may be externally or internally imposed. These may be power, energy, or makespan constraints on the system. Systems connected to smart power grids can provide good examples for power-constrained scheduling problems. Smart grids and usage characteristics such as demand-side management [21] or demand response [22] necessitate that systems control their power usage to certain limits lest there be penalties or other unwelcome consequences. Such concerns with power usage are of course prevalent in conventional industrial systems [23], but also in large computing systems [24,25]. Additionally, many contemporary systems are powered by multiple sources, which almost always have varying associated energy capacities, as in cases of renewable sources like solar [26] and wind [27]. Many performance optimization problems [28] for real-time systems rely on a fixed energy budget during an operation.
Similarly, other problems where there are hard deadlines may require energy-minimal scheduling while respecting constraints on makespan. Therefore, it is necessary to consider the problems of how scheduling algorithms can be designed to be effective in terms of optimizing multiple quality parameters such as makespan and energy consumption, while running on systems subject to different kinds of resource constraints.
We consider these problems in the present paper, with a model of resource constrained systems whose machines are similar in their capabilities but may have different working and idle power ratings and working speeds. Based on different types of machines cooperatively running similar jobs, we classify and analyze the problems of resource constrained offline scheduling with non-identical interconnected machines and independent jobs. Fundamentally, the jobs run on the machines can themselves be either divisible, i.e., can be broken up in arbitrary ways into chunks of whatever sizes one may wish, and non-divisible, in which case the jobs cannot be subdivided. A little insight suggests that the problems of scheduling non-divisible jobs are at least as hard as those of scheduling divisible jobs.
Our basic model is general (not domain-specific) and therefore extensible for more specific classes of systems. Our analyses with respect to power and energy can also be translated for systems that consume any other resources (e.g., water, fuel), and are subject to similar constraints from sources supplying the same.
The problem of minimizing the makespan (time to completion of a set of jobs) under a power constraint is seen (Section 3) to be N P-hard [29] even for divisible jobs, by reduction to the knapsack problem [30], a canonical problem in complexity theory. This implies that minimal-makespan scheduling is hard also for non-divisible jobs.
Next, we consider power constrained energy-minimal scheduling, which is known [31] to be at least as hard as minimum-makespan scheduling. Quite obviously, this too turns out to be N P-hard (Section 4).
We then consider the problem of scheduling to minimize the makespan given energy budget. Unlike other power-constrained scheduling problems, this problem turns out to be solvable in polynomial time for divisible jobs. For non-divisible jobs, the scheduling problem to minimize makespan is known to be N P-hard even without any constraints. So with energy constraints, it should be N P-hard as well for non-divisible jobs (Section 5).
Last, we consider the problem of energy minimal scheduling under makespan constraint. Like the problem of minimal-makespan scheduling under an energy constraint, this too turns out to be solvable in polynomial time for divisible jobs and N P-hard for non-divisible jobs (Section 6).
These results suggest that many other interesting problems of effective scheduling under pairs of various resource constraints are computationally intractable, i.e., unlikely to have optimal general solutions that can be computed efficiently. However, while we are essentially presenting negative results, we believe that doing so opens up the possibility for focused approaches to finding approximation algorithms and other solutions to such problems.
We give approximation algorithms for divisible jobs given a power constraint: for minimizing makespan (Section 3), and for minimizing energy consumption (Section 4). Each algorithm is seen to have a bound of (1 + ǫ)OPT. We then give exact algorithms for minimal makespan and energy scheduling under respective constraints of energy and makespan for divisible jobs; and approximation algorithms for non-divisible jobs (Section 5 and Section 6).
In the next section we formally introduce our system model along with the notations used in this paper.

System Model
Consider m machines c 1 to c m forming a system C. The working power of machine c i is denoted as µ(c i ), and the idle power as γ(c i ). The sum of the idle powers of all the machines is given by Γ. The speed of machine c i is denoted as υ(c i ). The speed (throughput of work per unit time) of a machine is fixed throughout its working tenure, and all machines process identical jobs (so that any job can be run on any machine).
When υ(c i ) = 1, with 1 ≤ i ≤ m, then we can say that the machines are identical in their working capacities or speeds, implying that they can execute and complete any job given to them in equal time. And if in that case all jobs are executed sequentially on one machine, then that time taken is W .
All machines stay on for the duration of the makespan of the whole set of jobs. (This is reasonable considering that in many systems the cycle time to stop/restart a machine is large; however, it is not a restrictive assumption, as stopping idle machines is equivalent to the idle power of those machines being zero.) All machines in the system work in parallel, and the maximum working time of the system to execute a given set of jobs is T , which is the makespan of the system for that set of jobs. All jobs are independent, meaning a job need not wait for completion of any other particular job to start its execution. This implies that If machine c i works only for time t i , then the idle time of machine c i is given by T − t i . The amount of work done by machine c i is represented by The sum of the work done by all machines is equal to the total work to be done, i.e., m i=1 w(c i ) = W . E represents the energy consumption of the complete system.
Since we consider the energy consumption in working as well as idle states, the energy consumed by machine c i is the sum of the energy consumed in the working state and that consumed in the idle state. The energy consumed by machine c i in the working state is given by µ(c i )t i , and the energy consumed in the idle state by γ(c i )(T −t i ), so the total energy consumed by c i is given by µ(c i )τ (c i ) + γ(c i )(κ(c i )).
Overall, for the entire system C, we get, after simplification: The system C can have constraints like power budget P , , energy budget E and makespan budget T . P and E are the maximum power and energy that can be drawn altogether by all the machines of the system. T is the maximum time the system is on.
Evidently, we have to assume that P > Γ + min(µ(c i ) − γ(c i )), i.e., the power is enough to keep all the machines idle and let at least one machine run a job. It is likewise necessary to assume that P < m i µ(c i ), i.e., that the power budget is not sufficient to run all machines at once. (For it is sufficient, then the availability of power is no longer a constraint on scheduling). Similar assumptions are to be made for other constraints also.
In considering the types of jobs to be executed by the system of machines, the simplest kind are divisible jobs, which can be divided in arbitrary ways, with it being possible to run chunks of any size on any machine [32]. This is obviously something of an abstraction, but is satisfied to an extent in practice with such tasks as pumping water. The other type of jobs are nondivisible jobs, which come in fixed-size chunks that cannot be divided in arbitrary ways.
It is of interest to note that scheduling of non-divisible jobs is certainly no easier than the scheduling of divisible jobs; if a set of non-divisible jobs can be scheduled effectively (by whatever measure of effectiveness one may choose to apply in a certain context), then an equivalent set of divisible jobs can also be scheduled effectively by dividing them into the same chunk sizes as those of the non-divisible jobs. Therefore, results about divisible jobs set a baseline of difficulty for all jobs; if a certain class of problems is intractable when the jobs are divisible, it is also that way with non-divisible jobs [2].
We formulate the following problems: 1. Scheduling to minimize makespan given a constraint on power (Section 3).
2. Scheduling to minimize energy given a constraint on power (Section 4).
3. Scheduling to minimize makespan given a constraint on energy (Section 5).
4. Scheduling to minimize energy given a constraint on makespan (Section 6).
We explore the first two problems with divisible jobs only since these are N P-hard even for divisible jobs. For the next two problems we consider solutions for both divisible and non-divisible jobs. A short summary of the results is given below along with bounds for the algorithms.

Scheduling to Minimize Makespan Under Limited Power
The first problem we consider is to minimize the makespan (time to completion of a set of jobs) of system C, while under a power constraint.
Theorem 3.1. If the power budget for a system of machines is limited, minimizing the makespan for a set of divisible jobs is an N P-hard problem.  Proof. Obviously, to minimize the makespan, we need to choose a subset of machines from C to achieve the highest cumulative speed, given the power constraint. This amounts to finding some r < m indices i r (the indices of the machines chosen to run) such that r υ(c i ) is the greatest possible. In other words, we wish to maximize r υ(c ir ), subject to the constraint: Γ can be moved to the right so that P − Γ is treated as one constant, say Z, and µ(c ir ) − γ(c ir ) can be likewise treated as one variable, say d ir . Then the problem reduces to: maximize υ(c ir ) subject to: which is an instance of the knapsack problem [29], a canonical N P-hard problem.
It may be noted that this is a somewhat surprising result, because minimum-makespan scheduling of divisible jobs in a system without a power constraint is trivial-one has to just run all machines.
Given the lack of ease, as previously discussed, of scheduling non-divisible jobs, the following obtains. Corollary 1. If the power budget for a system of machines is limited, minimizing the makespan for a set of non-divisible jobs is an N P-hard problem.
Therefore, we may generally say that given a limited power budget, scheduling jobs on a system is an N P-hard problem.

Approximation Algorithm
We give the following approximation algorithm for the objective of minimizing makespan. Without loss of generality, we assume the working and idle power consumptions, and the speeds of machines to be integers.
As seen in the previous section, the problem of minimizing makespan, given a constraint on power can be formulated as a knapsack problem. Here we minimize T or maximize 1 T .
Considering υ(c i ) as profit for component i (machine c i ) and (µ(c i ) − γ(c i )) as weight of component i (machine c i ), we get the classical knapsack formulation. Hence we can apply approximation algorithm from the large set of algorithms developed for knapsack problem.
We use a suitably modified version of the well known fully polynomial time approximation scheme (FPTAS) for the knapsack problem [33]. Let V be the speed of the fastest machine, i.e., V = max i υ(c i ). Then mV is a trivial upper-bound on the speed that can be achieved by any solution. For each i ∈ {1, . . . , m} and υ ∈ {1, . . . , mV }, let S i,υ denote a subset of {c 1 , . . . , c i } whose total speed is exactly υ and whose total power requirement is minimized. Let A(i, υ) denote the total power requirement of the set S i,υ (A(i, υ) = ∞ if no such set exists). Clearly A(1, υ) is known for every υ ∈ {1, . . . , mV }. The following recurrence helps compute all values A(i, υ) in O(m 2 V ) time.
The maximum speed achievable by the machines with total power bounded by P is max{υ|A(m, υ) ≤ P }. We thus get a pseudo-polynomial algorithm for minimizing makespan under power constraints.
If the speeds of machines were small numbers, i.e., they were bounded by a polynomial in m, then this would be a regular polynomial time algorithm.
To obtain a FPTAS we ignore a certain number of least significant bits of speeds of machines (depending on the error parameter ǫ), so that the modified speeds can be viewed as numbers bounded by a polynomial in m and 1 ǫ . This will enable us to find a solution whose speed is at least (1 − ǫ)OPT in time bounded by a polynomial in m and 1 ǫ .
Algorithm 1: FPTAS for makespan input : Set of machines (C), number of machines (m), working power of machines (µ(c i )), idle power of machines (γ(c i )), sum of idle power of all the machines (Γ), speed of machines (υ(c i )), power constraint (P ) output: Working set (R) With these as speeds of machines, using the dynamic programming algorithm, find the set of machines with maximum total speed, say R. 5 Return R.
Theorem 3.2. If set R is output by the algorithm 1 and υ(R) denotes Proof. Let O denote the optimal set. For any machine c i , because of rounding down, Kυ(c i ) can be smaller than υ(c i ), but by not more than K. Therefore, The dynamic programming step must return a set at least as good as O under the new profits. Therefore, where the last inequality follows from the observation that OPT≥ V . It directly follows that minimum makespan T ≤ (1 + ǫ)OP T .

Scheduling to Minimize Energy Under Limited Power
Minimizing the makespan for a set of jobs running on a system does not guarantee that the energy consumed is minimized. To see why, we can compare the problems as done in prior work [31].
If the idle power of every machine is equal to its working power, i.e., if µ(c i ) = γ(c i ), we have the following from (2.3): Thus, in this particular setting, the energy is minimized if the makespan T is minimized. However, more generally, the idle power of machines may be less than their working power, so that γ( In this case, we get: This in turn simplifies to: Therefore, in this case, even minimizing T does not minimize E, and the problem of energy-minimal scheduling is always at least as hard as that of minimize makespan. This gives us the following. Even more simply, if it were possible to efficiently compute minimalenergy schedules, it would be possible to minimize the makespan simply by using an energy-minimal schedule with µ(c i ) = γ(c i ), which contradicts Result 3.1.
This too is a surprising result in a way, because it is known [34] that energy-minimal scheduling of divisible jobs in a system without a power constraint can be achieved in O(m), i.e., linear time.
Approximation Algorithm The problem of minimizing energy subject to constraint on power is harder than minimizing for makespan. To state the problem in more general form, minimizing energy (E) can be easily seen as maximizing its inverse, i.e., 1 E . Hence the problem can be formally written as: Here we cannot find profit per unit weight for each element, as the objective function is not a linear function of just one property of elements of the set. When we need to minimize E, we arrange machines in an order such that the first machine is the one with smallest µ(c i )−γ(c i )+Γ , where, 1 ≤ i ≤ m. Since, here we need to maximize 1/E within power constraint, we need to arrange machines in such an order that we give a machine more priority if it reduces more energy consumption of system per unit increase of power consumption. Hence, we arrange machines in an order such that the first machine has highest and afterwards in non-increasing order of  sequentially; if the power consumption of a particular machine is less than or equal to the margin (the power remaining after already-scheduled machines draw their power requirements) then we compare the energy of the current machine with the current energy. When both conditions are satisfied, we add this current machine to our working set R. If the power consumption of a particular machine is not within the limit, then we compare the profit of this machine and the sum of profit of machines in working set. If the profit of this machine is more, then we choose only this particular machine and update R else we continue with same set R.
Theorem 4.2. The worst case bound for Algorithm 2 to maximize 1 E is 1 2 , so the energy consumed is at most twice the optimal.
Proof. For the worst case, suppose there are only two machines in the system. Taking (µ(c 2 )−γ(c 2 )) = (µ(c 2 )−γ(c 2 )) = k and P − Γ = 2k − 1. As the bound is given by current performance divided by optimal performance, we have, Solving (4.8) we get: L = (Γ + 2(µ(c 1 ) − γ(c 1 ))) 2(Γ + (µ(c 1 ) − γ(c 1 ))) (4.9) Clearly the value of bound depends upon the power consumption specifications of the system. The bound depends on the total idle power consumption and value of the difference between working and idle power specification of the machine for which is highest and whose inclusion does not violate power constraint. Since idle power will always be less than working power, L ≈ 1 − 1 2 = 1 2 in the worst case, so the worst case bound for minimization of energy is 2.

Minimizing Makespan Given Energy Budget
We analyse the problem of minimizing makespan given energy constraint with divisible and non-divisible jobs.

Divisible Jobs
Contrary to the problems with power constraint, the problem of minimizing makespan, given an energy budget with divisible job can be formulated as a fractional knapsack problem. This is because unlike power fractional amount of energy can be given to a machine to run for some part of the makespan of the system. Here we minimize T or maximize 1 T .
Since υ(c i ) gives work done per unit time and power rating gives energy required per unit time for the machine to operate, we can take their ratio as a measure of efficiency. This will be a measure of amount of work done per unit energy consumed. Based on this parameter we give an algorithm to get the minimum makespan and the set of machines to be used. Algorithm 3 takes Set of machines, working and idle power of machines, speed of machines, energy constraint (E) and total work as input and gives the minimum makespan and the subset of machines to be used as output. It assumes energy is not sufficient to complete all work and finds the maximum amount of work that can scheduled. The machines are sorted in the order of their efficiency. Now, every machine is given work which the machine can complete in makespan T . So the machines will be active for an equal amount of time. This makespan is iteratively decreased based on the number of machines added to the working set. When the energy constraint is violated at an addition of a particular machine, that machine is given the fractional amount of energy available so that all of available energy is used. The time complexity of Algorithm 3 turns out to be O(m log m).

Non-divisible Jobs
Since even simple scheduling in multiple parallel machines with indivisible jobs itself is N P-Hard, the problem of scheduling in parallel machines given energy constraint is certainly harder. For this we give an approximation algorithm designed in similar terms as previous algorithm but with indivisible jobs. Here we find maximal set of machines which can work within the Energy constraint. For this we sort the machines in terms of efficiency and add them one by one to the working set if total energy requirement is within the constraint. We stop at the machine where energy requirement is violated. Now we give maximum amount of work to this machine to fit within the remaining energy margin. The remaining set of jobs are assigned to the previously chosen machines by Longest Processing Time(LPT) algorithm. In LPT algorithm the jobs are first sorted in decreasing order of their size and are assigned to the least loaded machine one by one to minimize the makespan.
The time complexity of Algorithm 4 is O(m 2 n).
Theorem 5.1. The worst case bound of Algorithm 4 is ( 19 12 +ǫ). So the worst case makespan T for a set of parallel machines given Energy constraint with non-divisible jobs is ( 19 12 + ǫ) OPT.
Proof. The problem is same as the previous one but with indivisible jobs. When we sort machines in terms of their efficiencies, the last machine which is added to the working set will be given only the marginal energy left. So it can't operate for full makespan. Ideally makespan will be least if we have exact energy to be distributed among r set of machines proportionately such that all machines will be active for the same time. But since this is not always the case, the marginal energy left after selecting r − 1 machines is allotted to machine r. Since time during which machine c r is active is less than the makespan of the system, the Optimal solution will give maximum amount of work possible within the energy margin available to the machine r. Algorithm 4 uses the well known PTAS for subset sum problem to take the maximum subset of jobs that can be assigned to the machine r . So it will return (1 − ǫ)OP T subset size to be assigned to the machine r. These extra jobs that optimal would have assigned to machine r need to be accommodated in the r − 1 machines. In worst case this can increase the makespan of the system by ǫ amount. For scheduling in the r − 1 machines Algorithm 4 uses Longest Processing Time (LPT) algorithm. [35] provided the bound of ( 19 12 )OPT for LPT algorithm applied to a system of parallel machines with different speeds. With this bound, the worst case bound for Algorithm 4 can go up to ( 19 12 + ǫ) OPT.

Minimizing Energy Given Limit on Makespan
Here, given a constraint on makespan T , the problem is to find the optimal subset of machines so that energy consumed is minimized. We divide this problem too between divisible and non-divisible jobs. We show that the problem of minimizing energy given a limit on the makespan with divisible Algorithm 4: Approximation algorithm for reducing makespan given energy budget with indivisible job input : Set of machines (C), number of machines (m), working power of machines (µ(ci)), idle power of machines (γ(ci)), sum of idle power of all the machines (Γ), speed of machines (υ(ci)), energy constraint (E), set of jobs (P), weight of jobs (ψ(pi)) output: Working set (R), makespan (T ) jobs is polynomially solvable whereas with non-divisible jobs it is N P-Hard.
We provide exact and approximation algorithms for these problems respectively.

Divisible Jobs
Like energy, amount of time given for a particular machine is also divisible, i.e., the constraint parameter can be taken in fractions. Hence, it can be formulated in terms of fractional knapsack problem. Energy of the system is given by For energy minimality all machines should be given equal amount of time [34]. Then Hence the problem can be written as We can see that if the jobs are non-divisible this problem becomes N P-Hard otherwise it is not, i.e., since jobs can be arbitrary divisible, this LP formulation is perfectly solvable. If it is non-divisible then, it becomes an integer linear program which is not polynomially solvable.
Algorithm 5 solves this problem in O(m) time. It first sorts the machines based on their efficiencies as described in the previous algorithms. Then it iterates from the most energy efficient machine to least efficient machine assigning maximum job that the machine can complete within the makespan limit. The last machine in the subset of machines chosen is provided with work job that can be finished before makespan for energy minimality.
Algorithm 5: Algorithm for minimizing energy given limit on makespan with divisible job input : Set of machines (C), number of machines (m), working power of machines (µ(c i )), idle power of machines (γ(c i )), sum of idle power of all the machines (Γ), speed of machines (υ(c i )), Makespan limit (T ) output: Working set (R)

Non-divisible Jobs
For non-divisible jobs, the problem formulation becomes an Integer Program which is not solvable in polynomial time. Hence we try to get an approximation algorithm for the same.
As the makespan is fixed, all machines in the working set should be active for the maximum amount of time within this constraint. The optimal algorithm will include least number of most efficient machines from the set of machines to the working set. This implies that any approximation algorithm will include more number of machines than the optimal. If we sort the machines based on their efficiencies and try to include least number of these machines to our working set, we see that this problem reduces to a variant of variable size bin packing problem (VSBP) which is a well studied N P-Hard problem.
There are many variants of the standard one dimensional bin packing problem. The most common is given n items with sizes a 1 , . . . , a n ∈ (0, 1], find a packing in unit-sized bins that minimizes the number of bins used. Here all the bins are assumed to be of same size. The variant of this problem is when bins of different sizes are allowed. Since, in our problem of scheduling to minimize energy given a limit on makespan, each machine is assumed to have different speeds, the time taken to complete a job in one machine may be different than the time taken by other machines to complete the same job. Hence our problem resembles variable size bin packing problem. Hence we model our approximation algorithm based on VSBP problem. Algorithm 6 employs a variant of first fit decreasing algorithm but without sorting the machines based on their order of speed. In FFD algorithm, both bins and jobs are sorted based on their sizes. Here jobs are sorted in non-increasing order of their sizes but machines are sorted based on their efficiencies instead of speeds, which is required for energy minimality. Because of this the bound on Algorithm 6 is not as small as FFD for VSBP. Once sorted, a job is assigned to the most efficient machine within the current working set which can accommodate it within the time constraint. When a job cannot be finished within the makespan limit by any machine in the working set, the next machine is activated and included in the working set. The time complexity of Algorithm 6 is O(mn).
Theorem 6.1. The worst case bound on the number of machines selected by Algorithm 6 is 2.OP T Proof. Proof is on the similar lines as with first fit decreasing algorithm [36]. But we get a higher bound because of not sorting machines based on their speeds.
Let k be the number of machines chosen by the by the algorithm and let k * be the optimal number of machines. We note that the jobs have been sorted in non-increasing order. Let S be the number of most energy efficient machines which can complete all jobs such that all machines are active for the complete makespan. So we have the trivial bound k * ≥ S. Let b ≤ k be an arbitrary machine in the working set of algorithm 6. We will analyze Algorithm 6: Approximation algorithm for reducing energy given limit on makespan with indivisible job input : Set of machines (C), number of machines (m), working power of machines (µ(c i )), idle power of machines (γ(c i )), sum of idle power of all the machines (Γ), speed of machines (υ(c i )), makespan limit (T ), weight of jobs (ψ(p j )) output: Working set (R), energy (E) 18 Return E 19 Return R the following two cases: b is assigned a job which will take > T 2 time on the fastest machine of the system or it is not assigned a job of such size. If such a job takes half the time of makespan on the fastest machine, then surely it will take more time on other machines. Suppose b is assigned a job i which will take T 2 time on the fastest machine. Then the previously considered jobs i ′ < i all will take > T 2 time in any machine and each machine b ′ < b must be assigned one of these jobs, so we have ≥ b jobs of size Tυ max 2 . No two of these jobs can be assigned to the same machine in any assignment, so optimal uses at least b machines, i.e., k * ≥ b.
Suppose b is not assigned a job of size > Tυ max 2 . Then no used machine b ′′ > b is assigned an item of size > Tυ max 2 . But each of these machines must be assigned atleast one job to be included in the working set. So the k − b machines b, b + 1, . . . , k − 1 together are assigned ≥ (k − b) jobs. We know that none of these jobs could have been assigned to any machine b ′ < b. We consider two sub-cases. If b ≤ (k − b), then we can imagine assigning to every machine b ′ < b one of these (k − b) jobs, which would give us b − 1 machines taking time more than the makespan constraint T . This implies that S > b − 1. On the other hand, if b > (k − b), then we can imagine assigning each of the (k − b) jobs to a different machine b ′ < b, giving us (k − b) machines taking more than T time. Then S > (k − b). So for any b we have in all cases that either k * ≥ b or k * ≥ (k − b). Now we choose b so that it will maximize the minimum of b and (k − b) : Equating b = (k − b) gives b = 1 2 k, and we take b = ⌈ 1 2 k⌉ to get an integer. Then we have that Theorem 6.2. The worst case bound on energy E consumed by the working set of parallel machines for non-divisible jobs with Algorithm 6 is given by Proof. Energy consumed by the system of r parallel machines is given by which can be rewritten as Let E represent energy consumed by Algorithm 6 and E OP T be the optimal energy consumption of the system. Also, let r o denote the optimal number of machines and r' denote the number of machines selected by Algorithm 6. We have seen that r ′ = 2r o in the worst case. Then The first part of the equation covers the first r o machines both in the numerator and the denominator. So, the power and speed ratings are same. Since w o (c i ) will be greater than w(c i ) in the numerator, as optimal algorithm will assign all the jobs within the first r o machines, and the approximation algorithm will fail to assign all the jobs to those r o machines and will need extra machines to schedule these jobs. Hence the first part of the equation can be upper bounded by 1.
which is a measure of efficiency of the machine c i , i.e., it is a measure of the amount of energy converted to useful work by the machine. Then Since ΓT is positive and to upper bound the ratio, we can ignore this term in the denominator.
Because the machines are sorted, η is increasing from 1 to m.
Now we are bothered about total size of work assigned to the i = (r o + 1) . . . 2r o machines. If we divide the ratio by r o machines, we get the average size of work assigned by the Algorithm 6 to i = (r o + 1) . . . 2r o machines and the optimal average size.
wo(c i ) ro (6.13) Let us denote the average size of jobs assigned to each machine by any optimal algorithm by X, i.e., X = ro i=1 w(c i ) ro and average size of jobs assigned by Algorithm 6 to i = 1 . . . r o and i = (r o + 1) . . . 2r o machines as Y and Z respectively. E E OP T = 1 + η max Z η min X (6.14) If Z > X 2 , then Y > X 2 . Since we have extra r o machines, we can assign Y to each machine in i = 1 . . . r o . But then the jobs will overflow the time constraint. This means that optimally, r o machines will not be sufficient to accommodate all the jobs which is a contradiction to our assumption that r o is the optimal set of machines. Hence, Z ≤ X 2 .
η min X (6.15) When all machines have same effectiveness ratio, equation 6.16 reduces to the bound of 3 2 for VSBP [36].

Conclusions
This paper provides a generic formulation of the problems of scheduling in a system subject to pairs of constraint on various resources available to its machines. While not going into the details of the specific machines and jobs run by them, the model simply considers each machine to have a working power and an idle power rating, which determines how much power the machine draws, while working and while not. The behavior of the system as a whole is governed by the power ratings of its machines, and the need to run jobs effectively. A simple analysis shows that the problem of minimizing the makespan on a power-constrained system is N P-hard even with divisible jobs. This in turn implies that other interesting problems, and also scheduling problems with non-divisible jobs, are N P-hard as well. We get similar results with energy and makespan constraints with non-divisible jobs.
We can modify the system model a little to get other interesting problems. One such case could be a system model with multiple sources of power, each of which has a different capacity and cost. In such systems, it is also of interest to minimize the overall cost incurred for running a set of jobs. This is easily seen to be N P-hard because if an efficient algorithm for minimal-cost scheduling were to exist, then we could use the same for energy-efficient scheduling by considering only one source supplying power at cost 1 per unit energy.
Given the previous results, it also follows that many complex objectives that mix two or more simpler objectives are likewise intractable. The reason this so is that it is certainly no easier to meet an objective when subjected to a constraint, than it is to meet the objective without the constraint.
While this family of hardness results certainly puts paid to any hopes of easy solutions to problems of scheduling for energy efficiency and other desirable measures of effectiveness, it opens up some interesting possibilities. One direction we think would be fruitful is to further analyze the sub-classes of problems which may permit easy solutions; another would be construct suitable approximation algorithms to achieve objectives within known bounds of the optimal. We have pursued this particular avenue to some extent, and suggest that there is much scope for further work along the same lines.