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


See also the topics:
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

Post by kosiu_drumev » Wed Jun 02, 2010 10:07 pm

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!

Image
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

Post by quilan » Thu Jun 03, 2010 12:15 am

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.
Image

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

Re: Problem 059

Post by karenhunt6116 » Sun Jul 18, 2010 11:28 pm

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

User avatar
rayfil
Administrator
Posts: 1403
Joined: Sun Mar 26, 2006 4:30 am
Location: Ontario, Canada
Contact:

Re: Problem 059

Post by rayfil » Mon Jul 19, 2010 3:54 am

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

Post by karenhunt6116 » Mon Jul 19, 2010 10:19 pm

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

Post by TripleM » Tue Jul 20, 2010 10:39 am

I think rayfil was a little harsh there, but may have just misinterpreted your question. If I understood you correctly, you already know how to calculate XOR of values, but were confused by the earlier clarification which talked about adding integers rather than bytes. All that meant was that if you try to add characters directly in a program (eg 'a' + 'b' + 'c'), you may run into problems because the maximum value a character can store is pretty small, so your program will wrap around to negative numbers if that sum gets too high. You should calculate the sum in a variable that can hold a true integer. It is most likely that you won't even have to worry about this issue in your code; it was just a possibility that may have occurred to give a wrong answer.

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

Re: Problem 059

Post by karenhunt6116 » Tue Jul 20, 2010 12:14 pm

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

Post by iordan_tanev » Mon Jan 17, 2011 7:33 pm

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

Post by TripleM » Tue Jan 18, 2011 3:14 am

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

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

Re: Problem 059

Post by Francky » Mon May 16, 2011 3:57 pm

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
Il existe des agnostiques, des croyants et aussi des anti-cléricaux, tous respectables.
Mais pour le respect de tous, il n'était pas convenable de choisir ce texte.
Il y a eu des offensés et il y en aura d'autres.
ImageEntia non sunt multiplicanda praeter necessitatem

User avatar
hk
Administrator
Posts: 10482
Joined: Sun Mar 26, 2006 9:34 am
Location: Haren, Netherlands

Re: Problem 059

Post by hk » Mon May 16, 2011 7:50 pm

Voici ma response en Hollandais:
Expand
Je hoeft die tekst toch niet te lezen
Image

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

Re: Problem 059

Post by Susanne » Mon May 16, 2011 10:08 pm

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

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

Re: Problem 059

Post by elendiastarman » Tue May 17, 2011 2:05 am

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...?
Image

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

Re: Problem 059

Post by Francky » Tue May 17, 2011 7:44 am

One of the Ten Commandments is violate, but there are many versions.
Expand
The fith, with christian edition. (Vatican version)
In french : Cinquième commandement : Meurtre et scandale éviteras, haine et colère également. (angry)
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
There are some people like me anticlerical, others could be agnostic, others strictly layman or atheists, others non christians.
Many could be hurt by the discover of the result, it's just a fact I pointed.
By an other way, Wikipedia said :
[quote] Euler was a devout Christian (and believer in biblical inerrancy) who wrote apologetics and argued forcefully against the prominent atheists of his time.[/quote]
So, in respect with Euler's conviction, I finally could consider this is a an appropriate text.
Me, but others ?
ImageEntia non sunt multiplicanda praeter necessitatem

User avatar
hk
Administrator
Posts: 10482
Joined: Sun Mar 26, 2006 9:34 am
Location: Haren, Netherlands

Re: Problem 059

Post by hk » Tue May 17, 2011 11:48 am

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.
Image

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

Re: Problem 059

Post by elendiastarman » Tue May 17, 2011 1:01 pm

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

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

Re: Problem 059

Post by Susanne » Tue May 17, 2011 6:36 pm

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.
Image

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

Re: Problem 059

Post by elendiastarman » Wed May 18, 2011 4:55 pm

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...?
Image

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

Re: Problem 059

Post by Susanne » Thu May 19, 2011 6:09 am

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.
Image

User avatar
rayfil
Administrator
Posts: 1403
Joined: Sun Mar 26, 2006 4:30 am
Location: Ontario, Canada
Contact:

Re: Problem 059

Post by rayfil » Fri May 20, 2011 1:10 am

This problem was published more than 7 years ago (2000+ days) and solved by more than 11,000 members over those years without a single comment about its content, until this week.

This site is designed for mathematical subjects requiring computer programming skills most of the time. This forum was created to discuss questions related to that main subject regardless of the religious or political opinions of the participants. Such opinions have absolutely no place in this forum.
When you assume something, you risk being wrong half the time.

Post Reply