Title: Ant Based Optimization for Multiway Graph Partition
1Ant Based Optimization for Multiway Graph
Partition
- Ezra Nugroho
- February 28th, 2005
2Outline
- Problem Definition
- Ant Based Optimization (ABO) and Ant
Colony Optimization (ACO) - ABO for Multiway Graph Partitioning (ABMGP)
- Conclusion
3Outline
- Problem Definition
- Ant Based Optimization (ABO) and Ant
Colony Optimization (ACO) - ABO for Multiway Graph Partitioning (ABMGP)
- Conclusion
4Problem Multiway Graph Partition
- Input
- G (V, E) an undirected graph
- k an integer from 2 to V
- Output
- S1, , Sk k disjointed subsets of V such that
- Si n Sj ø for i ? j
- U Si V
- Si ? ø for i 1, , k
- Sl - Ss 1, Sl the largest subset, Ss the
smallest one - Goal
- The crossing edges between subsets are minimized
5Problem Further Definitions
- Other name Graph k-way Partition Problem
- (a, k)-Partition Problem, also called Ratio Cut
Problem - Allows unbalanced partition
- Sl a V , Sl the largest subgraph
- 2-way Partition Problem is often called the
Bisection Problem - The size of the set of crossing edges is called
the cutsize
62-way Partition
72-way Partition
Cutsize 6
82-way Partition
Cutsize 6
92-way Partition
102-way Partition
Cutsize 2
11Problem Complexity
- Multiway Graph Partition Problem is NP-hard
- Approximating good cut size for general graph is
NP-hard - The bisection problem is NP-hard, even for
bipartite graphs - Exact polynomial algorithm exists for trees and
planar graphs with O(log n) optimal cutsize
12Problem Complexity (cont)
- Let V n, the size of search space for
the k-way partition problem is - Grows very fast as n increases
13Problem Applications
- Circuit Design
- Scheduling for parallel processing
- Initial Process for Divide and Conquer algorithms
- General Layout Network design, Routing, etc.
14Problem Existing Algorithms
- KernighanLin algorithm for bisection
- Recursive KernighanLin
- Pairwise KernighanLin
- Cyclic k-way Partitioning Algorithm
- Other Heuristics and Hybrid Algorithms
- Genetic Algorithms
- Simulated Annealing
- Tabu Search
- Hybrid Ant Based Algorithm
15Outline
- Problem Definition
- Ant Based Optimization (ABO) and Ant
Colony Optimization (ACO) - ABO for Multiway Graph Partitioning (ABMGP)
- Conclusion
16ABO/ACO Similarities
- Agent-based Optimization
- Inspired by ant colonies
- Inspired by other animals ? animats
- Animats use pheromones to send signals to others
- Good in identifying possible good solution
- Cannot fine-tune solutions
17Ant Based Optimization (ABO)
- Multi Agents, one solution
- Animats move in parallel
- Problem domain clustering, landscape
identification
18Ant Colony Optimization (ACO)
- One agent, one solution
- Usually Animats move serially
- Problem domain path problems
19ABO/ACO Applications
- ABO
- k-Cardinality Tree problem
- Clique problem
- Bisection problem
- Etc.
- ACO
- TSP
- Quadratic Assignment
- Routing
- Etc.
20Outline
- Problem Definition
- Ant Based Optimization (ABO) and Ant
Colony Optimization (ACO) - ABO for Multiway Graph Partitioning (ABMGP)
- Conclusion
21ABMGP Algorithm Overview
- Phase 1
- 20 rounds of finding good candidate solutions and
locally optimize them - Phase 2
- Fully optimize the best candidate solution
22ABMGP Algorithm Detail
- Phase 1
- 20 rounds of finding good candidate solutions and
locally optimize them - Phase 2
- Fully optimize the best candidate solution
23ABMGP Algorithm Detail
- Phase 1
- Create initial k-way partition
- for round 1 to 20
- for iteration 1 to max
- Place animats in vertices
- if (progressing)
- Run animats
- else
- Perform random jumps (jolt)
- end if-else
- Rebalance with certain probability
- Record good partition
- end
- Push the best solution from this round closer to
an optimum - end
- Phase 2
- Fully optimize the absolute best solution
24ABMGP Algorithm Detail
- Create initial k-way partition
- for round 1 to 20
- for iteration 1 to max
- Place animats in vertices
- if (progressing)
- Run animats
- else
- Perform random jumps (jolt)
- end if-else
- Rebalance with certain probability
- Record good partition
- end
- Push the best solution from this round closer to
an optimum - end
- Fully optimize the absolute best solution
25ABMGP Animat Activation
- Ideas
- We use k colonies of territorial animats, each
territory is a subgraph - Animats try to enlarge their territory by
attacking other animats in different vertices - Animats use pheromones to communicate with each
other to encourage collaborative decisions
defending vertices, attacking vertices - An Animat captures a vertex v if it defeats the
last animat in v
26ABMGP Animat Activation
No Way!
We want that vertex!
27ABMGP Animat Activation
28ABMGP Animat Activation
Attacker wins, defender is removed
29ABMGP Animat Activation
30ABMGP Animat Activation
Attacker looses, it waits for next iteration
31ABMGP Animat Activation
32ABMGP Animat Activation
Attacker wins, defender is removed
33ABMGP Animat Activation
Attacker wins, defender is removed
34ABMGP Animat Activation
vertex is captured
35ABMGP Animat Activation
The colonies are updated
36ABMGP Algorithm Detail
- Create initial k-way partition
- for round 1 to 20
- for iteration 1 to max
- Place animats in vertices
- if (progressing)
- Run animats
- else
- Perform random jumps (jolt)
- end if-else
- Rebalance with certain probability
- Record good partition
- end
- Push the best solution from this round closer to
an optimum - end
- Fully optimize the absolute best solution
37ABMGP Jolts
- Pairs of vertices from different colonies are
randomly chosen - Swap the owner
- Adjusts the pheromone levels
38ABMGP Algorithm Detail
- Create initial k-way partition
- for round 1 to 20
- for iteration 1 to max
- Place animats in vertices
- if (progressing)
- Run animats
- else
- Perform random jumps (jolt)
- end if-else
- Rebalance with certain probability
- Record good partition
- end
- Push the best solution from this round closer to
an optimum - end
- Fully optimize the absolute best solution
39ABMGP Algorithm Detail
- KernighanLin algorithm for Bisection
- Starting with a bisection (A, B)
- Cut size is reduced by swapping pairs of vertices
- Identify pairs of vertices (a, b) that reduce the
cut size the most - Vertices in these pairs are swapped
- Repeat
402-way Partition
Cutsize 6
412-way Partition
A
A
(A, A) gain 0
Cutsize 6
422-way Partition
B
A
A
(A, A) gain 0 (B, B) gain 4
B
Cutsize 6
432-way Partition
B
A
A
B
Cutsize 2
44ABMG Algorithm Detail
- Weaker derivation of Pairwise KernighanLin
Algorithm - Cut size between subgraph pairs are computed
- Pairs are sorted according to their cut sizes
- Run KL for bisection algorithm for each pair
- Some vertex-swaps are considered
45ABMGP Algorithm Detail
- Phase 1
- 20 rounds of finding good candidate solutions and
locally optimize them - Phase 2
- Fully optimize the best candidate solution
46ABMG Algorithm Detail
- Full Pairwise KernighanLin Algorithm
- Cut size between subgraph pairs are computed
- Pairs are sorted according to their cut sizes
- Run KL for bisection algorithm for each pair
- All possible vertex-swaps are considered
47ABMGP Test Bed
- 40 Graphs from 8 different classes
- Size from 100 5252
- Average degree from 2 to 36
- Random and geometric
48ABMGP Implementation
- ABMGP is implemented in C
- 3.06 Ghz Xeon Processor
- 2 G of RAM
- Linux
- 100 runs for each graph
49ABMGP Result for bisection
50ABMGP Result 4-way Partition
51ABMGP Result for 8-way Partition
52ABMGP Result for 32-way Partition
53Outline
- Problem Definition
- Ant Based Optimization (ABO) and Ant
Colony Optimization (ACO) - ABO for Multiway Graph Partitioning (ABMGP)
- Conclusion
54Conclusion
- ABMGP is given
- Hybrid of ABO and Pairwise KL
- Generally results are competitive
- ABMGP does not excel in every direction
- ABMGP matches many best known solution
- ABMGP also finds several new best known