| Bentley, J., Programming Pearls, 2nd edition, Addison--Wesley, 1999. |
....and Chao, in which they introduce the concept of right skew partitions. Our main results are presented in Section 4. Other related works include algorithms for the problem of computing a segment ha i ; a j i with a maximum sum a i a j as opposed to a maximum density. Bentley [Ben86] gave an O(n) time algorithm for the case where L = 0 and U = n. Within the same linear time complexity, Huang [Hua94] solved the case with arbitrary L yet unbounded U . More recently, Lin, Jiang, and Chao [LJC02] solved the case with arbitrary L and U . 2 Notation and Preliminaries We consider ....
Jon Louis Bentley. Programming Pearls. Addison-Wesley, Reading, MA, 1986.
....Lin, Jiang, and Chao [21] gave an O(n log L) time algorithm for this case based on right skew partitions of a sequence. Other related work include algorithms for the problem of computing a segment ha i ; a j i with a maximum sum a i a j instead of a maximum density. Bentley [3] gave an O(n) time algorithm for the case where L = 0 and U = n. Within the same linear time complexity, Huang [17] solved the case with arbitrary L and U = n. More recently, Lin, Jiang, and Chao [21] solved the case with arbitrary L and U . In this paper, we report the following new results: ....
J. L. Bentley. Programming Pearls. Addison-Wesley, Reading, MA, 1986.
....coding. Through the use of functions, such as segs, inits, map, max and prod, we can specify the msp function via straightforward composition of simpler functions. These high level speci cation are easier to comprehend and more reusable. For example, the better known maximum segment sum problem [Ben86] can be speci ed by replacing the prod call with sum, as follows: sum( x] x sum(x:xs) x sum(xs) Unfortunately, high level speci cations have one major drawback, namely that they may be terribly inecient. Fortunately, it is possible to use transformation to calculate ecient algorithms, ....
....based on Horner s rule. This approach is considerably more complex since the corresponding Horner s rule have to be invented over tupled functions (for the MSP problem) Let us review the Horner s rule approach. 5 Classical Derivation via Horner s rule The MSS problem originated from Bentley [Ben86]. Formal derivation to obtain ecient linear time algorithm was developed by Bird [Bir88] amongst others. The traditional derivation for the MSS problem has been based on functionlevel reasoning via the Bird Meerstens Formalism (BMF) A major theme of the BMF approach is to capture common ....
Jon Bentley. Programming Pearls. Addison-Wesley, 1986.
....Random Shuffles Subsets T. A. Jenkyns, Department of Mathematics D. McCarthy, Dept. of Computer Science Brock University, St. Catharines, Ontario Canada L2S 3A1 Abstract. Four simple algorithms are presented for producing a random rearrangement of the values in an array X[1], X[2] X[n] using a pseudorandom number generator. These range from one that is naive, inefficient, and biased to one that is elegeant, efficient, and unbiased. By taking the first k entries in X one obtains a random (ordered) subset of size k. 1. Introduction. There are many instances ....
....of this algorithm may be used to produce a random subset. The book by Nijenhuis and Wilf [4] is a wonderful catalogue of algorithms for solving combinatorial problems especially those involving sequences and subsets. For further study of the design and analysis of algorithms we also suggest [1] and [2] 2. Mixing the Values in X We begin by devising a method to imitate shuffling cards in a deck where the values in array X change their positions in some unpredictable manner and where any value may end up in any position. Suppose that we select two positions, p and q, at random and then ....
[Article contains additional citation context not shown here]
J. Bentley, Programming Pearls, Addison-Wesley, Readinf, MA, 1986.
.... ; x i k are equal, we merge them in the sense that we take the sum of gains g t i : g t i k , assign the sum to x i , and rename the indexes so that all indexes are consecutive; namely, x 1 x 2 : Then, input the sequence of gains g t 1 ; g t 2 ; to Kadena s algorithm [4]. Given a sequence of M reals g 1 ; g 2 ; g M , Kadena s algorithm computes an optimal range [s; t] that maximizes P i2[s;t] g i in O(M) time. M is at most the number of records N but is typically much smaller than N , and hence Kadena s algorithm works in O(N) time. It is natural to ....
J. Bentley. Programming pearls. Communications of the ACM, 27(27):865-871, Sept. 1984.
....notation for parallel algorithms, called FAN (Functional Abstract Notation) which facilitates semantics preserving transformations of algorithms in the design process. Section 4 describes a case study: designing a parallel algorithm for the maximum segment sum problem (a programming pearl [4]) We start with an intuitively clear FAN formulation of the algorithm, and proceed, by applying FAN transformations, towards an efficient but intricate parallel version, which hardly could be written by the user from scratch. In Section 5, we describe our cost model, which helps to decide ....
....only three transformations which are used in the example; a rich set of transformations, with details about their performance, is developed in a more general context in paper [16] being presented at IPPS SPDP 99. We consider the famous Maximum Segment Sum (MSS) problem a programming pearl [4], studied by many authors [5, 8, 20, 22, 23] Given a one dimensional array of integers, function mss finds a contiguous array segment, whose members have the largest sum among all such segments, and returns this sum. For example: mss [ 2; Gamma4; 2; Gamma1; 6; Gamma3 ] 7 where the result ....
[Article contains additional citation context not shown here]
J. Bentley. Programming pearls. Comm. ACM, 27:865--871, 1984.
.... upperbound of O(n 3 ) Keywords: Subsequence, subarray, prefix sums, suffix sums, prefix maxima, suffix maxima 1 Introduction Given an n Theta n array A of reals (positive and negative) the problem of finding a rectangular subarray with maximum sum arises in 2 dimensional pattern matching[1]. Such a maximum sum subarray corresponds to a maximum likelihood estimator of a certain kind of pattern in a digitized picture. A simplification of the twodimensional problem to a one dimensional one is the following: Given a sequence Q of n reals (positive and negative) find a subsequence which ....
....problem to a one dimensional one is the following: Given a sequence Q of n reals (positive and negative) find a subsequence which has the maximum sum among all contiguous subsequences in Q. A linear time sequential algorithm for the one dimensional problem, attributed to Jay Kadane, is given in [1]. Furthermore, as reported in [1] Ulf Grenander of Brown University, who originally in 1977 formulated the two dimensional problem, abandoned that approach to the pattern matching problem, because no reasonably fast algorithm (sequential) could be found. A formal design of a linear time ....
[Article contains additional citation context not shown here]
J. Bentley, Programming Pearls (Addison-Wesley, 1989), 69--78.
....MURST 60 funds. Space reduction in data structural design is an attractive issue, now more than ever before, because of the exponential increase of electronic data nowadays available, and because of its intimate relation with algorithmic performance improvements (see e.g. Knuth [16] and Bentley [5]) This has recently motivated an upsurging interest in the design of implicit data structures for basic searching problems (see [23] and references therein) The goal is to reduce as much as possible the auxiliary information kept together with the input data without introducing any significant ....
J. Bentley. Programming Pearls. Addison-Wesley, USA, 1989.
No context found.
J. L. Bentley, Programming Pearls, Addison-Wesley, Reading, MA (1986).
No context found.
Bentley, J., Programming Pearls, 2nd edition, Addison--Wesley, 1999.
No context found.
Bentley, J. (2000), Programming Pearls, 2nd edn, Addison-Wesley. ISBN 0-201-65788-0.
No context found.
J. Bentley. Programming Pearls. Addison-Wesley, Reading, Massachusetts, 1986.
No context found.
J. L. Bentley. Programming Pearls. Addison-Wesley, Reading, Massachusetts, reprint edition, 1989. {47}
No context found.
Jon L. Bentley. Programming Pearls. Addison-Wesley Publishing Company, Reading, Massachusetts, 1986.
No context found.
J. Bentley. Programming Pearls. Addison-Wesley, USA, 1989.
No context found.
J. Bentley, Programming Pearls, Addison-Wesley, Reading, MA, 1986.
No context found.
Bentley, J.L. Programming Pearls. Addison Wesley, Reading, Mass., 1986.
No context found.
J. Bentley, Programming Pearls, Addison-Wesley, Reading, MA, 1986.
No context found.
J. Bentley. Programming pearls. Communications of ACM, vol. 27, no. 2, 865-871, 1984.
No context found.
J.L. Bentley, Programming Pearls. Addison-Wesley, Reading, MA, 1986.
No context found.
J. BENTLEY, Programming Pearls, Addison-Wesley, 1986.
No context found.
Jon L. Bentley, "Programming Pearls," Communications of the ACM 29:5 (May
No context found.
Jon Bentley. Programming Pearls. Addison-Wesley, 1986.
No context found.
Jon L. Bentley, "Programming Pearls," Communications of the ACM 29:5(May
No context found.
Bentley, J. L., Programming Pearls, Addison-Wesley (1986). Solution 10.6.
First 50 documents Next 50
Online articles have much greater impact More about CiteSeer.IST Add search form to your site Submit documents Feedback
CiteSeer.IST - Copyright Penn State and NEC