Hostname: page-component-586b7cd67f-t7fkt Total loading time: 0 Render date: 2024-11-22T13:18:18.464Z Has data issue: false hasContentIssue false

FUNCTIONAL PEARL: Marble mingling

Published online by Cambridge University Press:  31 July 2003

S. A. CURTIS
Affiliation:
University of Stirling, Stirling FK9 4LA, UK (e-mail: s.curtis@cs.stir.ac.uk) Now at: Department of Computing, Oxford Brookes University, Oxford, OX33 1HX. e-mail: sharoncurtis@brookes.ac.uk
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the ‘Save PDF’ action button.

A bag (literally and mathematically!) of marbles is deemed to be mingled if all the colours of the marbles are different. Given a positive integer $k$ and a collection of $m$ marbles, our objective is to try and extract as many mingled bags as possible from the collection, where each bag contains exactly $k$ marbles.

Type
Functional Pearls
Copyright
2003 Cambridge University Press
Submit a response

Discussions

No Discussions have been published for this article.