Upcoming SlideShare
×

# Graph Coloring using Peer-to-Peer Networks

841 views

Published on

Published in: Technology
0 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

• Be the first to like this

Views
Total views
841
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
11
0
Likes
0
Embeds 0
No embeds

No notes for slide

### Graph Coloring using Peer-to-Peer Networks

1. 1. Graph Coloring using Peer-to-Peer Networks Adrian Iftene, Cornelius Croitoru {adiftene,croitoru}@infoiasi.ro Faculty of Computer Science “ Al.I.Cuza” University, Iaşi, ROMANIA RoEduNet 2006, Sibiu
2. 2. Content <ul><li>The popularity of distributed file systems come from fault tolerance, availability, scalability and performance </li></ul><ul><li>Our scope is in the cooperative solving of combinatorial optimization problems </li></ul><ul><li>Our approach follows the Content Addressable Network model </li></ul><ul><li>We use this network for the classical “graph coloring” problem, in order to reduce the computational time for its cooperative solving </li></ul>
3. 3. Peer-to-Peer Systems <ul><li>We consider CAN as part of a virtual d -dimensional Cartesian coordinate space. This is a logical space, and it is not related to a specific physical system. </li></ul><ul><li>A 2-dimensional space [0, 100] x [0, 100] with 5 nodes </li></ul>(0,100) (100,100) (0,0) (100,0) C (0-50,50-100) D (50-75,50-100) E (75-100,50-100) A (0-50,0-50) B (50-100,0-50)
4. 4. CAN - Movement <ul><li>Two nodes are neighbours if their coordinates coincide along ( d-1 ) dimensions and differ in only one dimension. </li></ul><ul><li>A route from the source node to the destination node follows the straight path through the Cartesian space </li></ul>6 2 3 1 5 4 k j Neighbours for 1 = {2, 3, 4, 5} Neighbours for 7 = {}
5. 5. CAN - Insertion <ul><li>CAN Insertion starts when a new node looks for a source node which is already in CAN. </li></ul><ul><li>After that, the new node learns the number of CAN dimensions and generates a d -point in this space (this point is called the destination node ). A route from the source node to the destination node follows the straight path through the Cartesian space . </li></ul><ul><li>The destination node splits its zone in half, and assigns one half to the new joining node. </li></ul><ul><li>Finally, the neighbours of the split zone must be notified about the new node. </li></ul>
6. 6. CAN – Insertion – Sample 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 Node 1 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 Node 1 Node 2 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 Node 1 Node 2 Node 3 A node can refuse to split if it thinks it neighbors should be split instead, keeps the load balanced 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 Node 1 Node 2 Node 3 Node 4 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 Node 1 Node 2 Node 3 Node 4 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 Node 1 Node 2 Node 3 Node 4 Node 5 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 Node 1 Node 2 Node 3 Node 5 Node 4 Node 6
7. 7. Graph Coloring <ul><li>The Graph Coloring Problem (GCP) can be simply stated as follows: given a graph G ( V, E ), assign a color to each vertex in V such that no two adjacent vertex have the same color and such that the number of colors used is as least as possible. This minimum possible number of colors is known as the chromatic number of the graph G and it is denoted by  ( G ). </li></ul><ul><li>We want to improve existing parallel solutions (e.g. [5]) with a new objective: speed in finding solution . </li></ul><ul><li>We consider a peer-to-peer cooperative approach to the graph coloring problem and look at its potential to aid the search for good solutions in reasonable time. Our algorithm divide initial problem in sub-problems and involve all neighbors of main node in solution search. </li></ul>
8. 8. Algorithm Phases <ul><li>In first phase , the input vertex set V of the graph G = ( V, E ) is partitioned into p sub-sets { V 1 , V 2 ,..., V p }, cardinality balanced. The subgraphs induced by each subset are sending then to p available neighbors of the main node, for solving. </li></ul><ul><li>In second phase , every node that receives one subgraph solves directly the problem (if the size of the problem is less than one specific value) or recursively; it splits the problem and it sends the sub-problems to its available neighbors. </li></ul><ul><li>In third phase , the main node receives the partial solutions from its neighbors and tries to combine them into final solution. In this phase the main node finds “ conflicts ”. </li></ul><ul><li>Last phase solves the “conflicts” and build the final solution (the solution for initial problem). </li></ul>
9. 9. Recursive Graph Coloring A node from network will initiate a coloring problem All available neighbours will be involved in problem solving In the end all partial solutions are sended to the initiator All nodes will communicate with problem initiator
10. 10. Phases I and II <ul><li>Phase I: For splitting, we used three methods: </li></ul><ul><ul><li>Separator Theorem (Tarjan & Lipton, 1979) ([6]) </li></ul></ul><ul><ul><li>Separation based on neighbor’s number </li></ul></ul><ul><ul><li>Random separation </li></ul></ul><ul><li>Phase II: For coloring we use Greedy Coloring Algorithm [7]: visit the list V ( G ) from the left to the right and for each current node assign a color with the minimum value unused by its neighbors. </li></ul>
11. 11. Phases III and IV <ul><li>Phase III: Two nodes are in “ conflict” if they are in different sub-sets, receive the same color, and are adjacent in the initial graph. </li></ul><ul><li>Phase IV: “ Conflicts” elimination can be done in two ways: </li></ul><ul><ul><li>On-line , when a conflict is detected, it is solved immediately; </li></ul></ul><ul><ul><li>Off-line , only after all conflicts are detected, they are we solved one by one. </li></ul></ul>
12. 12. Tests and Results 78 s 127 s 38 36 35 25 17425 450 Le450-25d 90 s 145 s 39 37 36 25 17343 450 Le450-25c 85 s 129 s 32 32 30 15 16750 450 Le450-15d 79 s 110 s 32 33 30 15 16680 450 Le450-15c 26 s 44 s 18 18 18 5 9757 450 Le450-5d 13 s 20 s 14 15 13 5 5734 450 Le450-5b 14 s 21 s 13, 14 15 13 5 5714 450 Le450-5a 27 s 30 s 25 32 25 16 12640 256 Queen16-16 2 s 1 s 14, 15, 16 17 18 12 3216 128 Queen10-10 1 s 0 s 13, 14, 15 16 14 10 2112 81 Queen9-9 1 s 0 s 12, 13, 14 16 13 9 728 64 Queen8-8 1 s 0 s 15 , 16, 17 17 15 12 1368 96 Queen8-12 1 s 0 s 10, 11 , 12 13 12 7 476 49 Queen7-7 1 s 0 s 9 , 10, 11 13 9 7 290 36 Queen6-6 1 s 0 s 6, 7, 8 , 9 8 7 5 160 25 Queen5-5 1 s 1 s 9, 10 9 10 9 638 120 Games120 0 s 0 s 10 , 11 11 11 10 254 80 Jean 0 s 0 s 11 11 11 11 301 74 Huck 0 s 0 s 11, 12, 13 12 12 11 406 87 David 2 s 1 s 11, 12 12 12 11 493 138 Anna 0 s 0 s 7, 8 8 7 7 755 95 Myciel7 0 s 0 s 6 , 7 7 6 6 236 47 Myciel5 0 s 0 s 5 , 6 6 5 5 71 23 Myciel4 P2P Local Random Order Theorem  Edges Nodes ID
13. 13. Conclusions and Future Work <ul><li>First phase (initial problem splitting) and last phase (conflict elimination) can be improved, but these depend by graph generation. Our algorithm used for graph generation obtains the same structure of graphs and we have not a large variation of graph types. </li></ul><ul><li>Also, we must see what is happening in fail-over situations: in this case the sub-problem must be send again to another neighbor for solving. </li></ul><ul><li>In the future, this kind of approach can help us in graph coloring with a better speed and with a solution close to the optimal. </li></ul><ul><li>With characteristics like decentralization, symmetry, robustness, availability and persistence of data, P2P distributed file system are now an important part of file system research and can be involved with success in future in combinatorial solving of problems. </li></ul>
14. 14. Bibliography <ul><li>A.T. Stephanos, S. Diomidis, “A survey of peer-to-peer content distribution technologies”, ACM Computing Surveys, Vol. 36, No. 4, December 2004. </li></ul><ul><li>H. Ragib, A. Zahid, “A survey of peer-to-peer storage techniques for distributed file system”, National Center for Supercomputing Applications Department of Computer Science, April 2005. </li></ul><ul><li>S. Ratnasamy, P. Francis, “A scalable content–addressable network”, University of California, Berkeley, CA, USA, In ICSI Technical Report, 2001. </li></ul><ul><li>C. Lund, M. Yannakakis, “On the hardness of approximating minimization problems”, Journal of the ACM, 41(5):960--981, 1994 </li></ul><ul><li>A. H. Gebremedhin, F. Manne, “Scalable parallel graph coloring algorithms”, University of Bergen, Norway, Concurrency: Pract. Exper, 2000. </li></ul><ul><li>R.J. Lipton, R. E. Tarjan, “A separator theorem for planar graphs”, SIAM Journal on Applied Mathematics 36, 2, 177—189, 1979. </li></ul><ul><li>J. Culberson, “Iterated greedy graph coloring and the difficulty landscape”, Tech. Rep. 92-07, Department of Computing Science, The University of Alberta, Edmonton, Alberta, Canada, 1992. </li></ul><ul><li>Graphs used in the DIMACS Challenge (Discrete Mathematics & Theoretical Computer Science). DIMACS Center CoRE Building Rutgers, The State University of New Jersey 96 Frelinghuysen Road Piscataway, NJ 08854-8018. Graphs are available at address: http://mat.gsia.cmu.edu/COLORING02/index.html </li></ul>
15. 15. <ul><li>Thank You! </li></ul>