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

Home > General > Word Problems
Just One (Posted on 2007-04-04) Difficulty: 4 of 5

You are to fill a 4 x 4 grid with 16 unique letters (these include the 5 vowels).
Each row and column is to form a different English word.
The grid is scored as A=1 to Z=26 for each letter used.

Should the above task prove elusive, letters may only be repeated once but only the first occurrence is to be scored.

What is your best solution and score?

See The Solution Submitted by brianjn    
Rating: 4.5000 (2 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution no repeated letters -- several computer-found solutions | Comment 6 of 8 |
(In reply to Impressed by brianjn)

Listed in decreasing order of score, mirror-images side-by-side (i.e., columns/rows interchanged):

kaph      kris      pash      prig      caph      cris      chit      cwms
ruly      auto      ruly      auto      ruly      auto      wany      haul
item      plew      item      slew      item      plew      murk      inro
sown 230  hymn 230  gown 226  hymn 226  sown 222  hymn 222  sloe 217  tyke 217
nags      newt      fash      frig      gash      grid      flow      frap
ecru      achy      ruly      auto      ruly      auto      ruby      luge
whim      grip      item      slew      item      slew      agin      obit
typo 217  sumo 217  gown 216  hymn 216  down 214  hymn 214  pets 213  wyns 213
slid      syph      bash      brig      grid      gyps      bach      bris
yuca      lure      ruly      auto      yuca      rule      ruly      auto
prow      icon      item      slew      plow      icon      item      clew
hent 213  dawt 213  gown 212  hymn 212  sent 212  dawt 212  sown 208  hymn 208
tidy      toph      chow      crap      meow      muck      irks      itch    
ogre      iglu      ruby      huge      upby      epha      tuna      ruly   
plan      dram      agin      obit      chin      obit      clog      knop   
hums 207  yens 207  pets 206  wyns 206  kats 205  wyns 205  hype 204  sage 204
irks      itch      tick      toph      chid      cwms      irks      itch
tune      ruly      ogre      iglu      wany      haul      tuna      ruly
clag      knap      play      cram      murk      inro      clod      knop
hypo 204  sego 204  hums 203  keys 203  sloe 201  dyke 201  hype 201  sade 201
chug      coft      bach      brig      slid      syph      tidy      toph
oily      hire      ruly      auto      yuca      lure      ogre      iglu
frap      ulan      item      clew      prof      icon      plan      drab
tens 199  gyps 199  gown 196  hymn 196  hent 196  daft 196  hubs 196  yens 196
glib      gyps      tick      toph      toph      tick      tick      toph
yuca      lure      ogre      iglu      iglu      ogre      ogre      iglu
prow      icon      plan      cram      crab      play      plan      crab
send 194  bawd 194  hums 192  kens 192  keys 192  hubs 192  hubs 181  kens 181

kaph: the eleventh letter of the Hebrew alphabet.

kris: alternate spelling of creese, a short sword or heavy dagger with a wavy blade, used by the Malays

plew: a beaver skin, esp. one of prime quality.

pash: slang: an infatuation for another person; crush.

caph: alternate spelling of kaph

cwms: cirques (circles or rings)

wany: waning; decreasing; diminished in part.

inro: a small lacquer box with compartments for medicines, cosmetics, etc., worn on the waist sash of the traditional Japanese costume

I've bolded three of the solutions that have more common words.

VB

VERSION 5.00
 
Dim grid(4, 4), nWords, hadLet(26), alpha, wList(4000), letStart(26)

Private Sub cmdStart_Click()
 alpha = "abcdefghijklmnopqrstuvwxyz"
 Open "c:\words\words4.txt" For Binary As #1
 Open "c:\words\just one.txt" For Output As #2
 w$ = Space$(4)
 Do
  Get #1, , w$
  If EOF(1) Then Exit Do
  If w$ = LCase$(w$) Then
   good = 1
   For i = 1 To 3
    If InStr(Mid(w$, i + 1), Mid(w$, i, 1)) > 0 Then good = 0: Exit For
   Next
   If good Then
    nWords = nWords + 1
    wList(nWords) = w$
    If Mid(w$, 1, 1) > prevLet Then
     prevLet = Mid(w$, 1, 1)
     p = InStr(alpha, prevLet)
     letStart(p) = nWords
    End If
   End If
  End If
 Loop
 Print nWords
 DoEvents
 
 place 1
 CurrentX = ScaleWidth / 2: CurrentY = 1
 Print "done";
 DoEvents
 Close
End Sub

Sub place(ps)
 DoEvents
 If ps = 1 Then
  startWd = 1: endWd = nWords
 Else
  startWd = letStart(InStr(alpha, grid(ps, 1)))
  If startWd = letStart(26) Then endWd = nWords Else endWd = letStart(InStr(alpha, grid(ps, 1)) + 1) - 1
 End If
 For wSubHoriz = startWd To endWd
  If ps = 1 Then
   xsave = CurrentX: ysave = CurrentY
   Line (1, 1)-(900, 200), RGB(255, 255, 255), BF
   CurrentX = 1: CurrentY = 1
   Print wList(wSubHoriz)
   CurrentX = xsave: CurrentY = ysave
  End If
  good = 1
  If ps = 1 Then
    ii = 0
  End If
  For i = ps To 4
   If hadLet(InStr(alpha, Mid(wList(wSubHoriz), i, 1))) Then good = 0: Exit For
  Next
  If good Then
   For i = 1 To ps - 1
    If Mid(wList(wSubHoriz), i, 1) <> grid(ps, i) Then good = 0: Exit For
   Next
   If good Then
    For i = ps To 4
     grid(ps, i) = Mid(wList(wSubHoriz), i, 1)
     hadLet(InStr(alpha, grid(ps, i))) = 1
    Next
   
 
 startWdV = letStart(InStr(alpha, grid(1, ps)))
 If startWdV = letStart(26) Then endWdV = nWords Else endWdV = letStart(InStr(alpha, grid(1, ps)) + 1) - 1
 For wSubVert = startWdV To endWdV
  good2 = 1
  For i = ps + 1 To 4
   If hadLet(InStr(alpha, Mid(wList(wSubVert), i, 1))) Then good2 = 0: Exit For
  Next
  If good2 Then
   For i = 1 To ps
    If Mid(wList(wSubVert), i, 1) <> grid(i, ps) Then good2 = 0: Exit For
   Next
   If good2 Then
    For i = ps To 4
     grid(i, ps) = Mid(wList(wSubVert), i, 1)
     hadLet(InStr(alpha, grid(i, ps))) = 1
    Next
   
    If ps = 4 Then
     totl = 0
     For i = 1 To 26
      totl = totl + hadLet(i) * i
     Next
     Print
     For i = 1 To 4
      For j = 1 To 4
       Print grid(i, j);
       Print #2, grid(i, j);
      Next
      If i = 4 Then Print totl;
      If i = 4 Then Print #2, totl;
      Print
      Print #2,
     Next
     Print #2,
     DoEvents
     j = 0
    Else
     place ps + 1
    End If
   
    For i = ps + 1 To 4
     hadLet(InStr(alpha, grid(i, ps))) = 0
     grid(i, ps) = ""
    Next
   End If
  End If
 Next
   
   
    For i = ps To 4
     hadLet(InStr(alpha, grid(ps, i))) = 0
     grid(ps, i) = ""
    Next
   End If
  End If
 Next
End Sub

The four-letter words are read into an array, weeding out those with duplicate letters.  Each level of recursion into subroutine place, places one horizontal and then one vertical word.

The output was formatted later, and sorted descending by score, with care taken to put mirror images side-by-side, in those cases where more than just the mirror images shared the same score.


  Posted by Charlie on 2007-04-06 00:11:57
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 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information