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

Home > General > Word Problems
Roman Numeral and Letter Insertion (Posted on 2016-06-17) Difficulty: 3 of 5
Consider all two character valid roman numerals like IV, VI, IX ... up to MD.

Insert some letters in between the characters to tranform it into a valid word of shortest length and longest length for each numeral . An example is the word INDEX corresponding to the numeral IX – while this may or may not be the longest or shortest word.

**** Only valid English words are allowed. No proper names, abbreviations, acronyms, slangs or archaic words.

No Solution Yet Submitted by K Sengupta    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Some Thoughts computer findings | Comment 1 of 2
I figured I might as well include ii, xx, cc and mm. Only the last was specifically excluded (depending on what "like" means); the others were only omitted from the examples.

ii
 impi inti
 improvisatori
iv
 improv
 isogriv
vi
 vagi
 violoncelli
ix
 ibex ilex
 inheritrix
xi
 xi
 xystoi
xv
xx
 x
 xerox
xl
 xylol xylyl
 xylographical
li
 li
 lactobacilli leptocephali
lv
 lav lev luv
 leitmotiv
lx
 lax lex lox lux
 lockbox
xc
 xebec xenic xeric
 xenodiagnostic
ci
 chi
 cinquecentisti
cv
cx
 cox
 cephalothorax
cl
 cel col
 clinicopathological
cc
 chic croc
 chromolithographic
cd
 cad cod cud
 contradistinguished counterdemonstrated
di
 dui
 divertimenti
dv
 dev
 dev
dx
 dex
 dominatrix
dl
 dal del dol
 dendrochronological
dc
 doc
 diastereoisomeric
cm
 cam cum cwm
 counterculturalism
mi
 mi
 meningococci
mv
 maglev moshav
 maglev moshav
mx
 max mix
 mesothorax metathorax
ml
 mel mil mol
 micropaleontological
mc
 mac moc
 microspectrophotometric
md
 mad med mid mod mud
 microencapsulated microminiaturized mineralocorticoid
mm
 mm
 mesembryanthemum multiculturalism
 
DefDbl A-Z
Dim crlf$, ltr$(31), shortest$(31, 20), longest$(31, 20)

Private Sub Form_Load()
 Form1.Visible = True
 
 Open "roman.txt" For Input As #1
 
 Text1.Text = ""
 crlf = Chr$(13) + Chr$(10)
 
 For i = 1 To 31
   Input #1, ltr$(i)
   Text1.Text = Text1.Text & ltr(i) & crlf
   ltr$(i) = LCase(ltr(i))
 Next
 
 Close 1
 
 For i = 1 To 31
    shortest(i, 1) = "xxxxxxxxxxxxxxxxxxxxx"
 Next

 Open "c:\words\words.txt" For Input As #1
 Do
   DoEvents
   Line Input #1, l$
   For i = 1 To 31
     If Left(l, 1) = Left(ltr(i), 1) And Right(l, 1) = Right(ltr(i), 1) Then
       If Len(l) < Len(shortest(i, 1)) Then
         shortest(i, 0) = "1"
         shortest(i, 1) = l
        ElseIf Len(l) = Len(shortest(i, 1)) Then
         n = Val(shortest(i, 0)) + 1
         shortest(i, 0) = LTrim(Str(n))
         shortest(i, n) = l
       End If
       If Len(l) > Len(longest(i, 1)) Then
         longest(i, 0) = "1"
         longest(i, 1) = l
        ElseIf Len(l) = Len(longest(i, 1)) Then
         n = Val(longest(i, 0)) + 1
         longest(i, 0) = LTrim(Str(n))
         longest(i, n) = l
       End If
       Exit For
     End If
   Next
   
 Loop Until EOF(1)
 Close 1
 
 For i = 1 To 31
   DoEvents
   Text1.Text = Text1.Text & ltr(i) & crlf
   hadone = 0
   For j = 1 To Val(shortest(i, 0))
     Text1.Text = Text1.Text & " " & shortest(i, j)
     hadone = 1
   Next
   If hadone > 0 Then Text1.Text = Text1.Text & crlf
   hadone = 0
   For j = 1 To Val(longest(i, 0))
     Text1.Text = Text1.Text & " " & longest(i, j)
     hadone = 1
   Next
   If hadone > 0 Then Text1.Text = Text1.Text & crlf
 Next i
  
 Text1.Text = Text1.Text & crlf & " done"
  
End Sub

The list is slightly different when using the online ENABLE word list (at least x is not counted as a word, eligible for xx):

ii
 impi inti
 improvisatori
iv
 improv
 isogriv
vi
 vagi
 violoncelli
ix
 ibex ilex
 inheritrix
xi
 xi
 xystoi
xv
xx
 xerox
 xerox
xl
 xylol xylyl
 xylographical
li
 li
 lactobacilli leptocephali
lv
 lav lev luv
 leitmotiv
lx
 lax lex lox lux
 lockbox
xc
 xebec xenic xeric
 xenodiagnostic
ci
 chi
 cinquecentisti
cv
cx
 cox
 cephalothorax
cl
 cel col
 clinicopathological
cc
 chic croc
 chromolithographic
cd
 cad cod cud
 contradistinguished counterdemonstrated
di
 dui
 divertimenti
dv
 dev
 dev
dx
 dex
 dominatrix
dl
 dal del dol
 dendrochronological
dc
 doc
 diastereoisomeric
cm
 cam cum cwm
 counterculturalism
mi
 mi
 meningococci
mv
 maglev moshav
 maglev moshav
mx
 max mix
 mesothorax metathorax
ml
 mel mil mol
 micropaleontological
mc
 mac moc
 microspectrophotometric
md
 mad med mid mod mud
 microencapsulated microminiaturized mineralocorticoid
mm
 mm
 mesembryanthemum multiculturalism

If mm is taken to be an abbreviation, the next best is mom or mum.


  Posted by Charlie on 2016-06-17 14:27:27
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 (24)
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