• No results found

Midterm examination Parallel Algorithms (WISM 459).

N/A
N/A
Protected

Academic year: 2021

Share "Midterm examination Parallel Algorithms (WISM 459)."

Copied!
2
0
0

Bezig met laden.... (Bekijk nu de volledige tekst)

Hele tekst

(1)

Midterm examination Parallel Algorithms (WISM 459).

Teacher: Rob H. Bisseling, Utrecht University October 24, 2012

Each of the four questions is worth 10 points. Total time 60 minutes.

1. What is the value h of the h-relation defined by the following table?

P (0) P (1) P (2) P (3)

P (0) 19 10

P (1) 19 5 6

P (2) 21 10

P (3) 9 5 6

In the table, the value in row s and column t is the number of data words that processor P (s) sends to processor P (t), for 0 ≤ s, t < 4.

2. Explain the difference between local and global indices. Use the cyclic distribution of a vector for your explanation.

3. Give an efficient BSP algorithm for processor P (s) (in the notation we learned) for the computation of the output vector y defined by yi = xi + xn−1−i, for 0 ≤ i < n, starting from a given input vector x. The length of the vectors is n. Assume both vectors are block distributed and that n mod p = 0.

4. Let x be an array of length n containing numerical values xi, where 0 ≤ i < n. The first stage of the Haar wavelet transform replaces each pair (xi, xi+1) by the pair (xi + xi+1, xi − xi+1), for all even i. The original pair is overwritten. The second stage does the same for all pairs (xi, xi+2), where i is a multiple of 4. The third stage does the same for all pairs (xi, xi+4), where i is a multiple of 8. And so on for the following stages. There are log2n stages. Our aim is to do this in

1

(2)

parallel, using a suitable data distribution, and p processors. Assume that p  n, and that n and p are powers of 2. On output, the vector x must be in distributed form. Give an efficient BSP algorithm for processor P (s) for this computation. Analyse the BSP cost.

2

Referenties

GERELATEERDE DOCUMENTEN

(a) [5 pt] Give an efficient BSP algorithm with 2 supersteps, in the notation we have learned for processor P (s, t), 0 ≤ s, t &lt; M , for the computation of the matrix C = AB,

Analyse the BSP cost; if necessary, make additional assumptions in

A vector of length 150 has been distributed over 12 processors of a parallel computer by a block distribution with varying block length.. The data are redistributed into the

Made available in electronic form by the T BC of A−Eskwadraat In 2006/2007, the course WISM459 was given by Rob

Made available in electronic form by the T BC of A−Eskwadraat In 2005/2006, the course WISM459 was given by Rob

Made available in electronic form by the T BC of A−Eskwadraat In 2005/2006, the course WISM459 was given by Rob

The exam grade is equal to the obtained number of points divided by

 Poorly-distributed rainfall during the past week has sustained moisture deficits over the dry portions of Central America. 1) Although an increase in rainfall has been observed