[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

[QUIZ] Cryptogram II (#206

Daniel Moore

5/22/2009 5:13:00 PM

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

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.../s...

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.../q...

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

## 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


--
-Daniel
http://rubyquiz...

14 Answers

Robert Dober

5/22/2009 5:20:00 PM

0

On Fri, May 22, 2009 at 7:12 PM, Daniel Moore <yahivin@gmail.com> wrote:
> -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=
=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-
>
> The three rules of Ruby Quiz:
>
> 1. =A0Please do not post any solutions or spoiler discussion for this
> quiz until 48 hours have elapsed from the time this message was
> sent.
>
> 2. =A0Support Ruby Quiz by submitting ideas and responses
> as often as you can!
> Visit: http://rubyquiz.../s...
>
> 3. =A0Enjoy!
>
> Suggestion: =A0A [QUIZ] in the subject of emails about the problem
> helps everyone on Ruby Talk follow the discussion. =A0Please reply to
> the original quiz message, if you can.
>
> RSS Feed: http://rubyquiz.../q...
>
> -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=
=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-
>
> ## 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
>
>
> --
> -Daniel
> http://rubyquiz...
>
This is a strange way to spell
MARY HADA LITT LELA MBDA

R.



--=20
Toutes les grandes personnes ont d=92abord =E9t=E9 des enfants, mais peu
d=92entre elles s=92en souviennent.

All adults have been children first, but not many remember.

[Antoine de Saint-Exup=E9ry]

-lim-

5/25/2009 3:22:00 PM

0

> 1. =A0Please do not post any solutions or spoiler discussion for this
> quiz until 48 hours have elapsed from the time this message was
> sent.

> YRFFJ OSLXA PQPQY APVRR DPNSA ZAPIK

Since 48 hours have passed, maybe somebody could at least explain what
this quiz was about. Or maybe simply post a solution.

Cheers.

Martin DeMello

5/25/2009 3:30:00 PM

0

On Mon, May 25, 2009 at 8:51 PM, lith <minilith@gmail.com> wrote:
>> 1. =A0Please do not post any solutions or spoiler discussion for this
>> quiz until 48 hours have elapsed from the time this message was
>> sent.
>
>> YRFFJ OSLXA PQPQY APVRR DPNSA ZAPIK
>
> Since 48 hours have passed, maybe somebody could at least explain what
> this quiz was about. Or maybe simply post a solution.

About: Write a ruby program to convert that into English text.

martin

Joshua Ball

5/25/2009 11:35:00 PM

0

Check out this link to understand what a cryptogram is:
http://en.wikipedia.org/wiki/...




-----Original Message-----
From: Martin DeMello [mailto:martindemello@gmail.com]=20
Sent: Monday, May 25, 2009 8:30 AM
To: ruby-talk ML
Subject: Re: Cryptogram II (#206)

On Mon, May 25, 2009 at 8:51 PM, lith <minilith@gmail.com> wrote:
>> 1. =A0Please do not post any solutions or spoiler discussion for this
>> quiz until 48 hours have elapsed from the time this message was
>> sent.
>
>> YRFFJ OSLXA PQPQY APVRR DPNSA ZAPIK
>
> Since 48 hours have passed, maybe somebody could at least explain what
> this quiz was about. Or maybe simply post a solution.

About: Write a ruby program to convert that into English text.

martin



-lim-

5/26/2009 3:59:00 AM

0

On May 26, 1:34=A0am, Joshua Ball <Joshua.B...@microsoft.com> wrote:
> Check out this link to understand what a cryptogram is:http://en...
a.org/wiki/Cryptogram

I was wondering if the blanks represent actual word breaks or not. If
this were the case and if we were dealing with a normal cryptogram,
the word "FFYJM" would begin with two times the same letter. English
isn't my mother tongue but this seems rather unlikely to me which is
why I have concluded that is isn't a normal cryptogram, which is about
the point where I stopped.

Also, there already was a rubyquiz about solving cryptograms, which
made me suspect that we are dealing with something else here. Was I
wrong?

Luke Cowell

5/26/2009 4:39:00 AM

0

lith wrote:
> I was wondering if the blanks represent actual word breaks or not. If
> this were the case and if we were dealing with a normal cryptogram,
> the word "FFYJM" would begin with two times the same letter. English
> isn't my mother tongue but this seems rather unlikely to me which is
> why I have concluded that is isn't a normal cryptogram, which is about
> the point where I stopped.

I was thinking that each tuple represents a single letter. It seems
unlikely that we have 36 words that all have exactly 5 letters in them.

Luke
--
Posted via http://www.ruby-....

Martin Boese

5/26/2009 4:46:00 AM

0

I was starting something like this. But it doesn't seem to work out:

crypt = <<-ENDC
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
ENDC

('A'[0]..'Z'[0]).each { |c| puts "#{c.chr} -> #{crypt.count(c.chr)}" }
A -> 14
B -> 5
C -> 0
D -> 2
E -> 6
F -> 9
G -> 2
H -> 6
I -> 18
J -> 10
K -> 8
L -> 2
M -> 6
N -> 3
O -> 12
P -> 11
Q -> 11
R -> 15
S -> 11
T -> 1
U -> 2
V -> 3
W -> 0
X -> 9
Y -> 7
Z -> 5


english = File.read('/usr/share/dict/words').upcase

('A'[0]..'Z'[0]).each { |c| puts "#{c.chr} ->#{english.count(c.chr)}" }
A -> 64123
B -> 15524
C -> 31569
D -> 28877
E -> 88441
F -> 10551
G -> 23073
H -> 19313
I -> 66892
J -> 1915
K -> 8456
L -> 40826
M -> 22433
N -> 57227
O -> 48779
P -> 21891
Q -> 1510
R -> 57035
S -> 88135
T -> 52446
U -> 25927
V -> 7903
W -> 7431
X -> 2124
Y -> 12507
Z -> 3238



On Tue, 2009-05-26 at 00:21 +0900, lith wrote:
> > 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.
>
> > YRFFJ OSLXA PQPQY APVRR DPNSA ZAPIK
>
> Since 48 hours have passed, maybe somebody could at least explain what
> this quiz was about. Or maybe simply post a solution.
>
> Cheers.


Harry Kakueki

5/26/2009 12:39:00 PM

0

On Tue, May 26, 2009 at 12:59 PM, lith <minilith@gmail.com> wrote:
> On May 26, 1:34 am, Joshua Ball <Joshua.B...@microsoft.com> wrote:
>> Check out this link to understand what a cryptogram is:http://en.wikipedia.org/wiki/...
>
> I was wondering if the blanks represent actual word breaks or not. If
> this were the case and if we were dealing with a normal cryptogram,
> the word "FFYJM" would begin with two times the same letter. English
> isn't my mother tongue but this seems rather unlikely to me which is
> why I have concluded that is isn't a normal cryptogram, which is about
> the point where I stopped.
>
> Also, there already was a rubyquiz about solving cryptograms, which
> made me suspect that we are dealing with something else here. Was I
> wrong?
>
>

"FFYJM" could be ["oomph", "oozed", "oozes"] but "PQPQY" could be
["cacao", "cocoa", "dodos", "lulus", "mamas", "mimic", "tutus",
"vivid"].

Looking at these, there is no common letter for "Y".
So, I don't think these are just a bunch of five letter words.

Harry

--
A Look into Japanese Ruby List in English
http://www.kakueki.com/ruby...

Rob Biedenharn

5/26/2009 1:06:00 PM

0

On May 26, 2009, at 8:38 AM, Harry Kakueki wrote:
> On Tue, May 26, 2009 at 12:59 PM, lith <minilith@gmail.com> wrote:
>> On May 26, 1:34 am, Joshua Ball <Joshua.B...@microsoft.com> wrote:
>>> Check out this link to understand what a cryptogram is:http://en.wikipedia.org/wiki/...
>>
>> I was wondering if the blanks represent actual word breaks or not. If
>> this were the case and if we were dealing with a normal cryptogram,
>> the word "FFYJM" would begin with two times the same letter. English
>> isn't my mother tongue but this seems rather unlikely to me which is
>> why I have concluded that is isn't a normal cryptogram, which is
>> about
>> the point where I stopped.
>>
>> Also, there already was a rubyquiz about solving cryptograms, which
>> made me suspect that we are dealing with something else here. Was I
>> wrong?
>
> "FFYJM" could be ["oomph", "oozed", "oozes"] but "PQPQY" could be
> ["cacao", "cocoa", "dodos", "lulus", "mamas", "mimic", "tutus",
> "vivid"].
>
> Looking at these, there is no common letter for "Y".
> So, I don't think these are just a bunch of five letter words.
>
> Harry
>
> --
> A Look into Japanese Ruby List in English
> http://www.kakueki.com/ruby...


Come on people! This is a standard technique to prevent things like
lone letters or letter pairs providing too much help. The whole
cryptogram is likely a simple substitution (one letter stands for
another) with possible "filler" letters at the end (to make a multiple
of 5). You need to find word breaks after you apply a substitution.

Martin is probably on the right track with comparing frequency counts
between English and the cryptogram, but that's only a start. Once you
have a candidate substitution, you have to see if you can pull letters
off the cryptogram to form words. If you get a series of words that
leaves fewer than 5 letters at the end, then you very likely have a
solution.

-Rob

Rob Biedenharn http://agileconsult...
Rob@AgileConsultingLLC.com



Harry Kakueki

5/26/2009 1:46:00 PM

0

On Tue, May 26, 2009 at 10:05 PM, Rob Biedenharn
<Rob@agileconsultingllc.com> wrote:
> On May 26, 2009, at 8:38 AM, Harry Kakueki wrote:
>>
>> On Tue, May 26, 2009 at 12:59 PM, lith <minilith@gmail.com> wrote:
>>>
>>> On May 26, 1:34 am, Joshua Ball <Joshua.B...@microsoft.com> wrote:
>>>>
>>>> Check out this link to understand what a cryptogram
>>>> is:http://en.wikipedia.org/wiki/...
>>>
>>> I was wondering if the blanks represent actual word breaks or not. If
>>> this were the case and if we were dealing with a normal cryptogram,
>>> the word "FFYJM" would begin with two times the same letter. English
>>> isn't my mother tongue but this seems rather unlikely to me which is
>>> why I have concluded that is isn't a normal cryptogram, which is about
>>> the point where I stopped.
>>>
>>> Also, there already was a rubyquiz about solving cryptograms, which
>>> made me suspect that we are dealing with something else here. Was I
>>> wrong?
>>
>> "FFYJM" could be ["oomph", "oozed", "oozes"] but "PQPQY" could be
>> ["cacao", "cocoa", "dodos", "lulus", "mamas", "mimic", "tutus",
>> "vivid"].
>>
>> Looking at these, there is no common letter for "Y".
>> So, I don't think these are just a bunch of five letter words.
>>
>> Harry
>>
>> --
>> A Look into Japanese Ruby List in English
>> http://www.kakueki.com/ruby...
>
>
> Come on people! This is a standard technique to prevent things like lone
> letters or letter pairs providing too much help. The whole cryptogram is
> likely a simple substitution (one letter stands for another) with possible
> "filler" letters at the end (to make a multiple of 5). You need to find word
> breaks after you apply a substitution.
>
> Martin is probably on the right track with comparing frequency counts
> between English and the cryptogram, but that's only a start. Once you have a
> candidate substitution, you have to see if you can pull letters off the
> cryptogram to form words. If you get a series of words that leaves fewer
> than 5 letters at the end, then you very likely have a solution.
>
> -Rob
>
> Rob Biedenharn http://agileconsult...
> Rob@AgileConsultingLLC.com
>
>
>
>

I think most people are aware of everything you said.
And it will probably be easy to understand after seeing the result.
But there are many tricks that could be used here and I suspect that
most people only have a few hours to work on this, not days.
Also, it is easy to criticize others without actually having a
solution of your own. :)

Harry

--
A Look into Japanese Ruby List in English
http://www.kakueki.com/ruby...