23
Solving the Independent Set Problem Solving the Independent Set Problem using the Exhausted Search Algorithm using the Exhausted Search Algorithm in parallel. in parallel. Parallel Computing I Parallel Computing I

“Solving the Independent Set Problem using the Exhausted Search Algorithm in parallel.” Parallel Computing I

Embed Size (px)

Citation preview

Page 1: “Solving the Independent Set Problem using the Exhausted Search Algorithm in parallel.” Parallel Computing I

““Solving the Independent Set Problem using the Solving the Independent Set Problem using the Exhausted Search Algorithm in parallel.Exhausted Search Algorithm in parallel.””

Parallel Computing IParallel Computing I

Page 2: “Solving the Independent Set Problem using the Exhausted Search Algorithm in parallel.” Parallel Computing I

Understanding ConceptsUnderstanding ConceptsIndependent Set Problem

◦NP problem related to graph theory

Independent set◦Subset of vertices S in a given graph◦No two vertices are adjacent

There is no edge directly connecting any two vertices in the set S

Page 3: “Solving the Independent Set Problem using the Exhausted Search Algorithm in parallel.” Parallel Computing I

Understanding ConceptsUnderstanding ConceptsSize of an independent set

The number of vertices it contains, is the size of the vertices in the independent set.

Page 4: “Solving the Independent Set Problem using the Exhausted Search Algorithm in parallel.” Parallel Computing I

Example of an independent setExample of an independent set

Independent set of size 9(Blue vertices)

Image Source: http://en.wikipedia.org/wiki/File:Independent_set_graph.svg

Page 5: “Solving the Independent Set Problem using the Exhausted Search Algorithm in parallel.” Parallel Computing I

Exhaustive search algorithmExhaustive search algorithmGenerated the matrix using the random number

generator

Adjacency Matrix stores the graph

Generation of all possible subsets of a size I

Finding all the independent sets of size I

Page 6: “Solving the Independent Set Problem using the Exhausted Search Algorithm in parallel.” Parallel Computing I

DNA tiles self-assembly ALGORITHM DNA tiles self-assembly ALGORITHM

• Non-deterministic Guess• Logical AND Operation• Results Store in Middle

Algorithm from the first research paper.Algorithm from the first research paper.

Source: Zhen Cheng; Jianhua Xiao, "Implementation of Maximum Independent Set Problem by Algorithmic Tile Self-Assembly," Bio-Inspired Computing: Theories and Applications (BIC-TA), 2011 Sixth International Conference on , vol.,

no., pp.249,254, 27-29 Sept. 2011

Page 7: “Solving the Independent Set Problem using the Exhausted Search Algorithm in parallel.” Parallel Computing I

Subtraction And ComparisonSubtraction And ComparisonComparison between Right and Bottom

Left

Algorithm from the first research paper.(contd.)Algorithm from the first research paper.(contd.)

Source: Zhen Cheng; Jianhua Xiao, "Implementation of Maximum Independent Set Problem by Algorithmic Tile Self-Assembly," Bio-Inspired Computing: Theories and Applications (BIC-TA), 2011 Sixth International Conference on , vol.,

no., pp.249,254, 27-29 Sept. 2011

Page 8: “Solving the Independent Set Problem using the Exhausted Search Algorithm in parallel.” Parallel Computing I

Finding a Near-Maximum Independent Set of Finding a Near-Maximum Independent Set of a Circle Grapha Circle Graph

Non-intersected Neurons

Intersected Neurons (Graph Vertices)

Algorithm from the second research paper.Algorithm from the second research paper.

Source : Takefuji, Y.; Chen, L.-L.; Lee, K.-C.; Huffman, J., "Parallel algorithms for finding a near-maximum independent set of a circle graph," Neural Networks, IEEE Transactions on , vol.1, no.3, pp.263,267, Sep 1990

Page 9: “Solving the Independent Set Problem using the Exhausted Search Algorithm in parallel.” Parallel Computing I

The test bed is an EREW P-RAM parallel computer with non-concurrent read-write cycles for the same memory locations.

Below are the algorithm characteristics as mentioned. ‘EO’ depicts the

expected value of complexity and since the third algorithm is deterministic in nature, the time complexity is not expected in form.

Alg. - # Processors Used Time Complexity Random Bits1 O(m) EO((log n)2) EO(n log n)2 O(m) EO((log n)2) EO((log n)2)3 O(n2m) O((log n)2) none

* Each while loop has O(log n) complexity and there would be O(log n) while loop runs

Algorithm from the third research paper.Algorithm from the third research paper.

Source : Luby, Michael. "A simple parallel algorithm for the maximal independent set problem." SIAM journal on computing 15, no. 4 (1986): 1036-1053.

A simple parallel algorithm for the maximal A simple parallel algorithm for the maximal independent set problem.independent set problem.

Page 10: “Solving the Independent Set Problem using the Exhausted Search Algorithm in parallel.” Parallel Computing I

Algorithm 1 – Based upon the local property which takes any random vertex into

consideration and adds it to the set if it is not connected to any of its adjacent vertices.

So pairwise independence is the driving factor for this configuration. This local property is basically the conversion of mutually independent

events in the large sample space to pairwise independent events in comparatively smaller sample space.

Algorithm 2 – uses the concept of randomly generated bits to choose the smaller sample

space from the larger one and the Algorithm 3 – does this in parallel, picking up the vertices which confirm to pairwise

independence in separate steps making it deterministic.

Algorithm from the third research paper.(contd.)Algorithm from the third research paper.(contd.)

Source : Luby, Michael. "A simple parallel algorithm for the maximal independent set problem." SIAM journal on computing 15, no. 4 (1986): 1036-1053.

A simple parallel algorithm for the maximal A simple parallel algorithm for the maximal independent set problem.independent set problem.

Page 11: “Solving the Independent Set Problem using the Exhausted Search Algorithm in parallel.” Parallel Computing I

Design of the parallel program.Design of the parallel program.Finding the independent sets –

◦The loop iterating over 1 to T(total number of possible subsets of vertices) is divided over the number of processors available.

◦Each processor is supplied with different possibilities of choices as inputs to the exhaustive search algorithm in the form of different loop indexes to work with.

◦The list in which the independent sets are stored has been made thread safe.

◦The number of independent subsets are recorded in the thread safe integer variable.

Page 12: “Solving the Independent Set Problem using the Exhausted Search Algorithm in parallel.” Parallel Computing I

Design of the parallel program.Design of the parallel program.Load Balancing:-

◦It is not necessary that the running time of all the threads will be the same. It is not necessary that there will be the same number of subsets

of size I. The calculation time of checking an independent set also varies

◦A guided schedule is used for balancing the load.

Page 13: “Solving the Independent Set Problem using the Exhausted Search Algorithm in parallel.” Parallel Computing I

Design of the parallel program.Design of the parallel program.Note - The printout of the resulting independent sets

in the cases of sequential and parallel programs will be different, but the total number of solutions found remains the same.

Page 14: “Solving the Independent Set Problem using the Exhausted Search Algorithm in parallel.” Parallel Computing I

Design of the parallel program.Design of the parallel program.

Page 15: “Solving the Independent Set Problem using the Exhausted Search Algorithm in parallel.” Parallel Computing I

Demo with the usage of the Demo with the usage of the ProgramsPrograms

Page 16: “Solving the Independent Set Problem using the Exhausted Search Algorithm in parallel.” Parallel Computing I

Performance Metrics MeasuredPerformance Metrics MeasuredNotations for the performance metrics:-

◦N : Problem size◦T : Running time◦K: Number of processors

The performance metrics are the speedup of the program as following:-◦1.) The ratio of the running time of the sequential program

with respect to the running time of the parallel program. Speedup(N,K) = Tseq(N,1)/Tpar(N,K)

◦2.) Efficiency = Speedup(N,K)/K

Page 17: “Solving the Independent Set Problem using the Exhausted Search Algorithm in parallel.” Parallel Computing I

Performance Metrics MeasuredPerformance Metrics Measured

Page 18: “Solving the Independent Set Problem using the Exhausted Search Algorithm in parallel.” Parallel Computing I

Performance Metrics MeasuredPerformance Metrics Measured

Page 19: “Solving the Independent Set Problem using the Exhausted Search Algorithm in parallel.” Parallel Computing I

Performance Metrics MeasuredPerformance Metrics Measured

Page 20: “Solving the Independent Set Problem using the Exhausted Search Algorithm in parallel.” Parallel Computing I

Lessons LearnedLessons LearnedAt a smaller scale, a NP problem might be simpler to

solveBut increasing the size of the graph poses a huge

complexity in terms of computational time.This project provided us a chance to learn how to

optimize code designs for parallel architectures as high performance scientific computing problems.

The Parallel Java Library, developed by Prof. Alan Kaminsky, made it easy to design the parallel programs in Java.

Page 21: “Solving the Independent Set Problem using the Exhausted Search Algorithm in parallel.” Parallel Computing I

Future WorkFuture WorkA cluster version of the same program can also be

made◦That program can be run on the cluster parallel computer

like RIT CS Paranoia 32-Processor Cluster.

An analysis can be made that whether this problem is a good candidate for a GPU parallel program or not. ◦If the analysis says yes, then a GPU parallel program can be

made for it.

Page 22: “Solving the Independent Set Problem using the Exhausted Search Algorithm in parallel.” Parallel Computing I

ReferencesReferences 1.) Zhen Cheng; Jianhua Xiao, "Implementation of Maximum Independent

Set Problem by Algorithmic Tile Self-Assembly," Bio-Inspired Computing: Theories and Applications (BIC-TA), 2011 Sixth International Conference on , vol., no., pp.249,254, 27-29 Sept. 2011

2.) Takefuji, Y.; Chen, L.-L.; Lee, K.-C.; Huffman, J., "Parallel algorithms for finding a near-maximum independent set of a circle graph," Neural Networks, IEEE Transactions on , vol.1, no.3, pp.263,267, Sep 1990

3.) Luby, Michael. "A simple parallel algorithm for the maximal independent set problem." SIAM journal on computing 15, no. 4 (1986): 1036-1053.

4.) Alan Kaminsky. Building Parallel Programs: SMPs, Clusters, and Java. Cengage Course Technology, 2010. ISBN 1-4239-0198-3.

5.) L. H. Holley and M. Karplus, “Protein secondary structure prediction with a neural network,” Proc. Nar. Acad. Sci. USA, vol. 86,1989.

6.) Parallel Java Library developed by Prof. Alan Kaminsky

Page 23: “Solving the Independent Set Problem using the Exhausted Search Algorithm in parallel.” Parallel Computing I