Content area

Abstract

Some top-down problem specifications, if executed, may compute sub-problems repeatedly. Instead, we may want a bottom-up algorithm that stores solutions of sub-problems in a table to be reused. How the table can be represented and efficiently maintained, however, can be tricky. We study a special case: computing a function \({\mathit{h}}\) taking lists as inputs such that \({\mathit{h}\;\mathit{xs}}\) is defined in terms of all immediate sublists of \({\mathit{xs}}\). Richard Bird studied this problem in 2008 and presented a concise but cryptic algorithm without much explanation. We give this algorithm a proper derivation and discovered a key property that allows it to work. The algorithm builds trees that have certain shapes—the sizes along the left spine is a prefix of a diagonal in Pascal’s triangle. The crucial function we derive transforms one diagonal to the next.

Details

Title
Bottom-up computation using trees of sublists
Author
Shin-Cheng, Mu 1   VIAFID ORCID Logo 

 Institute of Information Science, Academia Sinica, Taipei, Taiwan (e-mail: [email protected]
Publication title
Volume
34
Publication year
2024
Publication date
Dec 2024
Section
Functional Pearl
Publisher
Cambridge University Press
Place of publication
Cambridge
Country of publication
United Kingdom
ISSN
09567968
e-ISSN
14697653
Source type
Scholarly Journal
Language of publication
English
Document type
Journal Article
Publication history
 
 
Online publication date
2024-12-11
Milestone dates
2023-11-30 (Received); 2024-08-27 (Revised); 2024-10-10 (Accepted)
Publication history
 
 
   First posting date
11 Dec 2024
ProQuest document ID
3142758395
Document URL
https://www.proquest.com/scholarly-journals/bottom-up-computation-using-trees-sublists/docview/3142758395/se-2?accountid=208611
Copyright
© The Author(s), 2024. Published by Cambridge University Press. This work is licensed under the Creative Commons  Attribution – Non-Commercial – Share Alike License This is an Open Access article, distributed under the terms of the Creative Commons Attribution-NonCommercial-ShareAlike licence (http://creativecommons.org/licenses/by-nc-sa/4.0/), which permits non-commercial re-use, distribution, and reproduction in any medium, provided the same Creative Commons licence is used to distribute the re-used or adapted article and the original article is properly cited. The written permission of Cambridge University Press must be obtained prior to any commercial use. (the “License”). Notwithstanding the ProQuest Terms and Conditions, you may use this content in accordance with the terms of the License.
Last updated
2024-12-11
Database
ProQuest One Academic