|
4,326,816,254 to be exact.
System.ItDidntWorkException: Something didn't work as expected.
C# - How to debug code[ ^].
Seriously, go read these articles.
Dave Kreskowiak
|
|
|
|
|
Yep - that's the count I get too
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
So how long did it take? Did you do something in parallell or?
|
|
|
|
|
I'll say 82 took my machine 59 seconds.
System.ItDidntWorkException: Something didn't work as expected.
C# - How to debug code[ ^].
Seriously, go read these articles.
Dave Kreskowiak
|
|
|
|
|
Kenneth Haugland wrote: I don't think is enough not if you start at 3,4,5 or any other number, at least I got some 5 then.
Whatever digit you start with will always be in the last position. No other digit will exceed 3, no matter how many iterations you try.
For example, if in iteration n you get 41 , then that means iteration n-1 must have had ...x1111... . But given the rules of the sequence, that would have to be written as either (x+1)1 or 21 .
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Ah, yes that makes sense. Also seems to be that the higher the number of iterations the higher of LSB seems to be equal? if you can find that formula you might shorten the calculations by quite a bit.
|
|
|
|
|
|
Well, he did only ask about the length of the 100 th number.
So according to Look-and-say sequence - Wikipedia[^]. Dave told us that the 50th number had length:
L50 = 894810
And the wikipedia article said:
L_n+1/L_n= lambda = 1.303577269034
so....
L50*lambda^(50)= 511175198256
if my math is right enough. Very hard programming challange
modified 1-Dec-17 10:27am.
|
|
|
|
|
Exact length is required and that's not the answer.
System.ItDidntWorkException: Something didn't work as expected.
C# - How to debug code[ ^].
Seriously, go read these articles.
Dave Kreskowiak
|
|
|
|
|
Cant be far off
|
|
|
|
|
System.ItDidntWorkException: Something didn't work as expected.
C# - How to debug code[ ^].
Seriously, go read these articles.
Dave Kreskowiak
|
|
|
|
|
close...about 72 million off...
|
|
|
|
|
I used a new AI program I trained on twitter...
It responded:
1 Really large string of numbers NOBODY cares about, just like you.
Delete yourself.
I added "Plz" and it simply said "Go away Troll"
I am having second thoughts about it having access to:
- NEST devices (including garage door, locking all doors)
- Internet access to unlock and start my car
- IP Phone / Router... So I can't call for hel...
|
|
|
|
|
Still running...85 minutes in...
currently at:
Loop 76: Length 881752750
|
|
|
|
|
85 MINUTES?! You'll be running this for about a week to get to 100.
It can be done a lot quicker than that. The 76th number took 12 seconds on my machine and it's a "nothing special" machine.
System.ItDidntWorkException: Something didn't work as expected.
C# - How to debug code[ ^].
Seriously, go read these articles.
Dave Kreskowiak
|
|
|
|
|
I thought I would run out ot memory and did it writing to a file...not the smartest idea...now I just can't bring myself to stop the run.
|
|
|
|
|
1) Strings and string methods are not going to do it. They're too slow and take up too much memory.
2) The only digits you see in any of these numbers are 1, 2, and 3. It seems like a waste to use an entire byte to store each digit.
3) If you graph the math on the progression of the length of these numbers, you'll see that on a LOGARITHMIC SCALE, the graph is about a 40 degree line. What would that look like on a normal X/Y scale?
4) You cannot do this "in memory", without going to the extremes of cleverness, and even then, you'd still need a gargantuan amount of RAM.
System.ItDidntWorkException: Something didn't work as expected.
C# - How to debug code[ ^].
Seriously, go read these articles.
Dave Kreskowiak
|
|
|
|
|
Good hints...gonna have another crack at this back home.
|
|
|
|
|
The length of row n won't exceed twice the length of row n-1 , yes?
The result is computable, therefore a Turing Machine can compute it, and, because Turing Machines have virtually unlimited storage, simply use one.
|
|
|
|
|
You build the machine and I'll go make the infinite paper tape.
System.ItDidntWorkException: Something didn't work as expected.
C# - How to debug code[ ^].
Seriously, go read these articles.
Dave Kreskowiak
|
|
|
|
|
The spec isn't clear! Send it back!
As this is, in essence, a compression algorithm, at line 8->9 (according to the OEIS) I would do:
1113213211
11 132132 11 <== three subsequences
21 2132 21 <== three outputs, eight digits
Which is shorter than their naive result of:
1113213211
111 3 2 1 3 2 11 <== seven subsequences
31 13 12 11 13 12 21 <== seven outputs, fourteen digits
A 40% saving.
The complexity of the algorithm increases due to seeking how to split the input into the fewest subsequences of some repetition length (1 in the naive implementation).
|
|
|
|
|
When in the is the spec Everclear[^] ?
Project Euler specs aren't clear either. We always have to do the best we can with what we've got.
1113213211
11 132132 11 <== 13?
21 132132 21 <== three outputs, eight digits
What happened to the 13? The output looks like it should be 10 digits, not 8.
1113213211
111 32132 11
31 32132 21 <== if I understand what you're trying to do
There seems to a problem with representation. How do you tell the difference between single values and a run length value?
System.ItDidntWorkException: Something didn't work as expected.
C# - How to debug code[ ^].
Seriously, go read these articles.
Dave Kreskowiak
|
|
|
|
|
Dave Kreskowiak wrote: What happened to the 13?
There are 2 132s , hence 2132 .
Dave Kreskowiak wrote: How do you tell the difference between single values and a run length value?
Doesn't matter, but internally (if I write it) it would be in the data structure. It just wouldn't be apparent in the output unless you want it.
(1,1)
(2,1)
...
(2,1),(2,132),(2,1)
...
The question is about only the number of digits.
|
|
|
|
|
Ah, OK. I missed that.
Hmmm. In my implementation, I wrote up a reader/writer that takes care of the <classified work="" for="" now=""> "on the fly". This would make an interesting, and challenging, implementation to write. I'll have to look into trying this next weekend.
My current implementation writes all the data but there is an option to convert the data to a human-readable format. Not that you'd want to see thousands of pages of 1's, 2's, and 3's, but it did come in handy for analysis when experimenting with implementations.
System.ItDidntWorkException: Something didn't work as expected.
C# - How to debug code[ ^].
Seriously, go read these articles.
Dave Kreskowiak
|
|
|
|
|
340472211484 approx (via log extrapolation)
|
|
|
|