Maximum Segment Sum, Monadically (distilled tutorial, with solutions)

Computer Science – Data Structures and Algorithms

Scientific paper

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

Revision of the article in Proceedings DSL 2011, EPTCS 66, arXiv:1109.0323, to provide solutions to the exercises

Scientific paper

10.4204/EPTCS.66.9

The maximum segment sum problem is to compute, given a list of integers, the largest of the sums of the contiguous segments of that list. This problem specification maps directly onto a cubic-time algorithm; however, there is a very elegant linear-time solution too. The problem is a classic exercise in the mathematics of program construction, illustrating important principles such as calculational development, pointfree reasoning, algebraic structure, and datatype-genericity. Here, we take a sideways look at the datatype-generic version of the problem in terms of monadic functional programming, instead of the traditional relational approach; the presentation is tutorial in style, and leavened with exercises for the reader.

No associations

LandOfFree

Say what you really think

Search LandOfFree.com for scientists and scientific papers. Rate them and share your experience with other people.

Rating

Maximum Segment Sum, Monadically (distilled tutorial, with solutions) does not yet have a rating. At this time, there are no reviews or comments for this scientific paper.

If you have personal experience with Maximum Segment Sum, Monadically (distilled tutorial, with solutions), we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Maximum Segment Sum, Monadically (distilled tutorial, with solutions) will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFWR-SCP-O-449130

  Search
All data on this website is collected from public sources. Our data reflects the most accurate information available at the time of publication.