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

Home > General > Word Problems
The Most Letters (Posted on 2004-10-03) Difficulty: 2 of 5
What everyday word from the English language uses the highest number of differing letters? I am after the shortest word with the most letters.

eg.
KNIFE has 5, where SPOON only has 4. so KNIFE is better.
The word SPINES has 5 differing letters but is 6 letters long so KNIFE would be better here also.
The word POSTERS has 6 differing letters, even though it is 7 letters long, this will beat KNIFE.

See The Solution Submitted by Juggler    
Rating: 3.0000 (2 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution Solution (VB program used) | Comment 3 of 12 |

No English word, common or uncommon, equals "superacknowledgment" in packing so many unique letters, 16, into so few total letters, 19.

Visual Basic program used:

Imports System
Imports System.IO
Imports System.Text
Imports System.Runtime.InteropServices
Imports System.Math
Module Module1
    Sub Main()
        Randomize()
        Dim stragain As String
        stragain = "y"
        While stragain = "y"
            main_process()
            Console.WriteLine("Try again ? (y/n)")
            stragain = LCase(Console.ReadLine())
        End While
    End Sub

    Sub main_process()
        Dim intlimit As Integer
        intlimit = 0
        While intlimit < 1
            Console.WriteLine("How many different letters ?")
            intlimit = Int(Console.ReadLine())
        End While
        gettopword(intlimit)
    End Sub

    Sub gettopword(ByRef intlimit)
        Dim strword As String
        Dim intcount As Integer
        Dim intsub As Integer
        Dim strwork(100) As String
        Dim strprevword As String
        Dim strsame As String
        Dim objStreamReader As StreamReader
        objStreamReader = _
        New StreamReader("C:VB.WORD.MASTER")
        strprevword = " "
        While 100 > 0
            strword = objStreamReader.ReadLine
            If strword <= " " Then
                Exit While
            End If
            strword = LCase(strword)
            If strword <= strprevword Then
                Console.WriteLine( _
                strword & " <= " & strprevword)
                strprevword = "??????"
                Exit While
            End If
            strprevword = strword
            For index1 As Integer = 0 To 99
                strwork(index1) = " "
            Next
            For index1 As Integer = 1 To Len(strword)
                strwork(index1 - 1) = Mid(strword, index1, 1)
                intsub = index1 - 1
            Next
            For index1 As Integer = 0 To intsub - 1
                For index2 As Integer = index1 + 1 To intsub
                    If strwork(index1) <> " " And _
                    strwork(index1) = strwork(index2) Then
                        strwork(index2) = " "
                    End If
                Next
            Next
            intcount = 0
            For index1 As Integer = 0 To intsub
                If strwork(index1) <> " " Then
                    intcount += 1
                End If
            Next
            If intcount = intlimit Then
                Console.WriteLine(" ")
                Console.WriteLine(strword & _
                " has " & Str(intcount) & " different letters")
                Console.WriteLine( _
                " and " & Str(intsub + 1) & " total letters")
            End If
        End While
        objStreamReader.Close()
        If strprevword = "??????" Then
            For index1 As Integer = 0 To 9
                Console.WriteLine("ERROR !!!!!")
            Next
            Console.WriteLine( _
            "Wordlist master file is not in ascending sequence.")
            Console.ReadLine()
            End
        End If
    End Sub
End Module

 

Edited on October 3, 2004, 5:48 pm

Edited on October 3, 2004, 5:52 pm
  Posted by Penny on 2004-10-03 15:51:54

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 (6)
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