Using the relationship [A=1, B=2,..... Z=26] provide a word for each tier of the triangle such that:
1. The letter sum per tier is the largest square possible.
2. The letter sum per tier is the smallest square possible.
While being squares neither SEA = 25 nor OAT = 36 are appropriate for tier three in either of the tasks #1 or #2 above.
Are you able to extend either triangle beyond 6 tiers?
DECLARE FUNCTION isSq! (s!)
CLS
OPEN "triasq2.txt" FOR OUTPUT AS #2
FOR l = 1 TO 6
OPEN "\words\words.txt" FOR INPUT AS #1
DO
LINE INPUT #1, w$
IF LEN(w$) = l THEN
t = 0
FOR i = 1 TO LEN(w$)
t = t + INSTR("abcdefghijklmnopqrstuvwxyz", MID$(w$, i, 1))
NEXT
v = isSq(t)
IF LCASE$(w$) = w$ THEN
IF v THEN
PRINT #2, USING "## ### &"; v; t; w$
END IF
END IF
END IF
LOOP UNTIL EOF(1)
CLOSE 1
PRINT #2,
NEXT
CLOSE
FUNCTION isSq (s)
n = INT(SQR(s) + .5)
IF n * n = s THEN isSq = n: ELSE isSq = 0
END FUNCTION
finds lists of qualifying words in sets depending on length. After sorting the sets, within their respective length sets, by their letter values, and deleting some of the middle-valued words, as the lower and higher values are required (but some might be considered too uncommon), you get:
sq pts word
root
1 1 a
3 9 ah
3 9 de
3 9 ed
3 9 ha
5 25 ax
5 25 et
5 25 jo
5 25 pi
2 4 aba
2 4 baa
3 9 ace
3 9 add
3 9 aga
3 9 dad
3 9 ebb
4 16 ana
4 16 bam
4 16 dak
4 16 fee
4 16 ged
4 16 hag
4 16 lac
... 25- & 36-point words deleted ...
7 49 fry
7 49 hut
7 49 hyp
7 49 not
7 49 nun
7 49 pix
7 49 pro
7 49 pul
7 49 tit
7 49 ton
7 49 way
7 49 wok
7 49 yaw
7 49 yes
7 49 zin
8 64 oxy
8 64 sty
4 16 alba
4 16 baal
4 16 caff
4 16 cage
4 16 chad
4 16 deaf
4 16 fade
4 16 gaga
4 16 haaf
5 25 acta
5 25 area
5 25 bard
5 25 bend
5 25 bima
5 25 brad
5 25 cabs
5 25 cape
5 25 cham
5 25 dahl
5 25 darb
5 25 deke
5 25 dhal
5 25 drab
5 25 egal
5 25 eked
5 25 fame
5 25 feck
5 25 gale
5 25 ghee
5 25 gied
5 25 hake
5 25 iamb
5 25 jack
5 25 jagg
5 25 kadi
5 25 laic
5 25 mach
5 25 odea
5 25 pace
5 25 scab
... 36- and 49-point words deleted ...
8 64 arty
8 64 doty
8 64 doux
8 64 dust
8 64 furs
8 64 gyms
8 64 hypo
8 64 jots
8 64 knur
8 64 koss
8 64 lazy
8 64 levy
8 64 loup
8 64 lown
8 64 musk
8 64 noun
8 64 onto
8 64 oyes
8 64 piny
8 64 pits
8 64 pons
8 64 poor
8 64 prey
8 64 puri
8 64 push
8 64 pyin
8 64 pyre
8 64 quay
8 64 revs
8 64 says
8 64 sett
8 64 spit
8 64 stet
8 64 stud
8 64 sues
8 64 surf
8 64 swim
8 64 test
8 64 tets
8 64 thou
8 64 tips
8 64 tody
8 64 toit
8 64 toon
8 64 tray
8 64 true
8 64 twat
8 64 tyne
8 64 undy
8 64 unit
8 64 upby
8 64 uses
8 64 vatu
8 64 vavs
8 64 watt
8 64 wept
8 64 wilt
8 64 wogs
8 64 zero
8 64 ziti
9 81 oozy
9 81 wyns
9 81 yups
4 16 abaci
4 16 abaka
5 25 abbas
5 25 abele
5 25 ackee
5 25 babas
5 25 clade
5 25 decal
5 25 diced
5 25 eched
5 25 edged
5 25 gaddi
5 25 gadid
5 25 gaffe
5 25 labia
5 25 laced
5 25 mecca
6 36 aches
6 36 acids
6 36 acini
6 36 agave
6 36 aghas
6 36 agree
6 36 agria
6 36 akene
6 36 areic
6 36 asana
6 36 asdic
6 36 backs
6 36 baddy
6 36 bathe
6 36 belle
6 36 bikie
6 36 biped
6 36 blabs
6 36 bribe
6 36 cacti
6 36 cadis
6 36 caids
6 36 cawed
6 36 cedes
6 36 ceria
6 36 chase
6 36 chiao
6 36 child
6 36 cleek
6 36 cliff
6 36 crack
6 36 cycad
6 36 daffs
6 36 defat
6 36 degas
6 36 dined
6 36 dreed
6 36 eager
6 36 eagre
6 36 egads
6 36 eland
6 36 erica
6 36 fated
6 36 fease
6 36 felid
6 36 fella
6 36 field
6 36 filed
6 36 flied
6 36 geode
6 36 gighe
6 36 hared
6 36 heard
6 36 japed
6 36 kibei
6 36 laden
6 36 lamia
6 36 naled
6 36 nided
6 36 niece
6 36 offed
6 36 panda
6 36 ragee
6 36 reded
6 36 samba
6 36 tabid
6 36 tabla
... 49- and 64-point words deleted ...
9 81 aunty
9 81 bortz
9 81 busts
9 81 civvy
9 81 crust
9 81 cuppy
9 81 curst
9 81 cutup
9 81 downy
9 81 doyly
9 81 envoy
9 81 footy
9 81 frows
9 81 goosy
9 81 grout
9 81 gulpy
9 81 gunny
9 81 hosts
9 81 hours
9 81 hyson
9 81 irony
9 81 jujus
9 81 junky
9 81 knout
9 81 kylix
9 81 loony
9 81 loots
9 81 lotos
9 81 lumps
9 81 lurks
9 81 luxes
9 81 messy
9 81 minty
9 81 mitts
9 81 momus
9 81 mosso
9 81 mothy
9 81 motor
9 81 moult
9 81 mourn
9 81 murex
9 81 musth
9 81 nevus
9 81 newts
9 81 ovary
9 81 pasty
9 81 patsy
9 81 plums
9 81 poops
9 81 porgy
9 81 priss
9 81 proms
9 81 punks
9 81 quint
9 81 quoth
9 81 rests
9 81 riots
9 81 romps
9 81 rotis
9 81 rubus
9 81 ruers
9 81 ruins
9 81 setup
9 81 shots
9 81 shuns
9 81 slops
9 81 slump
9 81 snits
9 81 soths
9 81 sotol
9 81 sprug
9 81 spunk
9 81 squaw
9 81 stool
9 81 stove
9 81 straw
9 81 stubs
9 81 stung
9 81 stupe
9 81 style
9 81 surds
9 81 surer
9 81 sutta
9 81 swamy
9 81 swart
9 81 swirl
9 81 syren
9 81 tauts
9 81 tepoy
9 81 thewy
9 81 tiros
9 81 tofus
9 81 tools
9 81 torsi
9 81 tower
9 81 tress
9 81 trios
9 81 trois
9 81 troth
9 81 tungs
9 81 unmix
9 81 upset
9 81 varus
9 81 vasts
9 81 votes
9 81 warts
9 81 wenny
9 81 whops
9 81 whump
9 81 willy
9 81 wrote
9 81 yeuks
9 81 zingy
10 100 nutty
10 100 pussy
5 25 abided
5 25 baddie
5 25 behead
5 25 caecal
5 25 gadded
6 36 abduce
6 36 acarid
6 36 achene
6 36 aedile
6 36 ameban
6 36 anlace
6 36 babkas
6 36 balled
6 36 barbal
6 36 barfed
6 36 baubee
6 36 beanie
6 36 becalm
6 36 beheld
6 36 calked
6 36 calpac
6 36 cancan
6 36 cardia
6 36 coccic
6 36 cohead
6 36 dachas
6 36 daggle
6 36 debase
6 36 decare
6 36 decode
6 36 deemed
6 36 deific
6 36 diadem
6 36 dicked
6 36 digged
6 36 facile
6 36 fecial
6 36 fleece
6 36 goaded
6 36 handed
6 36 hobbed
6 36 kababs
6 36 kedged
6 36 lacked
6 36 lagged
6 36 macaco
6 36 maffia
6 36 mediad
6 36 nibbed
6 36 radded
6 36 ragbag
6 36 seabed
7 49 aboral
7 49 adnexa
7 49 agonic
7 49 aikido
7 49 akelas
7 49 albeit
7 49 albite
7 49 aminic
7 49 anteed
7 49 apneal
7 49 apodal
7 49 apogee
7 49 ardebs
7 49 ariled
7 49 aucuba
7 49 baboon
7 49 bagass
7 49 bagful
7 49 bagwig
7 49 balker
7 49 bardes
7 49 barman
7 49 bazaar
7 49 beards
7 49 bearer
7 49 beetle
7 49 belady
7 49 bemock
7 49 beseem
7 49 biaxal
7 49 bibles
7 49 billie
7 49 breads
7 49 buboed
7 49 caliph
7 49 cannel
7 49 capias
7 49 carder
7 49 carnal
7 49 chador
7 49 chaffy
7 49 chalet
7 49 checks
7 49 clacks
7 49 clinch
7 49 coatee
7 49 cobias
7 49 cockle
7 49 codder
7 49 codecs
7 49 coerce
7 49 congee
7 49 corded
7 49 cuddle
7 49 damask
7 49 danger
7 49 dawdle
7 49 debars
7 49 decern
7 49 deepen
7 49 derail
7 49 dialer
7 49 dibbuk
7 49 dildoe
7 49 dished
7 49 doated
7 49 doiled
7 49 dumbed
7 49 dyable
7 49 eagles
7 49 egging
7 49 enigma
7 49 escape
7 49 farads
7 49 farina
7 49 fedora
7 49 feudal
7 49 filial
7 49 filmed
7 49 finked
7 49 fodgel
7 49 foible
7 49 fridge
7 49 galyac
7 49 gamine
7 49 gander
7 49 gapped
7 49 garden
7 49 geisha
7 49 gibbon
7 49 gilled
7 49 global
7 49 goalie
7 49 golfed
7 49 hagdon
7 49 halloa
7 49 haloid
7 49 hangar
7 49 harmed
7 49 healer
7 49 heired
7 49 hoboed
7 49 homage
7 49 icemen
7 49 inhale
7 49 inlaid
7 49 ischia
7 49 itched
7 49 jangle
7 49 kerfed
7 49 knifed
7 49 laired
7 49 lashed
7 49 leaved
7 49 leered
7 49 maches
7 49 mafias
7 49 maihem
7 49 mambas
7 49 meager
7 49 meagre
7 49 medico
7 49 midden
7 49 minded
7 49 ohmage
7 49 pained
7 49 pardee
7 49 peaces
7 49 peahen
7 49 peened
7 49 plagal
7 49 pledge
7 49 railed
7 49 rancid
7 49 ranged
7 49 raphae
7 49 ratbag
7 49 reaped
7 49 redial
7 49 reeled
7 49 relaid
7 49 sabred
7 49 sachem
7 49 samech
7 49 scarce
7 49 schema
7 49 seiche
7 49 serdab
7 49 shaled
7 49 siccan
7 49 sieged
7 49 spaded
7 49 thecal
7 49 undead
7 49 vealed
7 49 waddle
7 49 yacked
... 64- and 81-point words deleted ...
10 100 arrowy
10 100 bronzy
10 100 crusts
10 100 cutout
10 100 cutups
10 100 drossy
10 100 envoys
10 100 flurry
10 100 footsy
10 100 grouts
10 100 growly
10 100 grumpy
10 100 hysons
10 100 knouts
10 100 kousso
10 100 kuvasz
10 100 missus
10 100 motors
10 100 moults
10 100 mourns
10 100 murkly
10 100 murrey
10 100 musths
10 100 myosis
10 100 mythos
10 100 outset
10 100 plummy
10 100 potzer
10 100 pursue
10 100 putter
10 100 quarry
10 100 quints
10 100 quippu
10 100 rhyton
10 100 rosery
10 100 rosiny
10 100 rufous
10 100 savory
10 100 setout
10 100 setups
10 100 slumps
10 100 slyest
10 100 sotols
10 100 sprugs
10 100 spunks
10 100 squaws
10 100 squint
10 100 status
10 100 stools
10 100 stoves
10 100 straws
10 100 stress
10 100 stupes
10 100 styles
10 100 surely
10 100 suttas
10 100 swirls
10 100 syrens
10 100 tepoys
10 100 tetryl
10 100 thirty
10 100 thorny
10 100 toasty
10 100 towers
10 100 triply
10 100 troths
10 100 truism
10 100 tsktsk
10 100 tsoris
10 100 turkey
10 100 unmown
10 100 unsunk
10 100 unwove
10 100 upgrow
10 100 upsets
10 100 vinous
10 100 whumps
10 100 worset
10 100 xylose
10 100 yarrow
11 121 luxury
11 121 trysts
Then:
DECLARE FUNCTION isSq! (s!)
DECLARE FUNCTION sq! (x!)
DIM large$(26), small$(26), largest(26), smallest(26)
FOR i = 1 TO 26: smallest(i) = 999: NEXT
CLS
OPEN "\words\words.txt" FOR INPUT AS #1
DO
LINE INPUT #1, w$
t = 0
FOR i = 1 TO LEN(w$)
t = t + INSTR("abcdefghijklmnopqrstuvwxyz", MID$(w$, i, 1))
NEXT
v = isSq(t): l = LEN(w$)
IF LCASE$(w$) = w$ THEN
IF v THEN
IF smallest(l) > v THEN smallest(l) = v: small$(l) = w$
IF largest(l) < v THEN largest(l) = v: large$(l) = w$
END IF
END IF
LOOP UNTIL EOF(1)
CLOSE
FOR i = 1 TO 26
IF smallest(i) < 99 THEN
PRINT USING " ## ## #### &"; i; smallest(i); sq(smallest(i)); small$(i)
END IF
NEXT
PRINT
FOR i = 1 TO 26
IF largest(i) > 0 THEN
PRINT USING " ## ## #### &"; i; largest(i); sq(largest(i)); large$(i)
END IF
NEXT
FUNCTION isSq (s)
n = INT(SQR(s) + .5)
IF n * n = s THEN isSq = n: ELSE isSq = 0
END FUNCTION
FUNCTION sq (x)
sq = x * x
END FUNCTION
displays only the first found of the smallest-value and largest-value for each size word, but is not limited to just words of 6 letters or fewer:
Smallest value:
length sq value word
root
1 1 1 a
2 3 9 ah
3 2 4 aba
4 4 16 alba
5 4 16 abaci
6 5 25 abided
7 5 25 acceded
8 5 25 cabbaged
9 7 49 abdicated
10 8 64 bacchanals
11 8 64 backpedaled
12 9 81 decalcomania
13 10 100 adiabatically
14 11 121 cleanabilities
15 12 144 accessibilities
16 12 144 boneheadednesses
17 13 169 bacteriologically
18 13 169 disagreeablenesses
19 15 225 circumstantialities
20 14 196 electroencephalogram
21 17 289 unconstitutionalities
22 17 289 microspectrophotometer
Largest value:
1 1 1 a
2 5 25 ax
3 8 64 oxy
4 9 81 oozy
5 10 100 nutty
6 11 121 luxury
7 11 121 extorts
8 12 144 outports
9 13 169 outstunts
10 13 169 mutinously
11 14 196 murmurously
12 14 196 prostitution
13 14 196 counterstyles
14 15 225 overscrupulous
15 15 225 supersymmetries
16 15 225 anthropomorphist
17 16 256 illustriousnesses
18 16 256 expressionlessness
19 16 256 dimethyltryptamines
20 16 256 countersurveillances
21 17 289 unconstitutionalities
22 17 289 microspectrophotometer
|
Posted by Charlie
on 2012-08-01 13:55:32 |