523 views
2 votes
2 votes
Draw a complete binary tree $T$ with $(N − 1)$ nodes where $N = 2^n$. Suppose each node in $T$ is a processor and each edge of $T$ is a physical link between two processors through which they can communicate. Given $M$ arrays $A_i = \{e_{1i}, e_{2i}, \dots, e_{Ni} \}$ for $1 \leq i \leq M$, develop an algorithm for the given architecture to compute the sum of each array $SUM_i = \Sigma^N_{j=1} e_{ji}$ for all $i$ in $O(\log  N + M)$ time.

Please log in or register to answer this question.

Related questions

565
views
0 answers
1 votes
go_editor asked Jun 1, 2016
565 views
A connected, simple, undirected planar graph $G(V, E)$ is given where $V$ denotes the set of vertices and E denotes the set of edges. In $V$, ... .]
522
views
0 answers
1 votes
go_editor asked Jun 1, 2016
522 views
Let $M$ be an $(n \times n)$ matrix where each element is a distinct positive integer. Construct another matrix $M'$ by permuting the rows and/or ... how much additional storage, other than the matrix itself, is required in your algorithm.
366
views
0 answers
1 votes
go_editor asked May 31, 2016
366 views
Consider the $fast \: square$ and $multiply \: algorithm$ to calculate $x^y \: mod \: N$ as given below, where $x, \: y,\: N$ ... , 64-bit unsigned integers). Discuss whether your program works perfectly for all possible input combinations.
338
views
0 answers
1 votes
go_editor asked May 31, 2016
338 views
Consider the $\text{fast square}$ and $\text{multiply algorithm}$ to calculate $x^y \text{ mod } N$ as given below, where $x, \: y,\: N$ are positive integers ... is $O(log^2 \: N)$, when the positive integers involved are less than $N$.]