Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/2951913.2951923acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
research-article

Queueing and glueing for optimal partitioning (functional pearl)

Published: 04 September 2016 Publication History

Abstract

The queueing-glueing algorithm is the nickname we give to an algorithmic pattern that provides amortised linear time solutions to a number of optimal list partition problems that have a peculiar property: at various moments we know that two of three candidate solutions could be optimal. The algorithm works by keeping a queue of lists, glueing them from one end, while chopping from the other end, hence the name. We give a formal derivation of the algorithm, and demonstrate it with several non-trivial examples.

References

[1]
R. C. Backhouse. Galois connections and fixed point calculus. In R. C. Backhouse, R. Crole, and J. Gibbons, editors, Algebraic and Coalgebraic Methods in the Mathematics of Program Construction, pages 89– 148. Springer-Verlag, 2002.
[2]
R. S. Bird. Transformational programming and the paragraph problem. Science of Computer Programming, 6(2):159–189, 1986.
[3]
R. S. Bird. Algebraic identities for program calculation. Computer Journal, 32(2):122–126, April 1989.
[4]
P. Brucker. Efficient algorithms for some path partitioning problems. Discrete Applied Mathematics, 62(1-3):77–85, 1995.
[5]
K.-M. Chung and H.-I. Lu. An optimal algorithm for the maximum-density segment problem. SIAM Journal on Computing, 34(2):373–387, 2004.
[6]
S. Curtis and S.-C. Mu. Calculating a linear-time solution to the densestsegment problem. Journal of Functional Programming, 25, 2015.
[7]
O. de Moor and J. Gibbons. Bridging the algorithm gap: A linear-time functional program for paragraph formatting. Science of Computer Programming, 35(1):3–27, 1999.
[8]
Z. Galil and K. Park. Dynamic programming with convexity, concavity and sparsity. Theoretical Computer Science, 92(1):49–76, January 1992.
[9]
M. H. Goldwasser, M.-Y. Kao, and H.-I. Lu. Linear-time algorithms for computing maximum-density sequence segments with bioinformatics applications. Journal of Computer and System Sciences, 70(2):128–144, 2005.
[10]
R. Hinze and R. Paterson. Finger trees: a simple general-purpose data structure. Journal of Functional Programming, 16(2):197–217, 2006.
[11]
D. S. Hirschberg and L. L. Larmore. The least weight subsequence problem. SIAM Journal on Computing, 16(4):628–638, 1987.
[12]
R. J. M. Hughes. A novel representation of lists and its application to the function “reverse”. Information Processing Letters, 22:141–144, 1986.
[13]
D. E. Knuth and M. F. Plass. Breaking paragraphs into lines. Software – Practice and Experience, 11(11):1119–1184, 1981.
[14]
C. Okasaki. Purely Functional Data Structures. Cambridge University Press, 1999.
[15]
S. van Hoesel, A. Wagelmans, and B. Moerman. Using geometric techniques to improve dynamic programming algorithms for the economic lot-sizing problem and extensions. European Journal of Operational Research, 75(2):312–331, 1994.

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
ICFP 2016: Proceedings of the 21st ACM SIGPLAN International Conference on Functional Programming
September 2016
501 pages
ISBN:9781450342193
DOI:10.1145/2951913
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 04 September 2016

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. optimal partition
  2. program derivation

Qualifiers

  • Research-article

Conference

ICFP'16
Sponsor:

Acceptance Rates

Overall Acceptance Rate 333 of 1,064 submissions, 31%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 162
    Total Downloads
  • Downloads (Last 12 months)1
  • Downloads (Last 6 weeks)0
Reflects downloads up to 22 Sep 2024

Other Metrics

Citations

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media