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

Home > General > Word Problems
From ab to yz (Posted on 2015-07-06) Difficulty: 3 of 5
There are <qty> words containing <let1> and <let2>

For what pair of distinct letters is the quantity of non-proper words in the English language
a. minimal?
b. maximal?

Please specify your data base.

No Solution Yet Submitted by Ady TZIDON    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution | Comment 2 of 8 |
Using the ENABLE word list from the internet, this program:

DefDbl A-Z
Dim crlf$, grid(26, 26)


Private Sub Form_Load()
 Form1.Visible = True
 
 Text1.Text = ""
 crlf = Chr$(13) + Chr$(10)

 Open "\words\word.lst" For Input As #1
 Do
  Line Input #1, l$
  If InStr(l, "j") > 0 And InStr(l, "q") > 0 Then Text1.Text = Text1.Text & l & crlf
  Do
   done = 1
   For i = 1 To Len(l) - 1
    If Mid(l, i + 1, 1) < "a" Or Mid(l, i + 1, 1) > "z" Then
     l = Left(l, i) + Mid(l, i + 2)
    Else
        If Mid(l, i, 1) > Mid(l, i + 1, 1) Then
         h$ = Mid(l, i, 1)
         Mid(l, i, 1) = Mid(l, i + 1, 1)
         Mid(l, i + 1, 1) = h
         done = 0
        ElseIf Mid(l, i, 1) = Mid(l, i + 1, 1) Then
         l = Left(l, i) + Mid(l, i + 2)
        End If
    End If
   Next
  Loop Until done
  For i = 1 To Len(l) - 1
   s1 = InStr("abcdefghijklmnopqrstuvwxyz", Mid(l, i, 1))
   For j = i + 1 To Len(l)
     s2 = InStr("abcdefghijklmnopqrstuvwxyz", Mid(l, j, 1))
     grid(s1, s2) = grid(s1, s2) + 1
   Next
  Next
 Loop Until EOF(1)
 Close 1
 
 mn = 99999999
 
 For i = 1 To 25
 For j = i + 1 To 26
  If grid(i, j) < mn Then mn = grid(i, j)
  If grid(i, j) > mx Then mx = grid(i, j)
  If grid(i, j) = 8 Or grid(i, j) = 76587 Then Text1.Text = Text1.Text & Mid("abcdefghijklmnopqrstuvwxyz", i, 1) & Mid("abcdefghijklmnopqrstuvwxyz", j, 1) & " "
 Next
 Next
 
 Text1.Text = Text1.Text & crlf & mn & Str(mx) & crlf
 
 Text1.Text = Text1.Text & crlf & " done"
  
End Sub

finds, out of 176,528 words on that liist the following extrema:

8 have both J and Q.

76,587 have both E and S.

The 8 that have both J and Q are:

jacquard
jacquards
jacquerie
jacqueries
jonquil
jonquils
quillaja
quillajas

  Posted by Charlie on 2015-07-06 15:57:15
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (1)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (14)
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