Wednesday, October 21, 2009

Thoughts on OPL patterns: Dense Linear Algebra, Graph Algorithms, and Monte Carlo

This time I read three of the computational patterns from OPL: Dense Linear Algebra, Graph Algorithms, and Monte Carlo. These are mainly suited for data-centric applications, in particular computing-intensive ones that need a lot of computations and thus the need to go parallel. Calling these systematic methods for computing and for aggregating results as patterns is new to me, in the past I am more familiar with structural/ architectural patterns or design patterns. With applications that are computing-intensive, during the high-level design stage the implementers would need to go back and forth between the structural patterns and the computational patterns to use for the overall architecture, since in this scenario optimizing the computation time is the key.

All three of the patterns are math-centric. The first two the name should be self-explanatory; for Monte Carlo it involves solving a problem by statistically sample its solution space under different parameter settings to derive a good estimation/ approximation. In one sense they are new to me since I have never done programming using those patterns, but at the same time they are familiar as I have done such exercises in my Math and Algorithms classes. For the types of the problems that we need to leverage these computational patterns, correctly formatting the problem to a linear algebra formula or a graph representation is more than half of the battle. In fact most of the time I spent in my Algorithm class was to try to reduce problems to a graph so I could then use well-known graph algorithms to solve them. (Incidentally, the solution section of the Graph Algorithms pattern makes a good final review sheet for CS473). So I definitely see benefits if there are also followup lower-level patterns that show how to convert some recurring types of problems to some mathematical representations.

No comments:

Post a Comment