https://github.com/snape/loopless-functional-algorithms
Loopless Functional Algorithms (Haskell)
https://github.com/snape/loopless-functional-algorithms
haskell loopless-algorithms
Last synced: 5 months ago
JSON representation
Loopless Functional Algorithms (Haskell)
- Host: GitHub
- URL: https://github.com/snape/loopless-functional-algorithms
- Owner: snape
- License: apache-2.0
- Created: 2013-03-24T18:09:00.000Z (almost 13 years ago)
- Default Branch: main
- Last Pushed: 2023-12-30T02:05:16.000Z (about 2 years ago)
- Last Synced: 2025-09-05T04:02:47.763Z (5 months ago)
- Topics: haskell, loopless-algorithms
- Language: Haskell
- Homepage: https://www.jamiesnape.io/publications/msc/
- Size: 94.7 KB
- Stars: 15
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Citation: CITATION.cff
- Codeowners: .github/CODEOWNERS
- Security: .github/SECURITY.md
- Support: .github/SUPPORT.md
- Zenodo: .zenodo.json
Awesome Lists containing this project
README
Loopless Functional Algorithms
==============================
[](https://zenodo.org/badge/latestdoi/8990554)
Copyright © 2005 Jamie Snape, Oxford University Computing Laboratory.
*Loopless algorithms* generate successive combinatorial patterns in constant
time, producing the first in time linear to the size of input. Although
originally formulated in an imperative setting, we propose a functional
interpretation of these algorithms in the lazy language Haskell. Since it may
not be possible to produce a pattern in constant time, a list of integers
generated using the library function `unfoldr` determines the transitions
between consecutive patterns.
The generation of Gray codes, permutations, ideals of posets and
combinations illustrate applications of loopless algorithms in both imperative
and functional form, particularly derivations of the Koda-Ruskey and
Johnson-Trotter algorithms. Common themes in the construction of loopless
imperative algorithms, such as focus pointers, doubly-linked lists and
coroutines, contrast greatly with the functional uses of real-time queues, tree
traversals, fusion and tupling.
SPDX-FileCopyrightText: 2005 Jamie Snape, Oxford University Computing Laboratory
SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this software except in compliance with the License. You may obtain a copy of
the License at
Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
The author may be contacted via:
Jamie Snape
Oxford University Computing Laboratory
Wolfson Building
Parks Road
Oxford
OX1 3QD
United Kingdom