home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!spool.mu.edu!agate!doc.ic.ac.uk!news!dbh
- From: dbh@doc.ic.ac.uk (Denis Howe)
- Newsgroups: sci.math
- Subject: Re: Game of pentominos
- Followup-To: sci.math
- Date: 21 Dec 92 15:23:55
- Organization: Computing Department, Imperial College, London, UK
- Lines: 24
- Distribution: world
- Message-ID: <DBH.92Dec21152355@wombat.doc.ic.ac.uk>
- References: <1992Dec15.154734.23894@odin.diku.dk>
- <pete.03it@bignode.equinox.gen.nz>
- <rcbaaw.724692264@rw6.urc.tue.nl>
- NNTP-Posting-Host: wombat.doc.ic.ac.uk
- In-reply-to: rcbaaw@rw6.urc.tue.nl's message of 18 Dec 92 15:24:24
-
- In article <rcbaaw.724692264@rw6.urc.tue.nl> rcbaaw@rw6.urc.tue.nl
- (Angelo Wentzler) wrote:
-
- >has anybody ever tried to write a program to compute all
- >(N+1)-ominoes from the set of N-ominoes? It's not difficult: Just
- >take one N-omino at a time and fit an extra square onto it. This
- >produces one extra (N+1)-omino. Fit a square on all possible
- >positions, (just "roll" it along the edge) then proceed with the next
- >N-omino.
-
- This is precisely how a very old Basic program of mine works. You
- start off with one square (the set of 1-ominoes), add another to the
- right then roll it round the outside to generate all 2-ominoes etc..
- You then apply the eight reflections and rotations, shift each shape
- generated so that its minimum x and y coords are both 0 and compare it
- with all previously found n-ominoes. It's this last step that is the
- boring bit. Anyone come up with any good hashing functions for
- ominoes? Centre of gravity? Moment of inertia?
-
- Mail me if you want the program. It's in Acorn Basic and runs on the
- Archimedes.
- --
- Denis Howe <dbh@doc.ic.ac.uk>
- So Biggs, you're the idiot who bought all these IBM PCs. You're fired!
-