Efficient Array Partitioning

We consider the problem of partitioning an array of n items into p intervals so that the maximum weight of the intervals is minimized. The currently best known bound for this problem is O(n+p1+e) [HNC92] for any fixed e<1. In this paper, we present an algorithm that runs in time O(n log n); this is the fastest known algorithm for arbitrary p. We consider the natural generalization of this partitioning to two dimensions, where an n×n array of items is to be partitioned into p2 blocks by partitioning the rows and columns into p intervals each and considering the blocks induced by this partition. The problem is to find that partition which minimizes the maximum weight among the resulting blocks. This problem is known to be NP-hard [GM96]. Independently, Charikar et. al. have given a simple proof that shows that the problem is in fact NP-hard to approximate within a factor of two. Here we provide a polynomial time algorithm that determines a solution at most O(1) times the optimum; the previously best approximation ratio was O(√p) [HM96]. Both the results above are proved for the case when the weight of an interval or block is the sum of the elements in it. These problems arise in load balancing for parallel machines and data partitioning in parallel languages. Applications in motion estimation by block matching in video and image compression give rise to the dual problem, that of minimizing the number of dividers p so that the maximum weight of a block is at most δ. We give an O(log n) approximation algorithm for this problem. All our results for two dimensional array partitioning extend to any higher fixed dimension.

[1]  Shahid H. Bokhari Partitioning Problems in Parallel, Pipelined, and Distributed Computing , 1988, IEEE Trans. Computers.

[2]  Michael Gerndt,et al.  SUPERB: A tool for semi-automatic MIMD/SIMD parallelization , 1988, Parallel Comput..

[3]  Bhagirath Narahari,et al.  Algorithms for Mapping and Partitioning Chain Structured Parallel Computations , 1991, ICPP.

[4]  Awi Federgruen,et al.  Structured Partitioning Problems , 1991, Oper. Res..

[5]  Yijie Han,et al.  Mapping a Chain Task to Chained Processors , 1992, Inf. Process. Lett..

[6]  Pierre Hansen,et al.  Improved Algorithms for Partitioning Problems in Parallel, Pipelined, and Distributed Computing , 1992, IEEE Trans. Computers.

[7]  David M. Nicol,et al.  Rectilinear Partitioning of Irregular Data Parallel Computations , 1994, J. Parallel Distributed Comput..

[8]  Barbara M. Chapman,et al.  High Performance Fortran Languages: Advanced applications and their implementation , 1995, Future Gener. Comput. Syst..

[9]  Tor Sørevik,et al.  Optimal Partitioning of Sequences , 1995, J. Algorithms.

[10]  Bjørn Olstad,et al.  Efficient Partitioning of Sequences , 1995, IEEE Trans. Computers.

[11]  Michelangelo Grigni,et al.  On the Complexity of the Generalized Block Distribution , 1996, IRREGULAR.

[12]  Graham R. Martin,et al.  Variable size block matching motion estimation with minimal error , 1996, Electronic Imaging.

[13]  Tor Sørevik,et al.  Partitioning an Array onto a Mesh of Processors , 1996, PARA.