Jump to content
BrainDen.com - Brain Teasers
  • 0


superprismatic
 Share

Question

The numbers 1 to N are written in

scrambled order in the diagonal cells

of an N by N square (from upper left

to lower right). A message is written

horizontally in this square, starting

in the row in which the 1 appears,

then 2, etc. It is then taken out

vertically, taken in columns in the

order indicated by the numbers. Using

this method with N=6 and the sequence

6,3,2,5,1,4, the quotation "To be or

not to be, that is the question"

becomes


O T T U T T B Q B I S N E O T
N H T E O I E O E S O R H T A
[/code] Read the following:
[code]
U W D G O C A Y N E B F F R E
S N N A U E D D H S I C R O E
A A R U L U O O O N O S M A L
M M N U R I A R M I T

Link to comment
Share on other sites

14 answers to this question

Recommended Posts

  • 0

I can't replicate your example. I should be able to reassemble the quote by inserting the transposed columns in the correct order. I assume that the order you have printed the columns is

1 2 3

4 5 6

i.e. S N E O T is the 3rd column. If I do this, I don't get the original quote.

Where am I going wrong?

Also, please clarify the quote you want decoded - is that a single 12x12 squares or two separate 6x6 squares?

Link to comment
Share on other sites

  • 0

I can't replicate your example. I should be able to reassemble the quote by inserting the transposed columns in the correct order. I assume that the order you have printed the columns is

1 2 3

4 5 6

i.e. S N E O T is the 3rd column. If I do this, I don't get the original quote.

Where am I going wrong?

Also, please clarify the quote you want decoded - is that a single 12x12 squares or two separate 6x6 squares?

I can't replicate the "to be" example neither. I write the "to be" quote horizonally in row 5, 3, 2, 6, 4, and then I take out the letters from column 5, 3, 2, 6, 4, 1. My coded text comes out as


T O O O Q   H T T B H   T O S O T   

I B N R U   A T I E E   E N E T S

By the way, if there happens to be a row of blanks in the middle of the horizonal fill-in operation (as a result of say this scrambling vector ( 1,2, 6, 3, 4, 5) ), how would that come out in the encoded text?

Edited by bushindo
Link to comment
Share on other sites

  • 0

I can't replicate your example. I should be able to reassemble the quote by inserting the transposed columns in the correct order. I assume that the order you have printed the columns is

1 2 3

4 5 6

i.e. S N E O T is the 3rd column. If I do this, I don't get the original quote.

Where am I going wrong?

Also, please clarify the quote you want decoded - is that a single 12x12 squares or two separate 6x6 squares?

S N E O T isn't necessarily the third column. It's the column that has the number 3 in it, since the 1-N are scrambled in the order they're written on the diagonal. I replicated his table, but I'm going to have an interesting time with the second one. At least I figured out what N is. Now to work up the order. I do have a question though. Is the second set of letters in the same column order as the first (left to right)?

Link to comment
Share on other sites

  • 0

Perhaps the "To be.." example will be enlightening:


6 S T I O N
O 3 B E T H
R N 2 O T T
H E Q 5 U E
T O B E 1 O
A T I S T 4
[/code]

So the beginning of the quote (the first 5 letters)

goes from right-to-left in the row containing the 1.

The next five letters go in the cow containing 2, etc.

Then, you pull out first (from top to bottom) from

the column containing the 1. I hope this clears it up.

Link to comment
Share on other sites

  • 0

Then wouldn't each column have 7 letters, i.e. shouldn't the extracted solution look more like:

xxxxxxx xxxxxxx xxxxxxx xxxxxxx

xxxxxxx xxxxxxx xxxxxxx xxxxxxx

or is the spacing just a decoy?

Link to comment
Share on other sites

  • 0

Then wouldn't each column have 7 letters, i.e. shouldn't the extracted solution look more like:

xxxxxxx xxxxxxx xxxxxxx xxxxxxx

xxxxxxx xxxxxxx xxxxxxx xxxxxxx

or is the spacing just a decoy?

Spacing isn't a decoy. It's just used to make it easy to read the text. Other than that, spaces aren't used. Look at my "To be..." example above and you can see that spaces don't matter.

Oh, I see what you mean now! In the "To be..." example, the letters just happened to come out in groups of 5. I guess that is confusing. But, just ignore spacing.

Edited by superprismatic
Link to comment
Share on other sites

  • 0

im pretty sure i got it

learnsomewisdomfromconfuciusandangourlateryouredumbagain

learn some wisdom from confucius and angour later youre dumb again

goes as

72518346

7youredu

m2ewisdo

an5dango

lea1rnso

mbag8ain

mfrom3co

nfuciu4s

urlater6

and for the record im dumb again

Link to comment
Share on other sites

  • 0

im pretty sure i got it

learnsomewisdomfromconfuciusandangourlateryouredumbagain

learn some wisdom from confucius and angour later youre dumb again

goes as

72518346

7youredu

m2ewisdo

an5dango

lea1rnso

mbag8ain

mfrom3co

nfuciu4s

urlater6

and for the record im dumb again

Ha, you beat me to it. I'd like to know your technique, though.

I brute forced this, and generated all 40320 strings of 56-letters. Finding the english saying isn't easy, though. I tried 2-letter pair frequencies, but no luck. I then grabbed a list of 200 most common english words, and then used regular expression to find how many words each string contains. Luckily, the solution contains 10 of the most common 200 words, so that just popped right out.

Link to comment
Share on other sites

  • 0

im pretty sure i got it

learnsomewisdomfromconfuciusandangourlateryouredumbagain

learn some wisdom from confucius and angour later youre dumb again

goes as

72518346

7youredu

m2ewisdo

an5dango

lea1rnso

mbag8ain

mfrom3co

nfuciu4s

urlater6

and for the record im dumb again

Good work! You got it! I suppose I made a typo because it should have been "an hour later" instead of "an gour later". But, you have my admiration for this nice solution! Nice!

Link to comment
Share on other sites

  • 0

so what do you know, I was wondering who the anguor was, thought i was missing something. I dont know much about old philosophers so i just put it hoping people would assume i knew who he was.

anywho i wrote a quick program (that wasnt that quick to write). that outputted all possibilities. that didnt do much for me. So i output random 300. scanned for a common word and noticed(maybe by luck) the high probability of a for, you,your, or youre. So i eliminated all that didnt have one of those. This was still way too many. so i eliminated all that had more then 4 consonants in a row. while this was half lucky it was probable and worked. i had spaces in my array where the numbers were in the matrix so i actually eliminated all that had 5 non vowels in a row with spaces included. this caused some 4 consonants to not be eliminated but the effect was the same. anyway this limited it to 147.

at this point it was an issue of did i want to scan it or take probable guesses at more restrictions

I decided to take another chance eliminating all that had 4 vowels in a row limiting it to 133.(big whoop)

anyway at this point i scanned decided to eliminate all starting with vowels (101)

at this point the lack of progress made me just scan and I found it. My plan was if I didnt find it, to slowly weaken the restrictions, while eliminating the ones that fit the previous restrictions, but didnt really need too when i saw the answer. anyway

bushindo,

I was wondering how did you compare it to that many words, I left it as a array of chars so i had to do

if(...='y'&&...+1='o'&&...+2='u')

did you do that for all of them by a loop going through the array of the words you were checking against?

Link to comment
Share on other sites

  • 0

so what do you know, I was wondering who the anguor was, thought i was missing something. I dont know much about old philosophers so i just put it hoping people would assume i knew who he was.

anywho i wrote a quick program (that wasnt that quick to write). that outputted all possibilities. that didnt do much for me. So i output random 300. scanned for a common word and noticed(maybe by luck) the high probability of a for, you,your, or youre. So i eliminated all that didnt have one of those. This was still way too many. so i eliminated all that had more then 4 consonants in a row. while this was half lucky it was probable and worked. i had spaces in my array where the numbers were in the matrix so i actually eliminated all that had 5 non vowels in a row with spaces included. this caused some 4 consonants to not be eliminated but the effect was the same. anyway this limited it to 147.

at this point it was an issue of did i want to scan it or take probable guesses at more restrictions

I decided to take another chance eliminating all that had 4 vowels in a row limiting it to 133.(big whoop)

anyway at this point i scanned decided to eliminate all starting with vowels (101)

at this point the lack of progress made me just scan and I found it. My plan was if I didnt find it, to slowly weaken the restrictions, while eliminating the ones that fit the previous restrictions, but didnt really need too when i saw the answer. anyway

bushindo,

I was wondering how did you compare it to that many words, I left it as a array of chars so i had to do

if(...='y'&&...+1='o'&&...+2='u')

did you do that for all of them by a loop going through the array of the words you were checking against?

I guess you did this in C or one of its derivatives. I did this in Python, which has a regular expression (re) package. I used the built-in function

re.search( substring, parent_string)

which basically tells me whether the substring is in parent_string or not (also how many times too ). If you haven't come across regular expression before, I highly recommend a look. It is one of the more useful things I learned in my undergrad years.

Edited by bushindo
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...