Slide - Computational Complexity Theory 2.0
Slide - Computational Complexity Theory 2.0
COMPUTATIONAL
COMPLEXITY THEORY
Theory of computation
Reference: https://www.youtube.com/watch?v=ZZxj9hqldng
1/17/2023 Chapter 7- Computational Complexity Theory 28
4. Partition Problem
▪ The task of deciding whether a given ▪ Example:
multiset S of positive integers can be • Given S = {3,1,1,2,2,1},
partitioned into two subsets S1 and S2 • a valid solution to the partition
such that: problem is the two sets :
• Sum of numbers in S1 = sum of • S1 = {1,1,1,2} and S2 = {2,3}.
numbers in S2
• Both sets sum to 5, and
• The subsets S1 and S2 must form a they partition S.
partition in the sense that they are
disjoint and they cover S. ▪ Note that this solution is not unique.
▪ A variation of the partition problem is ▪ S1 = {3,1,1} and S2 = {2,2,1} is another
the 3-partition problem, in which the solution.
set S must be partitioned into |S|/3
triples each with the same sum.