Problem 059
Forum rules
As your posts will be visible to the general public you are requested to be thoughtful in not posting anything that might explicitly give away how to solve a particular problem.
This forum is NOT meant to discuss solution methods for a problem.
See also the topics:
Don't post any spoilers
Comments, questions and clarifications about PE problems.
As your posts will be visible to the general public you are requested to be thoughtful in not posting anything that might explicitly give away how to solve a particular problem.
This forum is NOT meant to discuss solution methods for a problem.
In particular don't post any code fragments or results.
Don't start begging others to give partial answers to problems
Don't ask for hints how to solve a problem
Don't start a new topic for a problem if there already exists one
Don't start begging others to give partial answers to problems
Don't ask for hints how to solve a problem
Don't start a new topic for a problem if there already exists one
See also the topics:
Don't post any spoilers
Comments, questions and clarifications about PE problems.
-
Flood
- Posts: 7
- Joined: Wed May 15, 2013 4:53 pm
Re: Problem 059
Would someone mind to take a look at my code (Python)? I think I have a decent approach but when I execute it I get weird characters (like musical notes, something similar to a telephone...) in the console and even the format gets scrambled. The XOR example works fine and I've been tested some other cases... Thanks.
-
satyres
- Posts: 31
- Joined: Thu Feb 20, 2014 2:48 pm
Re: Problem 059
Hi, i have a little problem with this one ,i missunderstand the problem because english is not my mother tongue ! so if anyone would explain where is the password to encrypt the text !
Thanks very much for your help
Thanks very much for your help
- stijn263
- Posts: 1505
- Joined: Sat Sep 15, 2007 11:57 pm
- Location: Netherlands
Re: Problem 059
Guessing the password is part of the problem. It consists of three lower case characters for example abc, xyz, hex, qwe, etc
-
satyres
- Posts: 31
- Joined: Thu Feb 20, 2014 2:48 pm
Re: Problem 059
Just a question : the password is in the text file ?stijn263 wrote:Guessing the password is part of the problem. It consists of three lower case characters for example abc, xyz, hex, qwe, etc
- stijn263
- Posts: 1505
- Joined: Sat Sep 15, 2007 11:57 pm
- Location: Netherlands
Re: Problem 059
No it's not.
There's a single password, that you can use to decrypt the text file (using the procedure described in the problem text, the bitwise xor), that will result in a valid english text.
Solving this problem is about finding the password.
There's a single password, that you can use to decrypt the text file (using the procedure described in the problem text, the bitwise xor), that will result in a valid english text.
Solving this problem is about finding the password.
-
satyres
- Posts: 31
- Joined: Thu Feb 20, 2014 2:48 pm
Re: Problem 059
Thanks for the help !stijn263 wrote:No it's not.
There's a single password, that you can use to decrypt the text file (using the procedure described in the problem text, the bitwise xor), that will result in a valid english text.
Solving this problem is about finding the password.
You said that we have to guess the password ! that's mean that there is not a way to find it ! just try each time a sequence of 3 alphabet ?
this is a little bit strange
- hk
- Administrator
- Posts: 12832
- Joined: Sun Mar 26, 2006 10:34 am
- Location: Haren, Netherlands
Re: Problem 059
Come to think of it:
How many three letter passwords are there?
Would it be too much of a trouble to go over them and find out which one converts the text into a valid English one?
You need only to find out a way to let your program decide if the converted text is a valid English one.
How many three letter passwords are there?
Would it be too much of a trouble to go over them and find out which one converts the text into a valid English one?
You need only to find out a way to let your program decide if the converted text is a valid English one.

War ruins the life and health of untold numbers of innocent children.
-
satyres
- Posts: 31
- Joined: Thu Feb 20, 2014 2:48 pm
Re: Problem 059
Thanks so much for the clarification !hk wrote:Come to think of it:
How many three letter passwords are there?
Would it be too much of a trouble to go over them and find out which one converts the text into a valid English one?
You need only to find out a way to let your program decide if the converted text is a valid English one.
last question please because english is not my mother tongue !
English valid text contain only Alphabet ,but there some special characters like ' and " - are there included too.
Thanks so much and sorry if i had bothered you with my question
- hk
- Administrator
- Posts: 12832
- Joined: Sun Mar 26, 2006 10:34 am
- Location: Haren, Netherlands
Re: Problem 059
A valid English text can also contain other characters than [a..z,A..Z], can't it?

War ruins the life and health of untold numbers of innocent children.
-
satyres
- Posts: 31
- Joined: Thu Feb 20, 2014 2:48 pm
Re: Problem 059
Please execuse multiple question but in english as i know we can write for example : I will = I'll ! or i"ll it's correct right ??hk wrote:A valid English text can also contain other characters than [a..z,A..Z], can't it?
- hk
- Administrator
- Posts: 12832
- Joined: Sun Mar 26, 2006 10:34 am
- Location: Haren, Netherlands
Re: Problem 059
Forget for a moment that English.
Suppose the text should be in your mother tongue.
How would you proceed then?
Suppose the text should be in your mother tongue.
How would you proceed then?

War ruins the life and health of untold numbers of innocent children.
-
satyres
- Posts: 31
- Joined: Thu Feb 20, 2014 2:48 pm
Re: Problem 059
sorry for being late to respond !hk wrote:Forget for a moment that English.
Suppose the text should be in your mother tongue.
How would you proceed then?
I think that i would seek for the alphabet in my mother tongue ! and then see if there any sepecial char otherwise it's wrong !
- hk
- Administrator
- Posts: 12832
- Joined: Sun Mar 26, 2006 10:34 am
- Location: Haren, Netherlands
Re: Problem 059
Is this really how you see with one eye if a text is in English or French?
According to you the text:
Kleiner Mann was machst du nun
is perfect French and English and Spanish as well as perfect Italian and perfect Portuguese, which isn't true true because it is German.
According to you the text:
Kleiner Mann was machst du nun
is perfect French and English and Spanish as well as perfect Italian and perfect Portuguese, which isn't true true because it is German.

War ruins the life and health of untold numbers of innocent children.
- Marcus_Andrews
- Administrator
- Posts: 1637
- Joined: Wed Nov 09, 2011 5:23 pm
Re: Problem 059
@satyres : As hk said, there aren't that many three-letter passwords. This means you could probably do something manually.
- dawghaus4
- Posts: 56
- Joined: Fri Nov 29, 2013 2:22 am
Re: Problem 059
satyres,
It does not matter if the text contains special character ( '. ", /, 3, etc.) the same password would be used to encode and decode them.
As far as special characters in the password, the problem states "the encryption key consists of three lower case characters." In the English language, that is generally taken to be from the set {a, b, c, … z}. If the problem intended to allow other characters to be part of the encryption key, it should state that, or this thread would have lots of objections to the phrasing.
As suggested above, one might try all possible three-letter combinations - that will solve the problem - The question then becomes, "how to streamline the process?"
It does not matter if the text contains special character ( '. ", /, 3, etc.) the same password would be used to encode and decode them.
As far as special characters in the password, the problem states "the encryption key consists of three lower case characters." In the English language, that is generally taken to be from the set {a, b, c, … z}. If the problem intended to allow other characters to be part of the encryption key, it should state that, or this thread would have lots of objections to the phrasing.
As suggested above, one might try all possible three-letter combinations - that will solve the problem - The question then becomes, "how to streamline the process?"
-
satyres
- Posts: 31
- Joined: Thu Feb 20, 2014 2:48 pm
Re: Problem 059
Thanks all for the help ! really appreciate ;
but there is a little missunderstood ! i know that the password containt only 3 alphabet ! the question is how to know that those 3 aplhabet are the good one to decode the text ! should i try every possiblity.
Thanks again and sorry for the missunderstood ! hope not bothering too much.
but there is a little missunderstood ! i know that the password containt only 3 alphabet ! the question is how to know that those 3 aplhabet are the good one to decode the text ! should i try every possiblity.
Thanks again and sorry for the missunderstood ! hope not bothering too much.
-
TripleM
- Posts: 384
- Joined: Fri Sep 12, 2008 3:31 am
Re: Problem 059
There are 26*26*26 possible passwords. As a human, if you tried a password, you would immediately be able to tell whether this was correct because the decoded text would become readable English, rather than jibberish.
The point of the program you have to write is to do this step automatically - determine whether a block of text makes sense in English, using your knowledge of how English works.
The point of the program you have to write is to do this step automatically - determine whether a block of text makes sense in English, using your knowledge of how English works.
-
satyres
- Posts: 31
- Joined: Thu Feb 20, 2014 2:48 pm
Re: Problem 059
Thanks for the clarification i will do my best !TripleM wrote:There are 26*26*26 possible passwords. As a human, if you tried a password, you would immediately be able to tell whether this was correct because the decoded text would become readable English, rather than jibberish.
The point of the program you have to write is to do this step automatically - determine whether a block of text makes sense in English, using your knowledge of how English works.