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

Home > General > Word Problems
Four word classes (Posted on 2021-05-27) Difficulty: 3 of 5
There are many words in English language with letters in alphabetical order e.g. not, biopsy (both in A to Z direction) or wronged, rib (in Z to A direction).
Please consider words that can be split into two parts each complying with one of the above structures (i.e. a-z or z-a ).
Those parts need not (but preferably may) be valid English words.

Examples:
azaz: stu/dent
azza: box/wood
zaaz: tri/cky
zaza: trea/son

For each of the above 4 classes provide a word with maximal score, as defined below:
1. Each letter gets its matching number: A is 1, B is 2, ...Z is 26.
2. If both parts consist of actually existing words double the words values.
3. The sum of the four results is your score.

Example: BOX / WOOD = 2*(2+15+24+23+15+15+4) = 2*98 = 196

Go get the highest value!

No Solution Yet Submitted by Ady TZIDON    
Rating: 4.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Some Thoughts from my word list | Comment 2 of 5 |
After finding the highest:

doorsills   246
oxytone     236
spoonbills  266
toolroom    246

I looked for any that scored higher than 230:

buzzers    azaz 234
doorsills  azaz 246
foothills  azaz 232
mortally   azaz 232
oxysome    azza 232
oxytone    azza 236
poolroom   zaza 238
rollmops   zaaz 240
spoonbills zaaz 266
toolroom   zaza 246
trollers   zaaz 238
trollops   zaaz 254
wolfberry  zaaz 248
wrongers   zaaz 238
 



DefDbl A-Z
Dim alpha$


Private Sub Form_Load()
 Form1.Visible = True
 
  Text1.Text = ""
 
  alpha$ = "abcdefghijklmnopqrstuvwxyz"
 
 azazScore = 0
 azzaScore = 0
 zaazScore = 0
 zazaScore = 0
 Open "c:\words\words.txt" For Input As #1
 Do
    Line Input #1, w$
    If Len(w) > 1 And w = LCase(w) Then
        baseScore = sumChars(w)
        For end1 = 1 To Len(w) - 1
          w1$ = Left(w, end1): w2$ = Mid(w, end1 + 1)
          If ascend(w1) And ascend(w2) Then
            score = baseScore
            If isWord(w1) And isWord(w2) Then score = 2 * score
            If score > azazScore Then azazScore = score: azazWord$ = w$
            If score > 230 Then Text1.Text = Text1.Text & w$ & " azaz" & " " & score & vbCrLf
          End If
          If ascend(w1) And descend(w2) Then
            score = baseScore
            If isWord(w1) And isWord(w2) Then score = 2 * score
            If score > azzaScore Then azzaScore = score: azzaWord$ = w$
            If score > 230 Then Text1.Text = Text1.Text & w$ & " azza" & " " & score & vbCrLf
          End If
          If descend(w1) And ascend(w2) Then
            score = baseScore
            If isWord(w1) And isWord(w2) Then score = 2 * score
            If score > zaazScore Then zaazScore = score: zaazWord$ = w$
            If score > 230 Then Text1.Text = Text1.Text & w$ & " zaaz" & " " & score & vbCrLf
          End If
          If descend(w1) And descend(w2) Then
            score = baseScore
            If isWord(w1) And isWord(w2) Then score = 2 * score
            If score > zazaScore Then zazaScore = score: zazaWord$ = w$
            If score > 230 Then Text1.Text = Text1.Text & w$ & " zaza" & " " & score & vbCrLf
          End If
        Next
    End If
    DoEvents
 Loop Until EOF(1)
 
 Text1.Text = Text1.Text & vbCrLf
 Text1.Text = Text1.Text & azazWord & "   " & azazScore & vbCrLf
 Text1.Text = Text1.Text & azzaWord & "   " & azzaScore & vbCrLf
 Text1.Text = Text1.Text & zaazWord & "   " & zaazScore & vbCrLf
 Text1.Text = Text1.Text & zazaWord & "   " & zazaScore & vbCrLf
 
 Text1.Text = Text1.Text & vbCrLf & " done"
  
End Sub

Function ascend(w$)
  a = 1
  For i = 2 To Len(w)
    If Mid(w, i, 1) < Mid(w, i - 1, 1) Then a = 0: Exit For
  Next
  ascend = a
End Function

Function descend(w$)
  d = 1
  For i = 2 To Len(w)
    If Mid(w, i, 1) > Mid(w, i - 1, 1) Then d = 0: Exit For
  Next
  descend = d
End Function

Function sumChars(w$)
  s = 0
  For i = 1 To Len(w)
    s = s + InStr(alpha, Mid(w, i, 1))
  Next
  sumChars = s
End Function

Function isWord(w$)
 n = Len(w$)
 w1$ = Space$(n)
 Open "c:\words\words" + LTrim$(Str$(n)) + ".txt" For Binary As #2
 l = LOF(2) / n
 low = 1: high = l
 Do
  middle = Int((low + high) / 2)
  Get #2, (middle - 1) * n + 1, w1$
  If w1$ = w$ Then isWord = 1: Close 2: Exit Function
  If w1$ < w$ Then low = middle + 1 Else high = middle - 1
 Loop Until low > high
 isWord = 0
 Close 2
End Function


  Posted by Charlie on 2021-05-27 10:08:34
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 (0)
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