Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Exam 3 for Parallel Algorithms | COSC 612, Quizzes of Algorithms and Programming

Material Type: Quiz; Professor: Haynes; Class: Parallel Algorithms; Subject: Computer Science; University: Eastern Michigan University; Term: Unknown 1989;

Typology: Quizzes

2009/2010

Uploaded on 02/24/2010

koofers-user-rca
koofers-user-rca 🇺🇸

10 documents

1 / 5

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
COSC 612 FA09 Test #3 Name:
Open books/notes/internet.
1. Given the unsorted sequence of 8 data items: 11, 21, 4, 8, 2, 9, 13, 1, show the
“comparator network” and the “bitonic merging network” with labeled wires that will
produce the sorted sequence.
Page 1 out of 5
pf3
pf4
pf5

Partial preview of the text

Download Exam 3 for Parallel Algorithms | COSC 612 and more Quizzes Algorithms and Programming in PDF only on Docsity!

COSC 612 FA09 Test #3 Name: Open books/notes/internet.

  1. Given the unsorted sequence of 8 data items: 11, 21, 4, 8, 2, 9, 13, 1, show the “comparator network” and the “bitonic merging network” with labeled wires that will produce the sorted sequence.
  1. Page 386 states that when the bitonic sorting network is implemented on a serial computing, one obtains a (n logn log^2 n) sorting algorithm. In 50 words or less, explain where each term (‘n’, ‘log n’, ‘log n’) comes from.
  2. In the hypercube implementation of the bitonic sort, the parallel run time is (n loglog^2 n) In 50 words or less, explain what can be done in parallel, and why does that reduce the run time by n?
  1. The finite difference method is similar to a an image smoothing solution, where each pixel value is replaced by the average of a 9 element neighborhood:

f(r, c) = (1/9) (  i=r-1 r+1^ ( j=c-1 c+1^ f(i, j) ) )

Or, written out as a window, where f(r, c) is the center element: 1 1 1 1 1 1 1 1 1 Suppose you have a 9 X 9 image. In this problem, Pi communicates data to Pj. The time to communicate 1 pixel value from Pi to Pj is the same as the time to communicate n pixel values from Pi to Pj (n is any number of pixel values). However, when Pi is communicating with Pj, Pi cannot communicate with Pk at the same time. So, for example if Pi has to send a pixel to Pj and a pixel to Pk, that takes two time ticks. The time to communicate is one tick. a. You have 81 PEs. Each PE is responsible for computing the smoothed value of one pixel. Maximizing parallelism in the communications, how many communication ticks are necessary? Show your thinking for partial credit.

b. You have 3 PEs. Each PE is responsible for computing the smoothed value of a contiguous column of pixels. P0: columns 0 - 2; P1: columns 3 - 5, P2: columns 6 - 8. Maximizing parallelism in the communications, how many communication ticks are necessary? Show your thinking for partial credit.