SampleMidterm2-2010

# SampleMidterm2-2010 - CS 140 Sample Midterm 2 Questions...

This preview shows pages 1–2. Sign up to view the full content.

CS 140 Sample Midterm 2 Questions -- March 2010 You may use your textbook and notes, but no other books or computers. Problem 1 [30 points total] : Short answers. (1a) [10 points] Draw a graph that has two maximal independents sets of different sizes, and identify both maximal independent sets. (Your graph should have 5 vertices or less.) (1b) [10 points] Give two reasons why many computations on large graphs perform poorly on conventional distributed-memory parallel computers. (1c) [10 points] Why doesn't everyone use shared-memory parallel computers instead of distributed-memory parallel computers? Problem 2 [35 points total] This problem is about Jacobi iteration to solve the temperature problem on an k -by- k grid (with n = k 2 points), using a message-passing distributed memory machine. As usual, the effect of one iteration is to replace each value x i with the average of its four neighboring values, using the boundary values if the point x i is next to the edge of the region. For this problem, each processor has k/p rows of the grid. Assume k is divisible by p . Here’s a picture for k = 20 and p = 4 : To analyze the computation and communication time, use the following assumptions: Computation time only counts + , - , * , and / operations on floating point numbers, and each arithmetic operation takes one unit of time. Communication time counts both startup and data time, so the time to send or receive a

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 12/27/2011 for the course CMPSC 140 taught by Professor Gilbert during the Fall '11 term at UCSB.

### Page1 / 3

SampleMidterm2-2010 - CS 140 Sample Midterm 2 Questions...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online