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
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 10:03 pm, edited 1 time in total.
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!
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?
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.
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.
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.
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 ?
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.
War ruins the life and health of untold numbers of innocent children.
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.
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.
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.