550 likes | 743 Views
Ant Based Optimization for Multiway Graph Partition. Ezra Nugroho February 28 th , 2005. Outline. Problem Definition Ant Based Optimization (ABO) and Ant Colony Optimization (ACO) ABO for Multiway Graph Partitioning (ABMGP) Conclusion. Outline. Problem Definition
E N D
Ant Based Optimization for Multiway Graph Partition Ezra Nugroho February 28th, 2005
Outline • Problem Definition • Ant Based Optimization (ABO) and Ant Colony Optimization (ACO) • ABO for Multiway Graph Partitioning (ABMGP) • Conclusion Ezra Nugroho
Outline • Problem Definition • Ant Based Optimization (ABO) and Ant Colony Optimization (ACO) • ABO for Multiway Graph Partitioning (ABMGP) • Conclusion Ezra Nugroho
Problem: 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∩ Sj = ø for i ≠ j • USi = 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 Ezra Nugroho
Problem: Further Definitions • Other name: Graph k-way Partition Problem • (α, k)-Partition Problem, also called Ratio Cut Problem • Allows unbalanced partition • |Sl| ≤ α |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 Ezra Nugroho
2-way Partition Ezra Nugroho
2-way Partition Cutsize = 6 Ezra Nugroho
2-way Partition Cutsize = 6 Ezra Nugroho
2-way Partition Ezra Nugroho
2-way Partition Cutsize = 2 Ezra Nugroho
Problem: 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 Ezra Nugroho
Problem: Complexity …(cont) • Let |V | = n, the size of search space for the k-way partition problem is • Grows very fast as n increases Ezra Nugroho
Problem: Applications • Circuit Design • Scheduling for parallel processing • Initial Process for Divide and Conquer algorithms • General Layout: Network design, Routing, etc. Ezra Nugroho
Problem: Existing Algorithms • Kernighan–Lin algorithm for bisection • Recursive Kernighan–Lin • Pairwise Kernighan–Lin • Cyclic k-way Partitioning Algorithm • Other Heuristics and Hybrid Algorithms • Genetic Algorithms • Simulated Annealing • Tabu Search • Hybrid Ant Based Algorithm Ezra Nugroho
Outline • Problem Definition • Ant Based Optimization (ABO) and Ant Colony Optimization (ACO) • ABO for Multiway Graph Partitioning (ABMGP) • Conclusion Ezra Nugroho
ABO/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 Ezra Nugroho
Ant Based Optimization (ABO) • Multi Agents, one solution • Animats move in parallel • Problem domain: clustering, landscape identification Ezra Nugroho
Ant Colony Optimization (ACO) • One agent, one solution • Usually Animats move serially • Problem domain: path problems Ezra Nugroho
ABO/ACO : Applications • ABO: • k-Cardinality Tree problem • Clique problem • Bisection problem • Etc. • ACO: • TSP • Quadratic Assignment • Routing • Etc. Ezra Nugroho
Outline • Problem Definition • Ant Based Optimization (ABO) and Ant Colony Optimization (ACO) • ABO for Multiway Graph Partitioning (ABMGP) • Conclusion Ezra Nugroho
ABMGP: Algorithm Overview • Phase 1 • 20 rounds of finding good candidate solutions and locally optimize them • Phase 2 • Fully optimize the best candidate solution Ezra Nugroho
ABMGP: Algorithm Detail • Phase 1 • 20 rounds of finding good candidate solutions and locally optimize them • Phase 2 • Fully optimize the best candidate solution Ezra Nugroho
ABMGP: 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 Ezra Nugroho
ABMGP: 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 Ezra Nugroho
ABMGP: 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 Ezra Nugroho
ABMGP: Animat Activation No Way! We want that vertex! Ezra Nugroho
ABMGP: Animat Activation Ezra Nugroho
ABMGP: Animat Activation Attacker wins, defender is removed Ezra Nugroho
ABMGP: Animat Activation Ezra Nugroho
ABMGP: Animat Activation Attacker looses, it waits for next iteration Ezra Nugroho
ABMGP: Animat Activation Ezra Nugroho
ABMGP: Animat Activation Attacker wins, defender is removed Ezra Nugroho
ABMGP: Animat Activation Attacker wins, defender is removed Ezra Nugroho
ABMGP: Animat Activation vertex is captured Ezra Nugroho
ABMGP: Animat Activation The colonies are updated Ezra Nugroho
ABMGP: 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 Ezra Nugroho
ABMGP: Jolts • Pairs of vertices from different colonies are randomly chosen • Swap the owner • Adjusts the pheromone levels Ezra Nugroho
ABMGP: 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 Ezra Nugroho
ABMGP: Algorithm Detail • Kernighan–Lin 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 Ezra Nugroho
2-way Partition Cutsize = 6 Ezra Nugroho
2-way Partition A’ A (A, A’) gain = 0 Cutsize = 6 Ezra Nugroho
2-way Partition B A’ A (A, A’) gain = 0 (B, B’) gain = 4 B’ Cutsize = 6 Ezra Nugroho
2-way Partition B A A’ B’ Cutsize = 2 Ezra Nugroho
ABMG: Algorithm Detail • Weaker derivation of Pairwise Kernighan–Lin 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 Ezra Nugroho
ABMGP: Algorithm Detail • Phase 1 • 20 rounds of finding good candidate solutions and locally optimize them • Phase 2 • Fully optimize the best candidate solution Ezra Nugroho
ABMG: Algorithm Detail • Full Pairwise Kernighan–Lin 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 Ezra Nugroho
ABMGP: Test Bed • 40 Graphs from 8 different classes • Size from 100 – 5252 • Average degree from 2 to 36 • Random and geometric Ezra Nugroho
ABMGP: Implementation • ABMGP is implemented in C++ • 3.06 Ghz Xeon Processor • 2 G of RAM • Linux • 100 runs for each graph Ezra Nugroho
ABMGP: Result for bisection Ezra Nugroho
ABMGP: Result 4-way Partition Ezra Nugroho