From: Martin Boese Date: 2009-05-27T16:28:39+09:00 Subject: Re: [QUIZ] Cryptogram II (#206) Got it ;-) Below the result. How? Instead of counting characters look for repeating sequences. Then think carefully about the long word that it finds. I used this (ugly) code: crypted = < 1 end cfound[len] = found.sort { |a,b| a[1]<=>b[1] } end (1..11).each do |idx| k = idx v = cfound[idx] n = cfound[k+1] || [] v.each do |f| puts "#{f[0]} => #{f[1]}" unless n.find { |e| e[0].include?(f[0]) } end end This website then helps: http://tomacorp.com/codes/workbench.html Result: sub = [['A', 'I'], ['B', 'G'], ['C', '.'] , ['D', 'K'], ['E', 'D'], ['F', 'L'], ['G', '.'], ['H', 'N'], ['I', 'A'], ['J', 'O'], ['K', 'C'], ['L', 'B'], ['M', 'P'], ['N', 'Q'], ['O', 'R'], ['P', 'S'], ['Q', 'T'], ['R', 'E'], ['S', 'U'], ['T', 'F'], ['U', '.'], ['V', 'W'], ['W', '.'], ['X', 'Y'], ['Y', 'H'], ['Z', 'Z'] ] Now back to work... Martin On Sat, 2009-05-23 at 02:12 +0900, Daniel Moore wrote: > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- > > The three rules of Ruby Quiz: > > 1. Please do not post any solutions or spoiler discussion for this > quiz until 48 hours have elapsed from the time this message was > sent. > > 2. Support Ruby Quiz by submitting ideas and responses > as often as you can! > Visit: http://rubyquiz.strd6.com/suggestions > > 3. Enjoy! > > Suggestion: A [QUIZ] in the subject of emails about the problem > helps everyone on Ruby Talk follow the discussion. Please reply to > the original quiz message, if you can. > > RSS Feed: http://rubyquiz.strd6.com/quizzes.rss > > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- > > ## Cryptogram II (#206) > > YRFFJ OSLXA PQPQY APVRR DPNSA ZAPIK > OXMQJ BOIMY XMSZZ FRIHE AUXJS IOROR > IEAHB QYAPQ YRHXJ STRIF ORIEX KOIKD > REAQK JHBOI QSFIQ AJHPA QPKIF FREKO > XMQJB OIGAA LRKIS PRNSA Z13VI PIKOX > MQJBO IGNSA ZIPVR FFYJM RXJSY IEUSH > >