Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Problem 3 Suppose you have a sequence of jobs, indexed from 1 to N, that you want to run on two processors. For each index
Problem 3 Suppose you have a sequence of jobs, indexed from 1 to N, that you want to run on two processors. For each index i, running job i on processor 1 requires A[i] time, and running job i on processor 2 takes Bli] time. If two jobs i and j are assigned to different processors, there is an additional communication overhead of C[i,j] = C[j,i]. Thus, if we assign the jobs in some subset Sc{1, 2, ..., N} to processor 1, and we assign the remaining N - S jobs to processor 2, then the total execution time is [i] +] + C[i, j]. ies jes iesjes Describe an algorithm to assign jobs to processors so that this total execution time is as small as possible. The input to your algorithm consists of the arrays A[1...N], B[ldotsN], and C[1...N,1...N]. You should briefly justify the correctness of your design and state and analyse its runtime. Hint: Build a graph inspired by the matching example from class and using the inputs A[], B[], C[:] as capacities (your graph does not need to be bipartite!). If the subset S of jobs is assigned to processor 1, what relevant object in your graph captures the execution time? 2
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started