Lecture 8 Notes


Info iconThis preview shows page 1. Sign up to view the full content.

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

Unformatted text preview: rallel opportunities in this pattern is similar to the Divide‐and‐Conquer pattern with the following three properties: 1) there are natural initial division boundaries in the problem; 2) there are frequent, and well defined reduction and synchronization points in the algorithm; and 3) number of fan‐ins are strictly limited by the problem. The two main difference compared to the Divide‐and‐Conquer pattern is: 1) the presence of overlapping shared sub‐problems, and 2) exponential size of the overall problem, which prohibits starting with the problem as a whole and then apply the divide‐and‐conquer techniques. In this pattern, the starting point is often the naturally defined set of sub‐problems, and computation is often limited to a wave‐ front of sub‐problems. However, finding an efficient recursive relation of the problem may be non‐trivial. If this is the case try to express the problem using the Divide‐and‐Conquer pattern or Backtrack, Branch‐and‐Bound pattern first. Forces • • Inherent forces (regardless to the implementation platform) o Top­down or Bottom­up. Compared to the bottom‐up approach the top‐down approach has some overheads which are: (1) recursively splitting the top‐level problem into a set of sub problems, (2) function call overheads associated with recursion, and (3) a lot of redundant computation without memoization. The top‐down approach, however, might be a more natural way to think how the sub‐problems should be merged into a higher‐level optimal solution compared to the bottom‐up approach. o Task granularity. To increase the amount of parallelism in the problem, we want smaller sub‐problems that can be independently processed. However, the frequent reduction of limited scope pushes for more local reductions to take place within a task to avoid task‐to‐ task synchronization cost. Implementation forces o Push or pull reduction. The restriction on computation order requires the synchronization between sub‐problems. When computing a local or a globa...
View Full Document

This document was uploaded on 03/17/2014 for the course CS 4800 at Northeastern.

Ask a homework question - tutors are online