## Problem 059

A place to air possible concerns or difficulties in understanding ProjectEuler problems. This forum is not meant to publish solutions. This forum is NOT meant to discuss solution methods or giving hints how a problem can be solved.
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.

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 post any spoilers
Comments, questions and clarifications about PE problems.
kosiu_drumev
Posts: 6
Joined: Wed Jun 02, 2010 9:43 pm

### Re: Problem 059

I'm not sure if I understand corectly.
The cipher text is made of symbols C1, C2, ..... Cn. (in this case n=1201)
The original text is made of symbols O1, O2, ..... On.
The password is made only of 3 symbols, namely S1, S2 and S3.
And the original text must be made by these formulae O1=C1xorS1 ; O2=C2xorS2 ; O3=C3xorS3 ; O4=C4xorS1 ; O5=C5xorS2 ; O6=C6xorS3 ; O7=C7xorS1 and so on.

Please, tel me if my thought is right. And if not, how exactly it must be. Thanks!

Last edited by kosiu_drumev on Sat Jul 09, 2011 9:03 pm, edited 1 time in total.

quilan
Posts: 182
Joined: Fri Aug 03, 2007 10:08 pm

### Re: Problem 059

kosiu_drumev wrote:I'm not sure if I understand corectly.
The cipher text is made of symbols C1, C2, ..... Cn. (in this case n=1201)
The original text is made of symbols O1, O2, ..... On.
The password is made only of 3 symbols, namely S1, S2 and S3.
And the original text must be made by these formulae O1=C1xorS1 ; O2=C2xorS2 ; O3=C3xorS3 ; O4=C4xorS1 ; O5=C5xorS2 ; O6=C6xorS3 ; O7=C7xorS1 and so on.

Please, tel me if my thought is right. And if not, how exactly it must be. Thanks!
I do believe this is indeed the case.
ex ~100%'er... until the gf came along.

karenhunt6116
Posts: 18
Joined: Tue Sep 29, 2009 3:43 pm
Location: Detroit, MI

### Re: Problem 059

One possible thing to look for (depending on the language) is that you're summing integers rather than bytes, which would quickly overflow. However, it would probably be pretty obvious if you were getting a result less than 256.
Hi,

I would like to try this problem but I don't know anything about summing ascii code as bytes. Is it allowed for someone to explain this to me?

I do know how to convert base 10 to base 2 (binary) and I know how to sum binary code using XOR. I have never done any encryption/decryption before. Is it allowed to help me?

Karen

rayfil
Posts: 1403
Joined: Sun Mar 26, 2006 4:30 am
Contact:

### Re: Problem 059

I would like to try this problem but I don't know anything about summing ascii code as bytes.
There's no "summing" involved with this problem. The example given in the problem may seem to indicate this but the use of XOR is anything but that. You cannot "sum binary code using XOR".

For another example, 154 XOR 46 = 180 and 46 XOR 180 = 154. You can verify that on your Windows calculator.

In order to solve this problem, you first need to understand the function of the XOR operator. You can certainly find that information in numerous places. This forum should not be considered for the purpose of obtaining such basic math knowledge.
When you assume something, you risk being wrong half the time.

karenhunt6116
Posts: 18
Joined: Tue Sep 29, 2009 3:43 pm
Location: Detroit, MI

### Re: Problem 059

This forum should not be considered for the purpose of obtaining such basic math knowledge.
Rayfil:

I apologize that I lack this basic knowledge.

By the way, when I calculate 154 XOR 46 I get 180 and when I calculate 46 XOR 180 I get 154. "Summing" was a poor choice of words.

Karen

TripleM
Posts: 382
Joined: Fri Sep 12, 2008 2:31 am

### Re: Problem 059

karenhunt6116
Posts: 18
Joined: Tue Sep 29, 2009 3:43 pm
Location: Detroit, MI

### Re: Problem 059

TripleM and ipsemet:

Thank you so much for your replies. They made a big difference in how I view my experience here at ProjectEuler.

Karen

iordan_tanev
Posts: 6
Joined: Mon Jan 17, 2011 3:25 pm

### Re: Problem 059

Hi,
i have a simple question just to be shure can the key have duplicated letters?
Best Regards,
Iordan

TripleM
Posts: 382
Joined: Fri Sep 12, 2008 2:31 am

### Re: Problem 059

Yes, the problem statement doesn't put any such restrictions on the key.

Francky
Posts: 90
Joined: Sat May 07, 2011 2:49 pm
Location: South of France

### Re: Problem 059

Sorry, but I'm angry, so I'll speak french.
Je suis choqué de la teneur du texte et ne trouve pas cela convenable du tout.
Il va à l'encontre, je trouve, de l'esprit du projet Euler.
Le texte devrait être changé avec un autre qui fournit le même résultat.
Expand
Entia non sunt multiplicanda praeter necessitatem

hk
Posts: 10642
Joined: Sun Mar 26, 2006 9:34 am
Location: Haren, Netherlands

### Re: Problem 059

Voici ma response en Hollandais:
Expand

Susanne
Posts: 32
Joined: Sun Nov 08, 2009 7:39 am

### Re: Problem 059

I believe that Problem 59 (View Problem) violates one of the Ten Commandments.

elendiastarman
Posts: 410
Joined: Sat Dec 22, 2007 8:15 pm

### Re: Problem 059

Susanne wrote:I believe that Problem 59 (View Problem) violates one of the Ten Commandments.
Which one? I looked them up on Wikipedia to refresh my memory and none of them come close to being violated by Problem 59...
Want some
3.14159265358979323846264338327950288419716939937510
58209749445923078164062862089986280348253421170679...?

Francky
Posts: 90
Joined: Sat May 07, 2011 2:49 pm
Location: South of France

### Re: Problem 059

One of the Ten Commandments is violate, but there are many versions.
Expand
Personnaly, I'm "quite" OK, but I think it's a real problem (sic) for many people in the world. I think you have to consider this.
Expand
Entia non sunt multiplicanda praeter necessitatem

hk
Posts: 10642
Joined: Sun Mar 26, 2006 9:34 am
Location: Haren, Netherlands

### Re: Problem 059

First of all let me say that I'm not a Christian nor a Muslim. In fact I'm strongly against religion at all.
I'm convinced that the two great monotheistic religions that arose from the Mediterrean area have done the world more harm than good during the past centuries. When they arose they were a hallmark of emancipation and they guarded our cultural inheritance very well, but not anymore nowadays. They have become a source of stagnation and violence. (Just my personal opinion, please don't take offense if this not your opinion, just to make clear that I could be one of the people that could have been offended).
But to take offense from such a poetic text seems very narrow minded to me. (Just like taking offense from Mozart's Requiem or Bach's Hohe Messe because of their obvious Christian texts).
And let's be honest: the problem can easily be solved without looking at the text at all.

elendiastarman
Posts: 410
Joined: Sat Dec 22, 2007 8:15 pm

### Re: Problem 059

Well said hk.
Want some
3.14159265358979323846264338327950288419716939937510
58209749445923078164062862089986280348253421170679...?

Susanne
Posts: 32
Joined: Sun Nov 08, 2009 7:39 am

### Re: Problem 059

As a Christian, I cannot be offended by the text. However, the Ten Commandments are important ethical rules for me. I really mean that taking care of them can reduce upset in life. As from my point of view the problem seems to infringe one of these rules, I got the feeling of doing a sin by solving the problem. People with other beliefs do not have this trouble.
elendiastarman said:
Which one? I looked them up on Wikipedia to refresh my memory and none of them come close to being violated by Problem 59...
Francky said:
One of the Ten Commandments is violate, but there are many versions....
I rather meant another Commandment, but it would be a spoiler to mention it's number.

elendiastarman
Posts: 410
Joined: Sat Dec 22, 2007 8:15 pm

### Re: Problem 059

How interesting. I too am a Christian, and unlike you, my reaction to solving the problem was along the lines of "This is awesome!"...
Want some
3.14159265358979323846264338327950288419716939937510
58209749445923078164062862089986280348253421170679...?

Susanne
Posts: 32
Joined: Sun Nov 08, 2009 7:39 am

### Re: Problem 059

elemndiastarman said:
How interesting. I too am a Christian, and unlike you, my reaction to solving the problem was along the lines of "This is awesome!"...
So your feelings about the problem are merely positive.
My feelings are ambivalent, and I mean that it is useful for the administrators to know what we are really thinking and feeling about the particular problems. So there is no reason to offend me in an ironical way for giving some feedback.

rayfil