All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 Star Stare (Posted on 2008-07-16)
 ``` ! / \ !---!---!---! \ / \ / ! W / \ / \ !---!---!---! \ / ! ``` Each intersection of this hexagonal star is the location of a unique letter none of which is an "A". A "W" is already placed as a starter. Each line is a common English four letter word when read from at least one direction.
What solutions can you offer?

An afterthought:
Using unique letters, but with access to all vowels, what other solutions are available?

 See The Solution Submitted by brianjn No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
 computer solutions | Comment 2 of 9 |

Four files were used: lists of 4-letter words sorted by first letter, sorted by second letter, third letter, and by last letter.

A table is kept of the beginning and end record positions of each letter of the alphabet in each of the four files.

Dim startOf(4, 26), endOf(4, 26), abet
Dim p1\$, p2\$, p3\$, p4\$, p5\$, p6\$, p7\$, p8\$, p9\$, p10\$, p11\$, p12\$, used\$

Private Sub cmdStart_Click()
FontTransparent = False
FontName = "courier new"
p7\$ = "w"
used\$ = "a"
Open "words41.txt" For Binary As #1
Open "words42.txt" For Binary As #2
Open "words43.txt" For Binary As #3
Open "words44.txt" For Binary As #4
Open "star stare.txt" For Output As #5

abet = "abcdefghijklmnopqrstuvwxyz"

nWords = LOF(1) / 4

w\$ = Space\$(4)
For i = 1 To nWords
Get #1, i * 4 - 3, w\$
If Left(w\$, 1) <> pStart Then
letNo = InStr(abet, Left\$(w\$, 1))
startOf(1, letNo) = i
If letNo > 1 Then endOf(1, InStr(abet, pStart)) = i - 1
pStart = Left(w\$, 1)
End If
endOf(1, InStr(abet, pStart)) = nWords
Next

w\$ = Space\$(4)
For i = 1 To nWords
Get #2, i * 4 - 3, w\$
If Mid(w\$, 2, 1) <> pStart Then
letNo = InStr(abet, Mid(w\$, 2, 1))
startOf(2, letNo) = i
If letNo > 1 Then endOf(2, InStr(abet, pStart)) = i - 1
pStart = Mid(w\$, 2, 1)
End If
endOf(2, InStr(abet, pStart)) = nWords
Next

w\$ = Space\$(4)
For i = 1 To nWords
Get #3, i * 4 - 3, w\$
If Mid(w\$, 3, 1) <> pStart Then
letNo = InStr(abet, Mid(w\$, 3, 1))
startOf(3, letNo) = i
If letNo > 1 Then endOf(3, InStr(abet, pStart)) = i - 1
pStart = Mid(w\$, 3, 1)
End If
endOf(3, InStr(abet, pStart)) = nWords
Next

w\$ = Space\$(4)
For i = 1 To nWords
Get #4, i * 4 - 3, w\$
If Mid(w\$, 4, 1) <> pStart Then
letNo = InStr(abet, Mid(w\$, 4, 1))
startOf(4, letNo) = i
If letNo > 1 Then endOf(4, InStr(abet, pStart)) = i - 1
pStart = Mid(w\$, 4, 1)
End If
endOf(4, InStr(abet, pStart)) = nWords
Next

For i = 1 To 4: For j = 1 To 26
If startOf(i, j) = 0 Then startOf(i, j) = 1
If endOf(i, j) = 0 Then endOf(i, j) = 1
Next: Next

For dir1 = 2 To 3
DoEvents
ix = InStr(abet, "w")
For s1 = startOf(dir1, ix) To endOf(dir1, ix)
Get #dir1, s1 * 4 - 3, w\$
If noRept(Left(w\$, dir1 - 1) + Right(w\$, 4 - dir1)) Then
w1\$ = w\$
If dir1 = 2 Then
p11\$ = Mid(w\$, 1, 1): p4\$ = Mid(w\$, 3, 1): p1\$ = Mid(w\$, 4, 1):
Else
p1\$ = Mid(w\$, 1, 1): p4\$ = Mid(w\$, 2, 1): p11\$ = Mid(w\$, 4, 1):
End If
used\$ = used\$ + p1\$ + p4\$ + p7\$ + p11\$

For dir2 = 2 To 3
DoEvents
ix = InStr(abet, p4\$)
For s2 = startOf(dir2, ix) To endOf(dir2, ix)
Get #dir2, s2 * 4 - 3, w\$
If noRept(Left(w\$, dir2 - 1) + Mid(w\$, dir2 + 1)) Then
w2\$ = w\$
If dir2 = 2 Then
p5\$ = Mid(w\$, 1, 1): p3\$ = Mid(w\$, 3, 1): p2\$ = Mid(w\$, 4, 1):
Else
p2\$ = Mid(w\$, 1, 1): p3\$ = Mid(w\$, 2, 1): p5\$ = Mid(w\$, 4, 1):
End If
used\$ = used\$ + p2\$ + p3\$ + p5\$

For dir3 = 1 To 4 Step 3
ix = InStr(abet, p1\$)
For s3 = startOf(dir3, ix) To endOf(dir3, ix)
Get #dir3, s3 * 4 - 3, w\$
If Mid(w\$, (5 + dir3) / 3, 1) = p3\$ Then
If noRept(Mid(w\$, (11 - dir3 * 2) / 3, 2)) Then
w3\$ = w\$
If dir3 = 1 Then
p8\$ = Mid(w\$, 4, 1): p6\$ = Mid(w\$, 3, 1)
Else
p6\$ = Mid(w\$, 2, 1): p8\$ = Mid(w\$, 1, 1)
End If
used\$ = used\$ + p6\$ + p8\$
DoEvents

For dir4 = 1 To 4 Step 3
ix = InStr(abet, p2\$)
For s4 = startOf(dir4, ix) To endOf(dir4, ix)
Get #dir4, s4 * 4 - 3, w\$
If Mid(w\$, (5 + dir4) / 3, 1) = p6\$ Then
If noRept(Mid(w\$, (11 - dir4 * 2) / 3, 2)) Then
w4\$ = w\$
If dir4 = 1 Then
p9\$ = Mid(w\$, 3, 1): p12\$ = Mid(w\$, 4, 1)
Else
p9\$ = Mid(w\$, 2, 1): p12\$ = Mid(w\$, 1, 1)
End If
used\$ = used\$ + p9\$ + p12\$

For dir5 = 1 To 4 Step 3
ix = InStr(abet, p8\$)
For s5 = startOf(dir5, ix) To endOf(dir5, ix)
Get #dir5, s5 * 4 - 3, w\$
If Mid(w\$, (5 + dir5) / 3, 1) = p9\$ And Mid(w\$, 5 - dir5, 1) = p11\$ Then
If noRept(Mid(w\$, (10 - dir5) / 3, 1)) Then
w5\$ = w\$
If dir5 = 1 Then
p10\$ = Mid(w\$, 3, 1)
Else
p10\$ = Mid(w\$, 2, 1)
End If
used\$ = used\$ + p10\$

If isWord(p12\$ + p10\$ + p7\$ + p5\$) Then
CurrentX = 1: CurrentY = 1
Print #5, w1\$: Print #5, w2\$: Print #5, w3\$: Print #5, w4\$: Print #5, w5\$
Print #5, p12\$ + p10\$ + p7\$ + p5\$
Print #5,
Print w1\$: Print w2\$: Print w3\$: Print w4\$: Print w5\$
Print p12\$ + p10\$ + p7\$ + p5\$
Print
DoEvents
End If
If isWord(p5\$ + p7\$ + p10\$ + p12\$) Then
CurrentX = 1: CurrentY = 1
Print #5, w1\$: Print #5, w2\$: Print #5, w3\$: Print #5, w4\$: Print #5, w5\$
Print #5, p5\$ + p7\$ + p10\$ + p12\$
Print #5,
Print w1\$: Print w2\$: Print w3\$: Print w4\$: Print w5\$
Print p5\$ + p7\$ + p10\$ + p12\$
Print
DoEvents
End If

ix = InStr(used\$, p10\$): used\$ = Left(used\$, ix - 1) + Mid(used\$, ix + 1)
End If
End If
Next
Next dir5

ix = InStr(used\$, p9\$): used\$ = Left(used\$, ix - 1) + Mid(used\$, ix + 1)
ix = InStr(used\$, p12\$): used\$ = Left(used\$, ix - 1) + Mid(used\$, ix + 1)
End If
End If
Next
Next dir4

ix = InStr(used\$, p6\$): used\$ = Left(used\$, ix - 1) + Mid(used\$, ix + 1)
ix = InStr(used\$, p8\$): used\$ = Left(used\$, ix - 1) + Mid(used\$, ix + 1)
End If
End If
Next
Next dir3

ix = InStr(used\$, p2\$): used\$ = Left(used\$, ix - 1) + Mid(used\$, ix + 1)
ix = InStr(used\$, p3\$): used\$ = Left(used\$, ix - 1) + Mid(used\$, ix + 1)
ix = InStr(used\$, p5\$): used\$ = Left(used\$, ix - 1) + Mid(used\$, ix + 1)
End If
Next
Next dir2

ix = InStr(used\$, p1\$): used\$ = Left(used\$, ix - 1) + Mid(used\$, ix + 1)
ix = InStr(used\$, p4\$): used\$ = Left(used\$, ix - 1) + Mid(used\$, ix + 1)
ix = InStr(used\$, p7\$): used\$ = Left(used\$, ix - 1) + Mid(used\$, ix + 1)
ix = InStr(used\$, p11\$): used\$ = Left(used\$, ix - 1) + Mid(used\$, ix + 1)
End If
Next
Next dir1
End Sub

Function noRept(x\$)
good = 1
For i = 1 To Len(x\$)
If InStr(Mid(x\$, i + 1), Mid(x\$, i, 1)) > 0 Then good = 0: Exit For
If InStr(used\$, Mid(x\$, i, 1)) > 0 Then good = 0: Exit For
Next
noRept = good
End Function

Function isWord(w\$)
wChk\$ = Space\$(4)
v = False
For i = startOf(1, InStr(abet, Left(w\$, 1))) To endOf(1, InStr(abet, Left(w\$, 1)))
Get #1, i * 4 - 3, wChk\$
If wChk\$ = w\$ Then v = True
Next
isWord = v
End Function

The word lists below were produced by the above program. Those involving unusual words were eliminated manually. The diagrams to the right of each were added by another program:

`owed            dterm         m r e tsurd          u   wglum         s l i ooils            gtwig            `
`swig            glien         n e i ldreg          r   wburn         d u o sduos            bbowl            `
`swig            gdint         t n i dhung          u   wlout         h o e shoes            llewd            `
`twig            glien         n e i lgems          m   whymn         s y o ttoys            hhowl            `
`twig            gsilk         k l i sglen          e   wkerb         n r o ttorn            bbows            `
`twig            gsilk         k l i sglen          e   wkerb         n r o ttorn            bswob            `
`twig            goils         s l i oglum          u   wsurd         m r e tterm            dowed            `
`twig            gsine         e n i sbung          u   wclue         b l o tblot            ccows            `
`twig            gsine         e n i sdung          u   wblue         d l o ttold            bbows            `
`twig            gsine         e n i sdung          u   wblue         d l o ttold            bswob            `
`twig            gsine         e n i sdung          u   wclue         d l o ttold            ccows            `
`twig            gsire         e r i sgrub          u   wclue         b l o tblot            ccows            `
`twin            nsire         e r i sburn          u   wclue         b l o tblot            ccows            `
`swob            btold         d l o tblue          u   wdung         e n i ssine            gtwig            `
`swob            btorn         n r o tkerb          e   wglen         k l i ssilk            gtwig            `
`swob            bloud         d u o lbunt          n   wmind         t i e sties            mmewl            `
`swob            blout         t u o lburp          r   wtrim         p i e spies            mmewl            `
`swob            blout         t u o ldrub          r   wtrim         d i e sdies            mmewl            `
`swob            blion         l i o nbird          r   whurl         d u e sdues            hhewn            `
`swob            blion         l i o ncrib          r   whurl         c u e scues            hhewn            `
`swop            ploud         d u o lpunt          n   wmind         t i e sties            mmewl            `
`swop            plion         l i o ndrip          r   whurl         d u e sdues            hhewn            `
`twos            scloy         c l o yslum          u   wcurd         m r e tterm            ddewy            `
`twos            sploy         p l o yslim          i   wdrip         m r e tterm            ddewy            `
`twos            sploy         p l o ymils          i   wdrip         m r e tterm            ddewy            `
`swum            myurt         t r u yform          o   wtold         f l e sself            ddewy            `
`swum            mgout         g o u tprom          r   wgrin         p i e spies            nnewt            `
`lewd            lfoes         f o e sloin          i   wfirm         n r u ddurn            mswum            `
`lewd            lhoes         h o e slout          u   whung         t n i ddint            gswig            `
`bowl            bmuon         m u o nbuys          y   wmyth         s t e llets            hhewn            `
`cowl            cmhos         m h o schit          i   wmind         t n e llent            ddews            `
`fowl            fnorm         m r o nturf          u   wmush         t s e llest            hhewn            `
`fowl            fpros         p r o sturf          u   wpuny         t n e llent            yyews            `
`howl            htoys         s y o thymn          m   wgems         n e i llien            gtwig            `
`mewl            mdies         d i e sprim          r   wdrub         p u o lloup            bswob            `
`mewl            mdies         d i e strim          r   wdrub         t u o llout            bbows            `
`mewl            mdies         d i e strim          r   wdrub         t u o llout            bswob            `
`mewl            mdies         d i e strim          r   wcurd         t u o llout            ccows            `
`mewl            mpies         p i e strim          r   wburp         t u o llout            bbows            `
`mewl            mpies         p i e strim          r   wburp         t u o llout            bswob            `
`mewl            mties         t i e smind          n   wbunt         d u o lloud            bbows            `
`mewl            mties         t i e smind          n   wbunt         d u o lloud            bswob            `
`mewl            mties         t i e smind          n   wpunt         d u o lloud            ppows            `
`mewl            mties         t i e smind          n   wpunt         d u o lloud            pswop            `
`mewl            mties         t i e smind          n   wrunt         d u o lloud            rrows            `
`hewn            hlest         t s e lmush          u   wturf         m r o nnorm            ffowl            `
`hewn            hlets         s t e lmyth          y   wbuys         m u o nmuon            bbowl            `
`hewn            hcues         c u e shurl          r   wcrib         l i o nlion            bbows            `
`hewn            hcues         c u e shurl          r   wcrib         l i o nlion            bswob            `
`hewn            hdues         d u e shurl          r   wdrip         l i o nlion            ppows            `
`hewn            hdues         d u e shurl          r   wdrip         l i o nlion            pswop            `
`hewn            hdues         d u e shurl          r   wdrip         l i o nnoil            ppows            `
`hewn            hdues         d u e shurl          r   wbird         l i o nlion            bbows            `
`hewn            hdues         d u e shurl          r   wbird         l i o nlion            bswob            `
`town            tmhos         m h o sthug          u   wplum         g l e nglen            ppews            `
`town            trhos         r h o sthug          u   wruly         g l e nglen            yyews            `
`bows            btold         d l o tblue          u   wdung         e n i ssine            gtwig            `
`bows            btorn         n r o tkerb          e   wglen         k l i ssilk            gtwig            `
`bows            bloud         d u o lbunt          n   wmind         t i e sties            mmewl            `
`bows            blout         t u o lburp          r   wtrim         p i e spies            mmewl            `
`bows            blout         t u o ldrub          r   wtrim         d i e sdies            mmewl            `
`bows            blion         l i o nbird          r   whurl         d u e sdues            hhewn            `
`bows            blion         l i o ncrib          r   whurl         c u e scues            hhewn            `
`cows            ctold         d l o tclue          u   wdung         e n i ssine            gtwig            `
`cows            cloup         p u o lcurd          r   wprim         d i e sdies            mmewl            `
`cows            clout         t u o lcurd          r   wtrim         d i e sdies            mmewl            `
`cows            cblot         b l o tclue          u   wbung         e n i ssine            gtwig            `
`cows            cblot         b l o tclue          u   wburn         e r i ssire            ntwin            `
`cows            cblot         b l o tclue          u   wgrub         e r i ssire            gtwig            `
`dews            dlent         t n e lmind          i   wchit         m h o smhos            ccowl            `
`dews            dlent         t n e lrind          i   wchit         r h o srhos            ccowl            `
`mows            mploy         p l o yfilm          i   wdrip         f r e sserf            ddewy            `
`pews            pglen         g l e nplum          u   wthug         m h o smhos            ttown            `
`pows            ploud         d u o lpunt          n   wmind         t i e sties            mmewl            `
`pows            plion         l i o ndrip          r   whurl         d u e sdues            hhewn            `
`rows            rloud         d u o lrunt          n   wmind         t i e sties            mmewl            `
`yews            ylend         d n e lpuny          u   wcrud         p r o spros            ccowl            `
`yews            ylent         t n e lpuny          u   wturf         p r o spros            ffowl            `
`yews            ynext         t x e npixy          i   wgrit         p r o spros            ggown            `
`newt            npies         p i e sgrin          r   wprom         g o u tgout            mswum            `
`dewy            dself         f l e stold          o   wform         t r u yyurt            mswum            `
`dewy            dserf         f r e sdrip          i   wfilm         p l o yploy            mmows            `
`dewy            dterm         m r e tdrip          i   wmils         p l o yploy            stwos            `
`dewy            dterm         m r e tdrip          i   wslim         p l o yploy            stwos            `
`dewy            dterm         m r e tcurd          u   wslum         c l o ycloy            stwos            `
`dewy            dbren         b r e ncurd          u   wslub         c l o ycloy            ssown            `

 Posted by Charlie on 2008-07-16 15:40:41

 Search: Search body:
Forums (0)