{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,5,26]],"date-time":"2026-05-26T23:05:13Z","timestamp":1779836713756,"version":"3.53.1"},"reference-count":3,"publisher":"Cambridge University Press (CUP)","issue":"2","license":[{"start":{"date-parts":[[2008,11,7]],"date-time":"2008-11-07T00:00:00Z","timestamp":1226016000000},"content-version":"unspecified","delay-in-days":6064,"URL":"https:\/\/www.cambridge.org\/core\/terms"}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["J. Funct. Prog."],"published-print":{"date-parts":[[1992,4]]},"abstract":"<jats:p>\n                    At the recent TC2 working conference on constructing programs from specifications (Moeller, 1991), I presented the derivation of a functional program for solving a problem posed by Knuth (1990). Slightly simplified, the problem was to construct a shortest decimal fraction representing a given integer multiple of 1\/2\n                    <jats:sup>16<\/jats:sup>\n                    . Later in the conference \u2013 and in a different context \u2013 Robert Dewar described a second problem that he had recently set as an examination question. In brief, the problem was to replace sequences of blanks in a file by tab characters wherever possible. Although Knuth's and Dewar's problems appear to have little in common, I suspected that both had the same \u2018deep structure\u2019 and were instances of a single general result about greedy algorithms. The purpose of this note is to bring the genral result to light and to unify the treatment of the two problems. We begin by describing the problems more precisely.\n                  <\/jats:p>","DOI":"10.1017\/s0956796800000368","type":"journal-article","created":{"date-parts":[[2008,11,7]],"date-time":"2008-11-07T11:14:34Z","timestamp":1226056474000},"page":"237-244","source":"Crossref","is-referenced-by-count":2,"title":["Functional Pearls\n                    <i>Two greedy algorithms<\/i>"],"prefix":"10.1017","volume":"2","author":[{"given":"R.S.","family":"Bird","sequence":"first","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"56","published-online":{"date-parts":[[2008,11,7]]},"reference":[{"key":"S0956796800000368_ref002","volume-title":"Constructing Programs from Specifications","author":"Moeller","year":"1991"},{"key":"S0956796800000368_ref001","volume-title":"Introduction to Functional Programming","author":"Bird","year":"1988"},{"key":"S0956796800000368_ref003","volume-title":"Beauty is our Business","author":"Knuth","year":"1990"}],"container-title":["Journal of Functional Programming"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.cambridge.org\/core\/services\/aop-cambridge-core\/content\/view\/S0956796800000368","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,5,26]],"date-time":"2026-05-26T22:35:06Z","timestamp":1779834906000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.cambridge.org\/core\/product\/identifier\/S0956796800000368\/type\/journal_article"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[1992,4]]},"references-count":3,"journal-issue":{"issue":"2","published-print":{"date-parts":[[1992,4]]}},"alternative-id":["S0956796800000368"],"URL":"https:\/\/doi.org\/10.1017\/s0956796800000368","relation":{},"ISSN":["0956-7968","1469-7653"],"issn-type":[{"value":"0956-7968","type":"print"},{"value":"1469-7653","type":"electronic"}],"subject":[],"published":{"date-parts":[[1992,4]]}}}