weighted matchings & applications in scientific computing

52
Weighted Matchings & Applications in Scientific Computing Mahantesh Halappanavar Department of Computer Science Joint Work with: Florin Dobrian and Alex Pothen 11 JULY 2007 Graduate Student Tech Lunch ODU

Upload: havyn

Post on 09-Feb-2016

68 views

Category:

Documents


0 download

DESCRIPTION

Weighted Matchings & Applications in Scientific Computing. Mahantesh Halappanavar Department of Computer Science. Joint Work with: Florin Dobrian and Alex Pothen. 11 JULY 2007 Graduate Student Tech Lunch ODU. Contents:. Motivation Matchings - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Weighted Matchings &  Applications in Scientific Computing

Weighted Matchings & Applications in Scientific Computing

Mahantesh HalappanavarDepartment of Computer Science

Joint Work with: Florin Dobrian and Alex Pothen

11 JULY 2007 Graduate Student Tech Lunch ODU

Page 2: Weighted Matchings &  Applications in Scientific Computing

Contents:

Motivation Matchings Maximum Cardinality Matching Maximum Edge-Wt Matching Maximum Vertex-Wt Matching Approximation Algorithms

Page 4: Weighted Matchings &  Applications in Scientific Computing

A Stable Marriage?

Residents prefer R1: H1 > H2 > H3 R2: H2 > H3 > H4

Hospitals prefer H1: R1 > R2 > R3 H2: R2 > R3 > R4

Ideally R1 is matched to H1 Marriage is unstable if:

Neither gets a preferred match. Example: R1 is matched to H2

R1

R2

H1

H2

Page 6: Weighted Matchings &  Applications in Scientific Computing
Page 7: Weighted Matchings &  Applications in Scientific Computing

What is the Big Deal?

Millions of Advertisers Billions of Key-words Probability of a “Click” Split-second responses (Online) Daily budgets

Solution: Approximation !!

Page 8: Weighted Matchings &  Applications in Scientific Computing

Contents:

Motivation Matchings Maximum Cardinality Matching Maximum Edge-Wt Matching Maximum Vertex-Wt Matching Approximation Algorithms

Page 9: Weighted Matchings &  Applications in Scientific Computing

What is a Graph?

A graph G=(V,E) is a triple: A set of vertices V, A set of edges E, and A relationship that associates each edge

with two vertices. Types: Bipartite and Nonbipartite

R1

R2

H1

H2

V1

V3

V2

Page 10: Weighted Matchings &  Applications in Scientific Computing

What is a Matching?

Given a graph G=(V,E), a matching M is a subset of edges such that no two edges are incident on the same vertex.

Types: Maximum Cardinality, Maximum Edge-weighted, and Maximum Vertex-weighted

R1

R2

H1

H2

V1

V3

V2

Page 11: Weighted Matchings &  Applications in Scientific Computing

Classification

Page 12: Weighted Matchings &  Applications in Scientific Computing

How to Search a Graph?

Basic Data Structures:

A Pseudo-Queue No duplicates (move to the back of Q)

A Pseudo-Stack No duplicates (move to the top of S)

Page 13: Weighted Matchings &  Applications in Scientific Computing

Breadth-first Search (Queue)

Page 14: Weighted Matchings &  Applications in Scientific Computing

Depth-first Search (Stack)

Page 15: Weighted Matchings &  Applications in Scientific Computing

How to Compute a Matching?

Alternating (a & b) / Augmenting (c) paths:

Symmetric difference:

Page 16: Weighted Matchings &  Applications in Scientific Computing

How does this work?

Lemma 1: Consider a graph G=(V,E), and a matching M. Let P be an augmenting path in G with respect to M. The symmetric difference, M’=MP, is a matching of cardinality (|M|+1).

Lemma 2: Suppose that in a graph G=(V,E) there exist no augmenting path starting from an unmatched vertex uV with respect to a matching M. Let P be an augmenting path with endpoints two other unmatched vertices v and w, then there is no augmenting path from u with respect to MP either.

Lemma 3: A matching M in a graph G is a maximum matching if and only if there exist no M-augmenting paths in G.

Page 17: Weighted Matchings &  Applications in Scientific Computing

How to Find Augmenting Paths?

1. Single-Source Single-Path

Page 18: Weighted Matchings &  Applications in Scientific Computing

…Finding Augmenting Paths?

2. Multiple-Source Single-Path

Page 19: Weighted Matchings &  Applications in Scientific Computing

…Finding Augmenting Paths?

3. Multiple-Source Multiple-Path

Page 20: Weighted Matchings &  Applications in Scientific Computing

Nonbipartite Graphs?

* www.cs.brown.edu/courses/cs250/culture.html

Jack Edmonds*

"Jack Edmonds has been one of the creators of the field of combinatorial optimization and polyhedral combinatorics. His 1965 paper 'Paths, Trees, and Flowers' was one of the first papers to suggest the possibility of establishing a mathematical theory of efficient combinatorial algorithms . . . " [from the award citation of the 1985 John von Neumann Theory Prize].

Reading: "A Glimpse of Heaven" taken from History of Mathematical Programming: A Collection of Personal Reminiscences.

Page 21: Weighted Matchings &  Applications in Scientific Computing

“Eureka, you shrink!”

Page 22: Weighted Matchings &  Applications in Scientific Computing

What is hard?

Bipartite Nonbipartite

Cardinality

Weighted

)( mnO )( mnO

))log(( nnmnO ))log(( nnmnO

Page 23: Weighted Matchings &  Applications in Scientific Computing

Contents:

Motivation Matchings Maximum Cardinality Matching Maximum Edge-Wt Matching Maximum Vertex-Wt Matching Approximation Algorithms

Page 24: Weighted Matchings &  Applications in Scientific Computing

Basic Algorithm for MCM

Page 25: Weighted Matchings &  Applications in Scientific Computing

Advanced Algorithm for MCM

Page 26: Weighted Matchings &  Applications in Scientific Computing

A Survey of Algorithms for MCM

Page 27: Weighted Matchings &  Applications in Scientific Computing

Contents:

Motivation Matchings Maximum Cardinality Matching Maximum Edge-Wt Matching Maximum Vertex-Wt Matching Approximation Algorithms

Page 28: Weighted Matchings &  Applications in Scientific Computing

Primal-dual Formulation for MEM

Intuition:

Page 29: Weighted Matchings &  Applications in Scientific Computing

Primal-dual Formulation for MEM

Page 30: Weighted Matchings &  Applications in Scientific Computing

An Algorithm for MEM

Page 31: Weighted Matchings &  Applications in Scientific Computing

Power of Data Structures

Update Variables

Simple Vectors

Binary Heaps

Fibonacci Heaps)log( nmO

)( 2nO

)log( nnmO

Weighted Matching for Bipartite Graphs

|||,| EmVn

Page 32: Weighted Matchings &  Applications in Scientific Computing

A Survey of Algorithms for MEM

Page 33: Weighted Matchings &  Applications in Scientific Computing

Contents:

Motivation Matchings Maximum Cardinality Matching Maximum Edge-Wt Matching Maximum Vertex-Wt Matching Approximation Algorithms

Page 34: Weighted Matchings &  Applications in Scientific Computing

Why Vertex-weighted?

The Sparsest-Basis Problem

Page 35: Weighted Matchings &  Applications in Scientific Computing

How does this work?

Page 36: Weighted Matchings &  Applications in Scientific Computing

Decomposition of MVM

Page 37: Weighted Matchings &  Applications in Scientific Computing

Algorithm: Global-Optimal

Page 38: Weighted Matchings &  Applications in Scientific Computing

Algorithm: Local-Optimal

Page 39: Weighted Matchings &  Applications in Scientific Computing

Our Contributions:

Page 40: Weighted Matchings &  Applications in Scientific Computing

Contents:

Motivation Matchings Maximum Cardinality Matching Maximum Edge-Wt Matching Maximum Vertex-Wt Matching Approximation Algorithms

Page 41: Weighted Matchings &  Applications in Scientific Computing

Approximation Algorithms:

Edge-weightedVertex-weighted

Page 42: Weighted Matchings &  Applications in Scientific Computing

1: Global-Max

Page 43: Weighted Matchings &  Applications in Scientific Computing

2: LAM

Page 44: Weighted Matchings &  Applications in Scientific Computing

3: Path-growing

Page 45: Weighted Matchings &  Applications in Scientific Computing

A survey of Approx MEM

Page 46: Weighted Matchings &  Applications in Scientific Computing

Approximation Algorithms:

Edge-weightedVertex-weighted

Page 47: Weighted Matchings &  Applications in Scientific Computing

AMVM: Global-Half

Page 48: Weighted Matchings &  Applications in Scientific Computing

AMVM: Local-Half

Page 49: Weighted Matchings &  Applications in Scientific Computing

AMVM: Global-Two-Third

Page 50: Weighted Matchings &  Applications in Scientific Computing

AMVM: Local-Two-Third

Page 51: Weighted Matchings &  Applications in Scientific Computing

Our contributions:

Page 52: Weighted Matchings &  Applications in Scientific Computing

Thank You !