290 likes | 524 Views
Workshop assignment problem. Sarah Applegate Spring 2010. outline. Problem Origin Motivation Description Restrictions Representation Proof NP NP-Complete. Problem Origin.
E N D
Workshop assignment problem Sarah Applegate Spring 2010
outline • Problem • Origin • Motivation • Description • Restrictions • Representation • Proof • NP • NP-Complete
Problem Origin The problem is how to assign each of two kinds of workshops, which take a certain amount of time to complete, to each adviser, who has a set amount of time in which they are free from other obligations.
Problem Motivation • Scheduling Problems • Operating Systems • Personnel • Conferences
Problem Description • There are two kinds of workshops, A and B. • There are N workshops • Each workshop, whether type A or type B takes a unique amount of time to grade. • There are M graders • Any grader, i, has a unique amount of time Ti to dedicate to grading workshops.
Problem Description • Given: N workshops, with unique types and time requirements, and M graders, with unique time availabilities. • Question: How do we assign each workshop to the available graders so that every workshop is graded in the available time?
Assumption • Each grader grades at the same pace
Restriction 1 • Ignore multiple types of workshops
Restriction 1 • There are N workshops • Any workshop, i, requires a unique amount of time Ti to grade • There are M graders • Any grader, j, has a unique amount of time Tj to dedicate to grading workshops.
Restriction 1 • Given: N workshops, with unique time requirements, and M graders, with unique time availabilities. • Question: How do we assign each workshop to the available graders so that every workshop is graded in the available time?
Restriction 2 • Create a Decision Problem
Restriction 2 • Given: N workshops, with unique time requirements, and M graders, with unique time availabilities. • Question: Can we assign each workshop to the available graders so that every workshop is graded in the available time?
Problem Representation • Given: N workshops and M graders, where any workshop can be assigned to any grader. • For each i, workshop i takes Ti time to grade and, for each j, grader j has Tj available time. • Question: Can the workshops be assigned to the graders so that all of them can be graded?
Proof: NP • If we are given a ‘Yes’ instance of WAP and its solution we can verify the solution in polynomial time.
Proof: Np for j = 1 to M Sum the Ti ‘s assigned to grader j Compare this value to Tj This requires O(MN) to complete
Proof: NP-Complete • Partition =>p WAP • Partition Problem: • Given: a set S • Question: Can we partition S into two subsets A and B such that ∑Ai = ∑Bi?
Proof: NP-Complete • Accept any instance of Partition, S • Let n = |S| and B = ∑Si • Assign Ti = Si for 1 ≤ i ≤ n • Let there be two grades, G1 and G2 • G1 and G2 both have B time available • Solve the created instance of WAP • This is the answer for the instance of Partition
Proof: NP-Complete • Yes Instance • No Instance
References Computers and Intractability: A Guide to the Theory of NP-Completeness.Garey, Michael and Johnson, DavidW. H. Freeman and Company, 1979.