Presentation is loading. Please wait.

Presentation is loading. Please wait.

Applying bitwise operations for solving combinatorial optimization problems Mikhail Batsyn 1, Larisa Komosko 1, Alexey Nikolaev 1, Pablo San Segundo 2.

Similar presentations


Presentation on theme: "Applying bitwise operations for solving combinatorial optimization problems Mikhail Batsyn 1, Larisa Komosko 1, Alexey Nikolaev 1, Pablo San Segundo 2."— Presentation transcript:

1 Applying bitwise operations for solving combinatorial optimization problems Mikhail Batsyn 1, Larisa Komosko 1, Alexey Nikolaev 1, Pablo San Segundo 2 1 LATNA Laboratory, Higher School of Economics, Russia 2 Centro de Automática y Robótica (CAR), UPM-CSIC, Spain

2 Bitwise operations Binary data can be represented as bit strings CPU has such bitwise operations as: V – or & – and – xor popcnt – population count (number of 1-bits) lsb/msb – least/most significant bit index 128 bits in 1 operation (fraction of nanosecond) 2

3 Bitwise operations Find the first neighbour: lsb Leave only neighbours: & Add neighbours: V Hamming distance:, popcnt Crossover in GA: V 3

4 Vertex colouring problem Independent set partition problem Clique partition problem SF (Smallest-First) algorithm GIS (Greedy Independent Sets) algorithm BnB (Branch and Bound) algorithm 4

5 Bitwise SF algorithm c i – the colour of vertex i F – the matrix of forbidden colours. If F ki =1 then colour k is forbidden for vertex i. F = 0 for i = 1..n c i = min{k | F ki = 0} Fc i = Fc i V A i end 5

6 Bitwise GIS algorithm ____ B = A – the matrix of non-neighbours c i = 0, k = 1 while ∃ i c i = 0 while B i ≠ 0 j * = min{j | B ij = 1} c j * = k B i = B i & B j * end k = k + 1 end 6

7 Bitwise branch and bound Same operations as in bitwise SF algorithm Different colours are checked for every vertex 7

8 Computational results for SF 8 |V|50010005000 DensitySpeedup 0.013.23.4 0.103.03.33.7 0.203.53.94.5 0.304.04.55.1 0.404.24.95.5 0.504.34.95.2 0.603.84.5 0.703.33.93.8 0.802.73.33.4 0.902.22.53.0 0.991.81.92.9

9 Computational results for SF 9 G(V,E)|V||E|Speedup brock200_1200148342.8 brock200_220098763.2 brock200_3200120485.3 brock200_4200130892.7 brock400_1400597233.0 brock400_2400597862.8 brock400_3400596813.0 brock400_4400597652.7 brock800_18002075053.9 brock800_28002081664.0 brock800_38002073333.8 brock800_48002076434.4 c-fat200-120015341.6 c-fat200-220032352.7 c-fat200-520084732.0

10 Computational results for SF On Erdos-Renyi graphs the average speedup is greater for bigger graphs: 3.3 times for 500 vertices, 3.7 – for 1000, and 4.1 – for 5000. Average speedup on DIMACS is 2.6 times. 10

11 Maximum clique problem 11 1 9 2 83 4 5 7 6 10 12 16 13 14 15 Objective: find a complete subgraph of maximum size

12 Maximum clique problem 12 1 9 2 11 83 4 5 7 6 10 12 16 13 14 15

13 Branch and bound 13 Current clique: {1} Subgraph of candidates: {2, 10, 11, 15, 16}

14 14 Current clique: {1, 16} Subgraph of candidates: {10, 11, 15} Branch and bound

15 15 Current clique: {1, 16, 15} Subgraph of candidates: {10, 11} Branch and bound

16 BnB algorithm Q – the current clique (initially Q = ∅ ) C – the candidates to the current clique ( C = V ) Clique (Q, C) for v ∈ C C = C \ {v} Q’ = Q’ ∪ {v} C’ = C ∩ N v if C’ ≠ ∅ Clique (Q’, C’) else if |Q’| > |Q * | Q * = Q’ 16

17 Computational results 17 InstanceMCSBBMCXRS Speedup brock400_1384,74167,81 2,3 brock400_2166,3670,15 2,4 brock400_3269,29119,62 2,3 brock400_4134,3669,71 1,9 brock800_15215,952568,36 2,0 brock800_24713,612346,49 2,0 brock800_33152,911660,29 1,9 brock800_42333,281101,47 2,1 gen400_p0.9_5535013,122296,73 1,6 gen400_p0.9_6565290107577,9 0,6 gen400_p0.9_759355190351,98 1,0 keller577010,252797,5 1,5 MANN_a45105,5244,62 2,4 p_hat300-31,580,75 2,1 p_hat500-356,3136,48 1,5 p_hat700-31337,55689,46 1,9

18 Computational results 18 InstanceMCSBBMCXRS Speedup p_hat1000-2116,0871,97 1,6 p_hat1000-3540000208854,6 2,6 p_hat1500-12,682 1,3 p_hat1500-29040,296824,25 1,3 sanr200_0.916,259,32 1,7 sanr400_0.7104,2751,28 2,0 san10001,050,59 1,8 frb30-15-136000970,29 37,1 frb30-15-236000675,46 53,3 frb30-15-336000314,88 114,3 frb30-15-4360001002,85 35,9 frb30-15-536000673,13 53,5


Download ppt "Applying bitwise operations for solving combinatorial optimization problems Mikhail Batsyn 1, Larisa Komosko 1, Alexey Nikolaev 1, Pablo San Segundo 2."

Similar presentations


Ads by Google