Teacup rim text: Difference between revisions
Content added Content deleted
Alextretyak (talk | contribs) (Added 11l) |
m (added highlighting, whitespace, related tasks.) |
||
Line 1: | Line 1: | ||
{{task}} |
{{task}} |
||
On a set of coasters we have, there's a picture of a teacup. On the rim of the teacup the word |
On a set of coasters we have, there's a picture of a teacup. On the rim of the teacup the word '''TEA''' appears a number of times separated by bullet characters (•). |
||
It occurred to me that if the bullet were removed and the words run together, you could start at any letter and still end up with a meaningful three-letter word. |
|||
⚫ | That got me thinking that maybe there are other words that could be used rather that |
||
So start at the '''T''' and read '''TEA'''. Start at the '''E''' and read '''EAT''', or start at the '''A''' and read '''ATE'''. |
|||
⚫ | |||
⚫ | |||
⚫ | The relationship between these words is (using ATE as an example) that the first letter of the first becomes the last letter of the second. The first letter of the second becomes the last letter of the third. So ATE becomes |
||
For English, we will use the unixdict (now) located at: [http://wiki.puzzlers.org/pub/wordlists/unixdict.txt unixdict.txt]. |
|||
(This will maintain continuity with other Rosetta Code tasks that also use it.) |
|||
;Task: |
|||
⚫ | |||
Having listed a set, for example ['''ate tea eat'''], refrain from displaying permutations of that set, e.g.: ['''eat tea ate'''] etc. |
|||
The words should also be made of more than one letter (thus precluding '''III''' and '''OOO''' etc.) |
|||
⚫ | The relationship between these words is (using ATE as an example) that the first letter of the first becomes the last letter of the second. The first letter of the second becomes the last letter of the third. So '''ATE''' becomes '''TEA''' and '''TEA''' becomes '''EAT'''. |
||
All of the possible permutations, using this particular permutation technique, must be words in the list. |
|||
The set you generate for '''ATE''' will never included the word '''ETA''' as that cannot be reached via the first-to-last movement method. |
|||
Display one line for each set of teacup rim words. |
Display one line for each set of teacup rim words. |
||
{{Template:Strings}} |
|||
<br><br> |
<br><br> |
||