A Repeat of Pi (ambiguity)

Post Reply
Allosentient
Posts: 273
Joined: Thu Apr 10, 2008 9:47 pm

A Repeat of Pi (ambiguity)

Post by Allosentient »

I am trying to figure out exactly what kind of repeating sequence you are looking for. I know it is not something like 1111111 since that would be too easy.

I tried searching for a string of x length that appears more than once in the sequence, but that either didn't find an answer or ate an extreme amount of cpu.

Now I am trying to find something such as 123456123456 (appearing consecutively). I know it must be at least 12 digits (there was more than one that was 10 digits). but that is also eating a lot of cpu and I do not even know if I am doing this the correct way.

Sorry to ask so many questions but hopefully this will help anyone else who might have a similar problem
User avatar
adum
Posts: 392
Joined: Thu Apr 19, 2007 12:49 pm
Contact:

Post by adum »

you're looking for any repeated sequence.

so if your digits were
123654323653

your answer would be '2365'

some approaches will require more cpu time than others =)

good luck,
adum
the_impaler
Posts: 61
Joined: Wed Apr 30, 2008 3:31 am

Post by the_impaler »

Can the sequences overlap ? E.g. 234562345623456 can be treated as 2345623456 twice with overlapping and 23456 3 times without overlapping.
User avatar
adum
Posts: 392
Joined: Thu Apr 19, 2007 12:49 pm
Contact:

Post by adum »

the sequence can overlap, but i'll give you the hint that it's pretty unlikely on a random sequence of digits =)

adum
haX0r1337
Posts: 2
Joined: Thu Nov 19, 2009 12:04 pm

Post by haX0r1337 »

How many digits have the answer? > 10 ?
(Sorry for bad english).
Yeah yeah yeah
smutley
Posts: 4
Joined: Mon Nov 23, 2009 7:50 am

Post by smutley »

That is part of the challenge to find out. And is it important to know?
haX0r1337
Posts: 2
Joined: Thu Nov 19, 2009 12:04 pm

Post by haX0r1337 »

Yes it's important.
Then my program runs faster.
Yeah yeah yeah
DaymItzJack
Posts: 106
Joined: Thu Oct 29, 2009 9:21 pm

Post by DaymItzJack »

Then do something smart and you'll get the right answer fast.
User avatar
laz0r
Posts: 290
Joined: Thu Feb 04, 2010 4:18 pm
Location: Within the depths of Unix

Confirmation

Post by laz0r »

Can anyone confirm that for sequences first appearing in the first hundred thousand digits, there are several candidates with the top length 10 digits?
There is no spoon.
megabreit
Posts: 141
Joined: Sat Jan 03, 2009 3:33 pm

Post by megabreit »

I can't confirm that, but it's likely, that there are some candidates with 10 digits length. Why do you want to know that? The challenge scope is 1 million digits and with today's computing power (and the right algorithm) it's possible to search 1 million digits nearly as fast as 100000 digits...
User avatar
laz0r
Posts: 290
Joined: Thu Feb 04, 2010 4:18 pm
Location: Within the depths of Unix

Post by laz0r »

I don't think I have the right algorithm... for each digit, I'm going through the longest repeating sequence from that digit. It's taking a very long time to go through all the digits.
There is no spoon.
User avatar
laz0r
Posts: 290
Joined: Thu Feb 04, 2010 4:18 pm
Location: Within the depths of Unix

Post by laz0r »

Ah! Got it now. Better algorithm :)
There is no spoon.
moose
Posts: 67
Joined: Fri Jul 16, 2010 7:32 pm

Post by moose »

Lets make a rather short example. For 100 digits of pi the correct solution would be 592, would it?
User avatar
laz0r
Posts: 290
Joined: Thu Feb 04, 2010 4:18 pm
Location: Within the depths of Unix

Post by laz0r »

moose wrote:Lets make a rather short example. For 100 digits of pi the correct solution would be 592, would it?
Indeed :)
There is no spoon.
AMindForeverVoyaging
Forum Admin
Posts: 496
Joined: Sat May 28, 2011 9:14 am
Location: Germany

Post by AMindForeverVoyaging »

moose wrote:Lets make a rather short example. For 100 digits of pi the correct solution would be 592, would it?
If my program works correctly, your answer is not wrong, but incomplete:

Code: Select all

i:  3, j: 60, search_length: 3, pattern match: 592 592
i: 71, j: 81, search_length: 3, pattern match: 628 628
i: 73, j: 80, search_length: 3, pattern match: 862 862
Post Reply