Input: A set of n movies. A positive integer k. A positive integer q. A function f that takes two movies X, Y, and gives a positive similarity score f(X,Y) in constant time. Task: Design an efficient algorithm that partitions the movies into exactly k disjoint sets such that movies from different sets have a similarity score at most q. If such groups cannot be made, then print 'Unsatisfiable'. Give an efficient algorithm (to the best of your knowledge) and a formal proof of correctness for your algorithm. An answer without any formal proof will be considered incomplete. Analyze the running time of the algorithm. You must write down your algorithm as pseudocode or describe it as a set of steps (as we do in the class). Do not provide code that is written in a code editor using C/C++/Python/Java, etc.
Input: A set of n movies. A positive integer k. A positive integer q. A function f that takes two movies X, Y, and gives a positive similarity score f(X,Y) in constant time.
Task: Design an efficient
Give an efficient algorithm (to the best of your knowledge) and a formal proof of correctness for your algorithm. An answer without any formal proof will be considered incomplete. Analyze the running time of the algorithm.
You must write down your algorithm as pseudocode or describe it as a set of steps (as we do in the class). Do not provide code that is written in a code editor using C/C++/Python/Java, etc.
Step by step
Solved in 2 steps