Subset Sum - Team Cthuluark/654/team/1/presentation4.pdf · Subset Sum Team Cthulu Tushar Iyer &...

24
Subset Sum Team Cthulu Tushar Iyer & Aziel Shaw Rochester Institute of Technology December 5th, 2018 Tushar | Aziel (RIT) Parallel Computing - Presentation Four December 5th, 2018 1 / 24

Transcript of Subset Sum - Team Cthuluark/654/team/1/presentation4.pdf · Subset Sum Team Cthulu Tushar Iyer &...

Page 1: Subset Sum - Team Cthuluark/654/team/1/presentation4.pdf · Subset Sum Team Cthulu Tushar Iyer & Aziel Shaw Rochester Institute of Technology December 5th, 2018 Tushar j Aziel (RIT)

Subset SumTeam Cthulu

Tushar Iyer & Aziel Shaw

Rochester Institute of Technology

December 5th, 2018

Tushar | Aziel (RIT) Parallel Computing - Presentation Four December 5th, 2018 1 / 24

Page 2: Subset Sum - Team Cthuluark/654/team/1/presentation4.pdf · Subset Sum Team Cthulu Tushar Iyer & Aziel Shaw Rochester Institute of Technology December 5th, 2018 Tushar j Aziel (RIT)

Outline

1 Overview

2 Sequential & Parallel Program SummarySequential ProgramParallel Program

3 Program ScalingStrong ScalingWeak Scaling

4 Future WorkFuture Work

5 ConclusionWhat We LearnedFinal RemarksQuestions

6 Citations

Tushar | Aziel (RIT) Parallel Computing - Presentation Four December 5th, 2018 2 / 24

Page 3: Subset Sum - Team Cthuluark/654/team/1/presentation4.pdf · Subset Sum Team Cthulu Tushar Iyer & Aziel Shaw Rochester Institute of Technology December 5th, 2018 Tushar j Aziel (RIT)

Overview

• Is an NP-Complete problem.

• Given a set of numbers and a target sum, find a set that totals thattarget sum.

• Dynamic Programming algorithm achieves best results both forperformance and parallelization.

Tushar | Aziel (RIT) Parallel Computing - Presentation Four December 5th, 2018 3 / 24

Page 4: Subset Sum - Team Cthuluark/654/team/1/presentation4.pdf · Subset Sum Team Cthulu Tushar Iyer & Aziel Shaw Rochester Institute of Technology December 5th, 2018 Tushar j Aziel (RIT)

Sequential Program

Tushar | Aziel (RIT) Parallel Computing - Presentation Four December 5th, 2018 4 / 24

Page 5: Subset Sum - Team Cthuluark/654/team/1/presentation4.pdf · Subset Sum Team Cthulu Tushar Iyer & Aziel Shaw Rochester Institute of Technology December 5th, 2018 Tushar j Aziel (RIT)

Parallel Program

Tushar | Aziel (RIT) Parallel Computing - Presentation Four December 5th, 2018 5 / 24

Page 6: Subset Sum - Team Cthuluark/654/team/1/presentation4.pdf · Subset Sum Team Cthulu Tushar Iyer & Aziel Shaw Rochester Institute of Technology December 5th, 2018 Tushar j Aziel (RIT)

Strong Scaling - Tabular DataProblem Sizes 1 & 2

Figure 1: No Subset Solution Figure 2: Subset Exists

Tushar | Aziel (RIT) Parallel Computing - Presentation Four December 5th, 2018 6 / 24

Page 7: Subset Sum - Team Cthuluark/654/team/1/presentation4.pdf · Subset Sum Team Cthulu Tushar Iyer & Aziel Shaw Rochester Institute of Technology December 5th, 2018 Tushar j Aziel (RIT)

Strong Scaling - Tabular DataProblem Sizes 3 & 4

Figure 3: No Subset Solution Figure 4: Subset Exists

Tushar | Aziel (RIT) Parallel Computing - Presentation Four December 5th, 2018 7 / 24

Page 8: Subset Sum - Team Cthuluark/654/team/1/presentation4.pdf · Subset Sum Team Cthulu Tushar Iyer & Aziel Shaw Rochester Institute of Technology December 5th, 2018 Tushar j Aziel (RIT)

Strong Scaling - Tabular DataProblem Size 5

Figure 5: No Subset Solution Figure 6: Subset Exists

Tushar | Aziel (RIT) Parallel Computing - Presentation Four December 5th, 2018 8 / 24

Page 9: Subset Sum - Team Cthuluark/654/team/1/presentation4.pdf · Subset Sum Team Cthulu Tushar Iyer & Aziel Shaw Rochester Institute of Technology December 5th, 2018 Tushar j Aziel (RIT)

Strong Scaling - Running Time Vs. Cores

Figure 7: No Subset Solution Figure 8: Subset Exists

Tushar | Aziel (RIT) Parallel Computing - Presentation Four December 5th, 2018 9 / 24

Page 10: Subset Sum - Team Cthuluark/654/team/1/presentation4.pdf · Subset Sum Team Cthulu Tushar Iyer & Aziel Shaw Rochester Institute of Technology December 5th, 2018 Tushar j Aziel (RIT)

Strong Scaling - Speedup Vs. Cores

Figure 9: No Subset Solution Figure 10: Subset Exists

Tushar | Aziel (RIT) Parallel Computing - Presentation Four December 5th, 2018 10 / 24

Page 11: Subset Sum - Team Cthuluark/654/team/1/presentation4.pdf · Subset Sum Team Cthulu Tushar Iyer & Aziel Shaw Rochester Institute of Technology December 5th, 2018 Tushar j Aziel (RIT)

Strong Scaling - Efficiency Vs. Cores

Figure 11: No Subset Solution Figure 12: Subset Exists

Tushar | Aziel (RIT) Parallel Computing - Presentation Four December 5th, 2018 11 / 24

Page 12: Subset Sum - Team Cthuluark/654/team/1/presentation4.pdf · Subset Sum Team Cthulu Tushar Iyer & Aziel Shaw Rochester Institute of Technology December 5th, 2018 Tushar j Aziel (RIT)

Strong Scaling - Thoughts

Strong Scaling Hypothesis• We scale better with larger problem sizes

• Overall, we scale better when we do not find a solution

• Diminishing returns is hit sooner on smaller sizes, likely due to thefact that we find a solution sooner

Tushar | Aziel (RIT) Parallel Computing - Presentation Four December 5th, 2018 12 / 24

Page 13: Subset Sum - Team Cthuluark/654/team/1/presentation4.pdf · Subset Sum Team Cthulu Tushar Iyer & Aziel Shaw Rochester Institute of Technology December 5th, 2018 Tushar j Aziel (RIT)

Weak Scaling - Tabular DataProblem Sizes 1 & 2

Figure 13: No Subset Solution Figure 14: Subset Exists

Tushar | Aziel (RIT) Parallel Computing - Presentation Four December 5th, 2018 13 / 24

Page 14: Subset Sum - Team Cthuluark/654/team/1/presentation4.pdf · Subset Sum Team Cthulu Tushar Iyer & Aziel Shaw Rochester Institute of Technology December 5th, 2018 Tushar j Aziel (RIT)

Weak Scaling - Tabular DataProblem Sizes 3 & 4

Figure 15: No Subset Solution Figure 16: Subset Exists

Tushar | Aziel (RIT) Parallel Computing - Presentation Four December 5th, 2018 14 / 24

Page 15: Subset Sum - Team Cthuluark/654/team/1/presentation4.pdf · Subset Sum Team Cthulu Tushar Iyer & Aziel Shaw Rochester Institute of Technology December 5th, 2018 Tushar j Aziel (RIT)

Weak Scaling - Tabular DataProblem Size 5

Figure 17: No Subset Solution Figure 18: Subset Exists

Tushar | Aziel (RIT) Parallel Computing - Presentation Four December 5th, 2018 15 / 24

Page 16: Subset Sum - Team Cthuluark/654/team/1/presentation4.pdf · Subset Sum Team Cthulu Tushar Iyer & Aziel Shaw Rochester Institute of Technology December 5th, 2018 Tushar j Aziel (RIT)

Weak Scaling - Running Time Vs. Cores

Figure 19: No Subset Solution Figure 20: Subset Exists

Tushar | Aziel (RIT) Parallel Computing - Presentation Four December 5th, 2018 16 / 24

Page 17: Subset Sum - Team Cthuluark/654/team/1/presentation4.pdf · Subset Sum Team Cthulu Tushar Iyer & Aziel Shaw Rochester Institute of Technology December 5th, 2018 Tushar j Aziel (RIT)

Weak Scaling - Sizeup Vs. Cores

Figure 21: No Subset Solution Figure 22: Subset Exists

Tushar | Aziel (RIT) Parallel Computing - Presentation Four December 5th, 2018 17 / 24

Page 18: Subset Sum - Team Cthuluark/654/team/1/presentation4.pdf · Subset Sum Team Cthulu Tushar Iyer & Aziel Shaw Rochester Institute of Technology December 5th, 2018 Tushar j Aziel (RIT)

Weak Scaling - Efficiency Vs. Cores

Figure 23: No Subset Solution Figure 24: Subset Exists

Tushar | Aziel (RIT) Parallel Computing - Presentation Four December 5th, 2018 18 / 24

Page 19: Subset Sum - Team Cthuluark/654/team/1/presentation4.pdf · Subset Sum Team Cthulu Tushar Iyer & Aziel Shaw Rochester Institute of Technology December 5th, 2018 Tushar j Aziel (RIT)

Weak Scaling - Thoughts

Weak Scaling Hypothesis• We do not weak scale very well

• As with Strong scaling our non-solution is better than when we find asolution

• Also, as with Strong Scaling, we get better performance with largersets

Tushar | Aziel (RIT) Parallel Computing - Presentation Four December 5th, 2018 19 / 24

Page 20: Subset Sum - Team Cthuluark/654/team/1/presentation4.pdf · Subset Sum Team Cthulu Tushar Iyer & Aziel Shaw Rochester Institute of Technology December 5th, 2018 Tushar j Aziel (RIT)

Future Work

• Allow both positive and negative inputs

• Allow for multiple numeric data types

• Implement C/CUDA variation

Tushar | Aziel (RIT) Parallel Computing - Presentation Four December 5th, 2018 20 / 24

Page 21: Subset Sum - Team Cthuluark/654/team/1/presentation4.pdf · Subset Sum Team Cthulu Tushar Iyer & Aziel Shaw Rochester Institute of Technology December 5th, 2018 Tushar j Aziel (RIT)

What We Learned

• Variations of the SubsetSum algorithm [Bok11] [RMGF14] [PM15]

• How to implement SubsetSum using the PJ2 library [Kam]

• More experience with using interface (Spec) objects

Tushar | Aziel (RIT) Parallel Computing - Presentation Four December 5th, 2018 21 / 24

Page 22: Subset Sum - Team Cthuluark/654/team/1/presentation4.pdf · Subset Sum Team Cthulu Tushar Iyer & Aziel Shaw Rochester Institute of Technology December 5th, 2018 Tushar j Aziel (RIT)

Final Remarks

• From our tests it is apparent our initial thoughts were correct

I Scaling is non-idealI We believe we are seeing diminishing returnsI Time increases as the level of work increases

Tushar | Aziel (RIT) Parallel Computing - Presentation Four December 5th, 2018 22 / 24

Page 23: Subset Sum - Team Cthuluark/654/team/1/presentation4.pdf · Subset Sum Team Cthulu Tushar Iyer & Aziel Shaw Rochester Institute of Technology December 5th, 2018 Tushar j Aziel (RIT)

Questions

Any Questions?

Tushar | Aziel (RIT) Parallel Computing - Presentation Four December 5th, 2018 23 / 24

Page 24: Subset Sum - Team Cthuluark/654/team/1/presentation4.pdf · Subset Sum Team Cthulu Tushar Iyer & Aziel Shaw Rochester Institute of Technology December 5th, 2018 Tushar j Aziel (RIT)

References

Saniyah S. Bokhari, Parallel solution of the subset-sum problem: Anempirical study, Ohio State University, 2011, Date Accessed:September 24, 2018URL: https://pdfs.semanticscholar.org/f3fc/b462b7366ab7d91febe5fb92113535ff63dd.pdf.

Alan Kaminsky, Parallel java 2 library.

Dushan Petkovski and Igor Mishkovski, Parallel implementation of themodified subset sum problem in opencl, ICT Innovations 2015, WebProceedings ISSN null (2015), 144–153, Date Accessed: October 3,2018URL: http://proceedings.ictinnovations.org/attachment/paper/395/parallel-implementation-of-the-modified-subset-sum-

problem-in-opencl.pdf.

Z. Ristovski, I. Mishkovski, S. Gramatikov, and S. Filiposka, Parallelimplementation of the modified subset sum problem in cuda, 923–926,Date Accessed: September 19, 2018URL: https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=7034556.Tushar | Aziel (RIT) Parallel Computing - Presentation Four December 5th, 2018 24 / 24