Professional Documents
Culture Documents
Complex_computing_problem
Complex_computing_problem
Complex_computing_problem
Dr SHAHEER Muhammad
May 2024
The goal is to determine the optimal allocation of jobs to servers such that
the total profit is maximized without exceeding the energy consumption limits
and ensuring that all jobs are completed before their deadlines.
1.2 Constraints
• Each server can handle only one job at a time.
• The total energy consumption for all servers must not exceed a given limit
Emax .
1
• Each job must be completed by its deadline.
• Jobs cannot be preempted once they start processing on a server.
1.3 Input
• An integer n representing the number of jobs.
• An integer m representing the number of servers.
• An integer Emax representing the maximum allowed energy consumption.
1.4 Output
A schedule of jobs to servers that maximizes the total profit, ensuring all jobs
meet their deadlines and the total energy consumption is within the allowed
limit.
2 Example
2.1 Input
• Jobs: [(10, 100, 5), (20, 200, 10), (30, 150, 7)]
• Servers: [(5, 2), (10, 3)]
• Emax = 50
2.2 Output
• Job 1 assigned to Server 1
• Job 2 assigned to Server 2
2
2.3 Dynamic Programming Approach
To solve this problem using dynamic programming, we can use a state repre-
sentation that includes:
• The subset of jobs considered.
pi
where ti is the time taken to process job i on server s, computed as ti = Ps .
2.4 Steps
• Initialize the DP table.
• Iterate through each job and each possible state.
• For each job and state, try assigning it to each server if it fits within the
deadline and does not exceed the energy budget.
• Update the DP table accordingly.
• The maximum value in the DP table at the end will give the maximum
profit.