Algorithms: Sequential, Parallel and Distributed 1-4
15.4 a. The maximum degree of Mq,q,q is 6, achieved for any processor Pi,j,k where 0 < i,j,k < q
– 1, which is directly connected to processors Pi-1,j,k , Pi+1,j,k , Pi,j-1,k , Pi,j+1,k , Pi,j,k-1 , Pi,j,k+1
15.5 a. The maximum degree of
is 8, achieved for any processor Pi,j, where 0 < i,j < q –
1, which is directly connected to processors Pi-1,j , Pi+1,j , Pi,j-1 , Pi,j+1 , Pi-1, j-1 , Pi-1, j+1 , Pi-1, j-1 ,
15.6 a. Our search algorithm for Mq,q,q follows a similar strategy to that given in the text for
the two-dimensional mesh Mq,q. In the first stage, we broadcast the search element x to all
processors as follows. We broadcast x in q – 1 (sequential) steps to (the instantiation of the
distributed variable X for) processors Pi,j,k where j = 0 and k = 0. We then broadcast x in
q – 1 (parallel) steps to all processors where k = 0. Finally, in q – 1 (parallel) steps we