Problem 230

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.
Post Reply
User avatar
Pidgeot
Posts: 2
Joined: Thu Jan 15, 2009 8:21 pm

Problem 230

Post by Pidgeot »

Problem 230 (View Problem)
Now, I get the generation of the sequence of A's and B's, as well as the substitution of these letters with digits. I also get that I'm supposed to calculate several numbers and sum these together. What I don't entirely get is what I'm supposed to calculate.

The problem states to calculate the sum of Σn=0,1,...,17(DA,B((127+19n)*7n)*10n). What, exactly, is the meaning of the subscripting of n? I'm not familiar with any such notation in a generic sense - I'd guess it's plain old multiplication, but if that's the case, then I don't get why the innermost n isn't subscripted as well.
User avatar
xan
Posts: 621
Joined: Sat Jul 28, 2007 12:43 am
Location: North Carolina, USA
Contact:

Re: Problem 230

Post by xan »

I see those ns as superscripts not subscripts, and so they represent exponentiation, of course. If you figure out why they appear subscripted for you, let us know and maybe something can be done about it.
User avatar
Pidgeot
Posts: 2
Joined: Thu Jan 15, 2009 8:21 pm

Re: Problem 230

Post by Pidgeot »

After a little digging, it looks like it's an issue with IE8RC1.

The HTML for the n's is <sup><var>n</var></sup>, and apparently, it doesn't honor the <sup> when additional formatting is inside it (such as <var>, but <i> fails as well). Reversing the order (<var><sup>n</sup></var>), using Developer Tools, maintains the superscript. See image below (the rightmost n has had the order reversed)

Image

Switching to compatibility mode (IE7 renderer) correctly uses superscript, which does indeed make much more sense.

I'll file a bug report with MS, since there doesn't seem to be any reason why it should suddenly "forget" the vertical-align: super style that the <sup> element should apply, and the issue appears even when no CSS is enabled. You may or may not want to swap the elements in the meantime.

EDIT: Looks like someone beat me to it: https://connect.microsoft.com/IE/feedba ... kID=408812
pgrontas
Posts: 6
Joined: Sun Jun 22, 2008 8:10 pm

Re: Problem 230

Post by pgrontas »

I am stuck with problem 230.
I have a solution that runs in milliseconds that was supposed to work but it doesn't.
Can someone verify that the requested sum ends in xxxxxxx;

thank you very much.
User avatar
hk
Administrator
Posts: 12832
Joined: Sun Mar 26, 2006 10:34 am
Location: Haren, Netherlands

Re: Problem 230

Post by hk »

PM'ed you,
But you gave away quite a few of the digits to calculate, so I edited them away.
Image
War ruins the life and health of untold numbers of innocent children.
Dru89
Posts: 4
Joined: Sat Apr 11, 2009 7:27 am

Re: Problem 230

Post by Dru89 »

I have encountered some difficulty with this problem.

I managed to solve it, but my code had some bugs. I found my few errors by going through and debugging each answer to make sure I was going to the right places. I posted the code into the problem, and if someone finds the bugs I'd be very grateful. Code might be a little hard to follow, though. (Don't want to post it in here.)

Thanks in advance. :D
User avatar
daniel.is.fischer
Posts: 2400
Joined: Sun Sep 02, 2007 11:15 pm
Location: Bremen, Germany

Re: Problem 230

Post by daniel.is.fischer »

Dru89 wrote:I posted the code into the problem, and if someone finds the bugs I'd be very grateful. Code might be a little hard to follow, though. (Don't want to post it in here.)
Good. It would have been deleted here anyway.
I'll take a look, maybe I'll find it.
Il faut respecter la montagne -- c'est pourquoi les gypa&egrave;tes sont l&agrave;.
elr
Posts: 67
Joined: Thu Apr 09, 2009 9:47 am

Re: Problem 230

Post by elr »

with A=1415926535, B=8979323846 (like the example at the problem)

can someone tell me what would be Dab(451) , Dab(639) etc ?

thanks in advance
Image
User avatar
daniel.is.fischer
Posts: 2400
Joined: Sun Sep 02, 2007 11:15 pm
Location: Bremen, Germany

Re: Problem 230

Post by daniel.is.fischer »

DA,B(451) = 1 and DA,B(639) = 3.
Il faut respecter la montagne -- c'est pourquoi les gypa&egrave;tes sont l&agrave;.
marcandre
Posts: 1
Joined: Wed Dec 29, 2010 8:16 pm

Re: Problem 230

Post by marcandre »

I'm disappointed the problem didn't ask for something a bit more challenging, like going from 0 to 2000 instead of 0 to 17... and with B with a couple less digits.
hamsterofdeath
Posts: 20
Joined: Fri Apr 27, 2018 7:17 pm

Re: Problem 230

Post by hamsterofdeath »

did i misunderstand something or is the concatenation order on wikipedia a different one?
https://en.wikipedia.org/wiki/Fibonacci_word
euler: A,B,AB,BAB
wiki: 0,01,010,01001
User avatar
bruce_love
Administrator
Posts: 3542
Joined: Sat Sep 24, 2011 11:59 am

Re: Problem 230

Post by bruce_love »

Your understanding is perfect. The concatenation order in this problem is indeed different from that described on the wiki.
Post Reply