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

Home > General > Word Problems
Star Stare (Posted on 2008-07-16) Difficulty: 4 of 5

           !
          / \
     !---!---!---!
      \ /     \ /
       !       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.)
Solution 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            d
term         m r e t
surd          u   w
glum         s l i o
oils            g
twig           
swig            g
lien         n e i l
dreg          r   w
burn         d u o s
duos            b
bowl           
swig            g
dint         t n i d
hung          u   w
lout         h o e s
hoes            l
lewd           
twig            g
lien         n e i l
gems          m   w
hymn         s y o t
toys            h
howl           
twig            g
silk         k l i s
glen          e   w
kerb         n r o t
torn            b
bows           
twig            g
silk         k l i s
glen          e   w
kerb         n r o t
torn            b
swob           
twig            g
oils         s l i o
glum          u   w
surd         m r e t
term            d
owed           
twig            g
sine         e n i s
bung          u   w
clue         b l o t
blot            c
cows           
twig            g
sine         e n i s
dung          u   w
blue         d l o t
told            b
bows           
twig            g
sine         e n i s
dung          u   w
blue         d l o t
told            b
swob           
twig            g
sine         e n i s
dung          u   w
clue         d l o t
told            c
cows           
twig            g
sire         e r i s
grub          u   w
clue         b l o t
blot            c
cows           
twin            n
sire         e r i s
burn          u   w
clue         b l o t
blot            c
cows           
swob            b
told         d l o t
blue          u   w
dung         e n i s
sine            g
twig           
swob            b
torn         n r o t
kerb          e   w
glen         k l i s
silk            g
twig           
swob            b
loud         d u o l
bunt          n   w
mind         t i e s
ties            m
mewl           
swob            b
lout         t u o l
burp          r   w
trim         p i e s
pies            m
mewl           
swob            b
lout         t u o l
drub          r   w
trim         d i e s
dies            m
mewl           
swob            b
lion         l i o n
bird          r   w
hurl         d u e s
dues            h
hewn           
swob            b
lion         l i o n
crib          r   w
hurl         c u e s
cues            h
hewn           
swop            p
loud         d u o l
punt          n   w
mind         t i e s
ties            m
mewl           
swop            p
lion         l i o n
drip          r   w
hurl         d u e s
dues            h
hewn           
twos            s
cloy         c l o y
slum          u   w
curd         m r e t
term            d
dewy           
twos            s
ploy         p l o y
slim          i   w
drip         m r e t
term            d
dewy           
twos            s
ploy         p l o y
mils          i   w
drip         m r e t
term            d
dewy           
swum            m
yurt         t r u y
form          o   w
told         f l e s
self            d
dewy           
swum            m
gout         g o u t
prom          r   w
grin         p i e s
pies            n
newt           
lewd            l
foes         f o e s
loin          i   w
firm         n r u d
durn            m
swum           
lewd            l
hoes         h o e s
lout          u   w
hung         t n i d
dint            g
swig           
bowl            b
muon         m u o n
buys          y   w
myth         s t e l
lets            h
hewn           
cowl            c
mhos         m h o s
chit          i   w
mind         t n e l
lent            d
dews           
fowl            f
norm         m r o n
turf          u   w
mush         t s e l
lest            h
hewn           
fowl            f
pros         p r o s
turf          u   w
puny         t n e l
lent            y
yews           
howl            h
toys         s y o t
hymn          m   w
gems         n e i l
lien            g
twig           
mewl            m
dies         d i e s
prim          r   w
drub         p u o l
loup            b
swob           
mewl            m
dies         d i e s
trim          r   w
drub         t u o l
lout            b
bows           
mewl            m
dies         d i e s
trim          r   w
drub         t u o l
lout            b
swob           
mewl            m
dies         d i e s
trim          r   w
curd         t u o l
lout            c
cows           
mewl            m
pies         p i e s
trim          r   w
burp         t u o l
lout            b
bows           
mewl            m
pies         p i e s
trim          r   w
burp         t u o l
lout            b
swob           
mewl            m
ties         t i e s
mind          n   w
bunt         d u o l
loud            b
bows           
mewl            m
ties         t i e s
mind          n   w
bunt         d u o l
loud            b
swob           
mewl            m
ties         t i e s
mind          n   w
punt         d u o l
loud            p
pows           
mewl            m
ties         t i e s
mind          n   w
punt         d u o l
loud            p
swop           
mewl            m
ties         t i e s
mind          n   w
runt         d u o l
loud            r
rows           
hewn            h
lest         t s e l
mush          u   w
turf         m r o n
norm            f
fowl           
hewn            h
lets         s t e l
myth          y   w
buys         m u o n
muon            b
bowl           
hewn            h
cues         c u e s
hurl          r   w
crib         l i o n
lion            b
bows           
hewn            h
cues         c u e s
hurl          r   w
crib         l i o n
lion            b
swob           
hewn            h
dues         d u e s
hurl          r   w
drip         l i o n
lion            p
pows           
hewn            h
dues         d u e s
hurl          r   w
drip         l i o n
lion            p
swop           
hewn            h
dues         d u e s
hurl          r   w
drip         l i o n
noil            p
pows           
hewn            h
dues         d u e s
hurl          r   w
bird         l i o n
lion            b
bows           
hewn            h
dues         d u e s
hurl          r   w
bird         l i o n
lion            b
swob           
town            t
mhos         m h o s
thug          u   w
plum         g l e n
glen            p
pews           
town            t
rhos         r h o s
thug          u   w
ruly         g l e n
glen            y
yews           
bows            b
told         d l o t
blue          u   w
dung         e n i s
sine            g
twig           
bows            b
torn         n r o t
kerb          e   w
glen         k l i s
silk            g
twig           
bows            b
loud         d u o l
bunt          n   w
mind         t i e s
ties            m
mewl           
bows            b
lout         t u o l
burp          r   w
trim         p i e s
pies            m
mewl           
bows            b
lout         t u o l
drub          r   w
trim         d i e s
dies            m
mewl           
bows            b
lion         l i o n
bird          r   w
hurl         d u e s
dues            h
hewn           
bows            b
lion         l i o n
crib          r   w
hurl         c u e s
cues            h
hewn           
cows            c
told         d l o t
clue          u   w
dung         e n i s
sine            g
twig           
cows            c
loup         p u o l
curd          r   w
prim         d i e s
dies            m
mewl           
cows            c
lout         t u o l
curd          r   w
trim         d i e s
dies            m
mewl           
cows            c
blot         b l o t
clue          u   w
bung         e n i s
sine            g
twig           
cows            c
blot         b l o t
clue          u   w
burn         e r i s
sire            n
twin           
cows            c
blot         b l o t
clue          u   w
grub         e r i s
sire            g
twig           
dews            d
lent         t n e l
mind          i   w
chit         m h o s
mhos            c
cowl           
dews            d
lent         t n e l
rind          i   w
chit         r h o s
rhos            c
cowl           
mows            m
ploy         p l o y
film          i   w
drip         f r e s
serf            d
dewy           
pews            p
glen         g l e n
plum          u   w
thug         m h o s
mhos            t
town           
pows            p
loud         d u o l
punt          n   w
mind         t i e s
ties            m
mewl           
pows            p
lion         l i o n
drip          r   w
hurl         d u e s
dues            h
hewn           
rows            r
loud         d u o l
runt          n   w
mind         t i e s
ties            m
mewl           
yews            y
lend         d n e l
puny          u   w
crud         p r o s
pros            c
cowl           
yews            y
lent         t n e l
puny          u   w
turf         p r o s
pros            f
fowl           
yews            y
next         t x e n
pixy          i   w
grit         p r o s
pros            g
gown           
newt            n
pies         p i e s
grin          r   w
prom         g o u t
gout            m
swum           
dewy            d
self         f l e s
told          o   w
form         t r u y
yurt            m
swum           
dewy            d
serf         f r e s
drip          i   w
film         p l o y
ploy            m
mows           
dewy            d
term         m r e t
drip          i   w
mils         p l o y
ploy            s
twos           
dewy            d
term         m r e t
drip          i   w
slim         p l o y
ploy            s
twos           
dewy            d
term         m r e t
curd          u   w
slum         c l o y
cloy            s
twos           
dewy            d
bren         b r e n
curd          u   w
slub         c l o y
cloy            s
sown           

 


  Posted by Charlie on 2008-07-16 15:40:41
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (3)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2017 by Animus Pactum Consulting. All rights reserved. Privacy Information