Question

You are given n jobs and m machines where each machine has a subset of machines...

You are given n jobs and m machines where each machine has a subset of machines that they are able to be processed on. Using the Ford-Fulkerson algorithm, construct an algorithm that determines the smallest integer where no machine gets assigned more jobs than.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

We will reduce this problem to max-flow problem which uses Ford-Fulkerson algorithm. For this we will create a graph G as follows:-

1. First create bipartite graph with set L as set of jobs and vertex set R as set of machines.

2. Create a directed edge with capacity 1 unit from vertex u in set L to vertex v in set R if the job u can be served by machine v.

3. Now add a vertex s to be used as the source vertex and create directed edges with capacity 1 unit from vertex s to each vertex in set L.

4. Add a vertex t to be used as the sink vertex and create directed edges with from all the vertices in set R to vertex t. The capacity of vertex R to t will decide the maximum number of loads on each machine.

Now our goal is to find the minimum integer capacity that can be assigned to the edges from vertex set R of machines to vertex t such that total flow received on pushing max-flow from source vertex s to target vertex t is n. Hence if the minimum capacity value of edges from set R to vertex t is k then this means that there will be a machine serving k jobs, in order to get all the jobs served. Hence the value k obtained from above will be our answer. In other words, k is the smallest integer where no machine get more than k jobs.

Below is the algorithm named Smallest_Load with input to the algorithm is graph G which perform Ford-Fulkerson algorithm from vertex s to t by setting value of k from 1 to n and it will stop for that particular value of k in which total flow received at t is n i.e. total number of jobs.

Smallest_Load(G)

1. For k = 1 to n //since maximum value of k can be n in which all the n jobs will be served by single machine

2............Assign capacity k to all the edges from machine set V to target vertex t.

3............Push max-flow using Ford-Fulkerson algorithm from source s to target t.

4............If max-flow == n then //this means maximum load given to a machine is k

5.......................Return k //maximum jobs that can be served by a machine will be k

6. Return

Thus above algorithm will give desired result by performing Ford-Fulkerson algorithm at most n times .

Please comment for any clarification.

Add a comment
Know the answer?
Add Answer to:
You are given n jobs and m machines where each machine has a subset of machines...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Exercise 10.10 (Job shop scheduling) A factory consists of m machines M1, , Mm, and needs to proc...

    Exercise 10.10 (Job shop scheduling) A factory consists of m machines M1, , Mm, and needs to process n jobs every day. Job j needs to be processed once by each machine in the order (M,a)M(m)). Machine M takes time Pij to process job j. A machine can only process one job at a time, and once a job is started on any machine, it must be processed to complet is to minimize the sum of the completion times of...

  • Three jobs are to be assigned to three machines. Cost for each job-machine combination appears in...

    Three jobs are to be assigned to three machines. Cost for each job-machine combination appears in the table below. Perform the assignment method to determine the job assignment. Machine A Machine B Machine C Job 1 11 8 6 Job 2 8 10 11 Job 3 9 12 7 Select one: a. Machine A gets Job 1, Machine B gets Job 3 and Machine C gets Job 2. b. Machine A gets Job 2, Machine B gets Job 3 and...

  • Consider a small machine shop where each worker can operate all the machines but operates some of...

    Consider a small machine shop where each worker can operate all the machines but operates some of the machines better than others. On any given day there are a number of jobs which have to be completed. For this situation, the problem facing management, is how to obtain the fastest turnaround time for all jobs. The time it takes to perform an average job for each of these workers is as follows: Drilling Grinding Lathework Joe 5 10 6 Jack...

  • The input to the ThreeMachineMakespan is a set of n jobs each with a processing time...

    The input to the ThreeMachineMakespan is a set of n jobs each with a processing time . A feasible solution assigns each job to one of three machines. The sum of the processing times of the jobs assigned to a machine is the time that machine is required to run. The makespan is the maximum time any of the three machines must run​. Define a local search algorithm for ThreeMachineMakespan and run it on the instance {2, 2, 2, 4,...

  • 1. a) Describe an O(m)-time algorithm that, given a set of S of n distinct numbers...

    1. a) Describe an O(m)-time algorithm that, given a set of S of n distinct numbers and a positive integer k c n, determines the top k numbers in s b) Describe an O(n)-time algorithm that, given a set of S of n distinct numbers and a positive integer k < n, determines the smallest k numbers in S.

  • You are given a set of integer numbers A = {a1, a2, ..., an}, where 1...

    You are given a set of integer numbers A = {a1, a2, ..., an}, where 1 ≤ ai ≤ m for all 1 ≤ i ≤ n and for a given positive integer m. Give an algorithm which determines whether you can represent a given positive integer k ≤ nm as a sum of some numbers from A, if each number from A can be used at most once. Your algorithm must have O(nk) time complexity.

  • (25pts) You are given two sorted lists of size m and n. Give an O(log m...

    (25pts) You are given two sorted lists of size m and n. Give an O(log m log n) time algorithm for computing the k-th smallest element in the union of the two lists Note that the only way you can access these values is through queries to the databases. Ina single query, you can specify a value k to one of the two databases, and the chosen database will return the k-th smallest value that it contains. Since queries are...

  • You are given an algorithm that uses T(n) a n2b.3" basic operations to solve a problem...

    You are given an algorithm that uses T(n) a n2b.3" basic operations to solve a problem of size n, where a and b are some real non-negative constants. Suppose that your machine can perform 400,000,000 basic operations per second (a) If a = b = 1, how long does it take for your algorithm to solve problems of size n = 10, 20, 50. For each size of n, include the time in seconds and also using a more appropriate...

  • Arena Simulation. Five identical machines operate independently in a small shop. Each machine is up (i.e.,...

    Arena Simulation. Five identical machines operate independently in a small shop. Each machine is up (i.e., works) for between six and ten hours (uniformly distributes) and then breaks down. There are two repair technicians available, and it takes one technician between one and three hours (uniformly distributed) to fix a machine; only one technician can be assigned to work on a broken machine even if the other technician is idle. If more than two machines are broken down at a...

  • You are tallying votes from an election in which n people voted. If any candidate gets...

    You are tallying votes from an election in which n people voted. If any candidate gets more than half (at least ⌊n/2⌋ + 1 votes), they win. Otherwise a runoff election is needed. For privacy reasons you are not allowed to look at any one ballot, but you have a machine that can take any two ballots and answer the question: “are these two ballots for the same candidate, or no?” (a) Design and analyze a divide and conquer algorithm...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT