This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: CS 240A Assignment 4: Betweenness Centrality in Graphs Assigned April 26, 2011 Due by 11:59 pm Monday, May 9 In this assignment you’ll parallelize a sequential program that explores a sparse graph. The program computes a value called the “betweenness centrality” (or BC) for each vertex in the graph. The BC of a vertex is a measure of how “central” that vertex is in the graph, defined in the 1970’s by social scientists studying graphs of relationships in societies. The sequential algorithm that’s your starting point is from the paper [Brandes], which contains a good description of BC. BC has also been used as a parallel graph benchmark, and implementations exist in several parallel languages. You will use Cilk to parallelize a sequential C implementation of the Brandes algorithm. All these references are linked to the course web site. Getting good speedups on parallel graph algorithms is tricky. Your goal for this problem will be to run as fast as possible on as big a graph as possible; but don’t be discouraged when the timings don’t match the theory! As usual, you’ll do this in a team of two from different departments, and after its due you’ll swap submissions with another team to write a review. 1 Betweenness centrality A path in a graph is just a sequence of edges joining one vertex to another, and the length of the path is the number of edges. Our graphs will be undirected , meaning that an edge can be used in either direction as part of a path. (Betweenness centrality can be defined for directed graphs too; also, BC can be defined for weighted graphs in which each edge has a weight and the length of a path is the sum of the weights of its edges. But for this assignment we’ll stick to unweighted, undirected graphs.) If I’m a vertex, my betweenness centrality answers the question: How many of the shortest paths between other vertices go through me? To be precise, the betweenness centrality C B ( v ) of vertex v is defined as C B ( v ) = summationdisplay s negationslash = v summationdisplay t negationslash = v σ st ( v ) σ st , (1) where σ st is the number of shortest paths (not their length!) from vertex s to vertex t , and σ st ( v ) is the number of shortest paths from s to t that go through vertex v . Here’s a simple example. Consider the graph with four vertices a , b , c , and d , arranged in a cycle of four edges. The shortest paths from a to c are abc and adc . Therefore σ ac = 2, and σ ac ( b ) = σ ac ( d ) = 1. The sum defining C B ( b ) has two nonzero contributions, of value 1 / 2 each: one from shortest paths from a to c and one from shortest paths from c to a ; thus C B ( b ) = 1....
View
Full
Document
This note was uploaded on 12/27/2011 for the course CMPSC 240A taught by Professor Gilbert during the Fall '09 term at UCSB.
 Fall '09
 GILBERT

Click to edit the document details