This preview shows pages 1–2. Sign up to view the full content.
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 youll 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 1970s by social scientists studying graphs of relationships in societies. The sequential algorithm thats 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 dont be discouraged when the timings dont match the theory! As usual, youll do this in a team of two from different departments, and after its due youll 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 well stick to unweighted, undirected graphs.) If Im 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 . Heres 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
- Fall '09