Methods for Solving Subset Sum Problems - PowerPoint PPT Presentation

1 / 27
About This Presentation
Title:

Methods for Solving Subset Sum Problems

Description:

Department of Management, University of Canterbury, Private Bag 4800, Christchurch, New Zealand ... For this application we introduce a 'tolerance' level ... – PowerPoint PPT presentation

Number of Views:1027
Avg rating:3.0/5.0
Slides: 28
Provided by: rjj3
Category:

less

Transcript and Presenter's Notes

Title: Methods for Solving Subset Sum Problems


1
Methods for Solving Subset Sum Problems
  • Ross James and Bob Storer
  • Department of Management, University of
    Canterbury,Private Bag 4800, Christchurch, New
    Zealand
  • ross.james_at_canterbury.ac.nz

2
Combination Weighers
3
The Subset Sum Problem
  • Minimise
  • Subject to
  • where wi is the weight of product in bucket i.

4
Small Problem Results
  • For this application we introduce a tolerance
    level whereby if we find a feasible solution that
    has
  • we use this solution and do not explore any
    further.

5
Number Partitioning
  • Splits a set of numbers in two in order to
    minimise the difference in the sums of the two
    sets
  • Special case of Subset Sum, where the requirement
    is ½ the total weight
  • Number Partitioning Problems can be converted to
    Subset Sum problems by adding a dummy item.
  • Care in terms of Subset Sum being one-sided

6
Number Partitioning
  • Karmarker and Karp (1982) proposed a very
    efficient differencing heuristic for solving
    number partitioning problems
  • Korf (1998) incorporated this into a branch and
    bound framework

7
Example
  • Want to get a minimum of 50
  • Add Dummy item of weight 8

8
Example Continued
9
Example Continued
10
Example Continued
11
Solution Techniques
  • Seeded Complete Karmarkar Karp (SCKK)
  • Enumeration
  • Direct Search
  • Heuristic Direct search

12
SCKK Technique
  • Starts with the KK solution which has been
    modified to ensure feasibility
  • From the Feasible starting solution the BB Tree
    is created
  • BB Depth First Search continues from this point

13
SCKK Example
14
Enumeration
  • Starts with a feasible solution
  • Sorts Taken and Non-Taken items in Non-decreasing
    weight order
  • Recursively examines all solutions
  • Drops and adds items in no decreasing order
  • Allows large sections of the solution space to be
    ignored

15
Enumeration Example
  • Start with 5,3,1 as taken, 4, 2 as not taken,
    Best Value 57
  • Drop 5, add 4, Value 58. Solution Bounded
  • Drop 3, add 4, Value 54. Solution Bounded
  • Drop 1, add 4, Value 47, Infeasible so Add 2 as
    well, Value 67
  • Drop 1, add 2, Value 52

16
Direct Search
  • Based on the premise of quickly fine tuning a
    good solution
  • Based on initially keeping number of items taken
    the same.
  • The number of items taken changes once all
    possibilities have been tried
  • Items are sorted in ascending order to speed up
    execution
  • All moves involving 1 item are tried first, then
    2 etc.

17
Direct Search Example
Moving a Single Item
18
Direct Search Example
Moving Two Items
19
Heuristic Direct Search
  • Uses the same Direct Search framework but only
    considers swapping 1 item before making a move.
  • Does not guarantee that the optimal will be
    found, so needs a termination condition

20
Computational Experiments
  • All algorithms coded in MS Visual C
  • Run on Windows XP, 1.53GHz AMD Athol XP
    Processor, 1 Gab Ram

21
Small Problems
  • 50 Randomly generated problems
  • 32 Containers
  • Requirements of 8, 10, 16
  • Both normal (mean of 1, std dev of 0.1, 0.2, 0.3)
    and uniform (0.7,1.3, 0.4,1.6,0.1,1.9)
    weight distributions tested
  • Tolerance of 10-8

22
Small Problem Results
  • Direct Search did not perform at all well on
    small problems
  • CKK performed well for requirements of 16 which
    is closes to the number partitioning situation
  • Enumeration was the fastest method when the
    requirements were 8 or 10

23
Small Problem Results
  • CKK and SCKK slowed down considerably when the
    requirement was 10.
  • Enumeration liked smaller variances in the data,
    whereas CKK and SCKK generally performed better
    with more variance
  • CKK outperforms SCKK for these problems
  • Enumeration performs better on Normal data while
    CKK/SCKK performs better on Uniform data

24
Large Problems
  • 30 randomly generated problems of 200 items
  • Requirements were 100 and 50
  • Normally distributed data, with same mean and
    standard deviations as the small problems
  • Tolerance of 10-8

25
Large Problem Results
26
Large Problems Results
  • CKK could not be run due to excessive time
    requirements
  • SCKK could not be run on when the data standard
    deviation was 0.1 and requirement was 50
  • Direct Search and Heuristic Direct Search were
    clearly superior, with solutions times an order
    of magnitude smaller than the SCKK

27
Questions
  • ?
Write a Comment
User Comments (0)
About PowerShow.com