Discussion:
Strongest palindrome
(too old to reply)
l***@gmail.com
2019-05-18 16:19:19 UTC
Permalink
Ms. A loves palindrome strings. She always looks for palindrome in any letter she finds. Recently she realizes the infinite number PI could contain a lot of palindrome in its infinite sequence.
It's impossible to find all palindromes manually. So she decided to write a program that will find the longest palindrome from the input string!
Mike Terry
2019-05-18 16:56:41 UTC
Permalink
Post by l***@gmail.com
Ms. A loves palindrome strings. She always looks for palindrome in any letter she finds. Recently she realizes the infinite number PI could contain a lot of palindrome in its infinite sequence.
It's impossible to find all palindromes manually. So she decided to write a program that will find the longest palindrome from the input string!
The number PI is generally thought to be "normal":

https://en.wikipedia.org/wiki/Normal_number

although I don't think this is proven. If PI is indeed normal it would
contain arbitrarily long palindromes in its digit sequence. In
particular, there would be no "longest palindrome from the input string".

If PI isn't normal, perhaps there could be a longest palindrome,
although a program simply examining an infinite stream of digits would
obviously never recognise this, so it would never terminate.

If it were one day proven that the longest palindrome had a specific
(known) bound on its length, then Ms A could write a program to find
this, and the program would be guaranteed to terminate, although it
would probably require more resources to run than those available to Ms A!

Regards,
Mike.
Mike Terry
2019-05-19 02:01:33 UTC
Permalink
Post by Mike Terry
Post by l***@gmail.com
Ms. A loves palindrome strings. She always looks for palindrome in any
letter she finds. Recently she realizes the infinite number PI could
contain a lot of palindrome in its infinite sequence.
It's impossible to find all palindromes manually. So she decided to
write a program that will find the longest palindrome from the input
string!
https://en.wikipedia.org/wiki/Normal_number
although I don't think this is proven. If PI is indeed normal it would
contain arbitrarily long palindromes in its digit sequence. In
particular, there would be no "longest palindrome from the input string".
If PI isn't normal, perhaps there could be a longest palindrome,
although a program simply examining an infinite stream of digits would
obviously never recognise this, so it would never terminate.
If it were one day proven that the longest palindrome had a specific
(known) bound on its length, then Ms A could write a program to find
this, and the program would be guaranteed to terminate, although it
would probably require more resources to run than those available to Ms A!
That last paragraph isn't right. What I meant was that if we had a
proof that PI had a longest palindrome, and the proof gave us the actual
length of the palindrome, a program could just search until it found a
palindrome of that length and then terminate...

Mike.
Richard Heathfield
2019-05-19 08:08:12 UTC
Permalink
   https://en.wikipedia.org/wiki/Normal_number
Pi, like any normal number, has 6 decimal places:

3.141592
^^^
and contains just one non-trivial palindrome (length > 1).

.
.
.
.
.

No, wait, hang on a sec... This is Usenet, right?

Sorry, I thought it was Twitter, where they swallow this kind of junk
hook, line, and sinker. Every time.
--
Richard Heathfield
Email: rjh at cpax dot org dot uk
"Usenet is a strange place" - dmr 29 July 1999
Sig line 4 vacant - apply within
Gene Wirchenko
2019-05-21 23:38:23 UTC
Permalink
On Sun, 19 May 2019 09:08:12 +0100, Richard Heathfield
Post by Richard Heathfield
   https://en.wikipedia.org/wiki/Normal_number
3.141592
^^^
and contains just one non-trivial palindrome (length > 1).
.
.
.
.
.
No, wait, hang on a sec... This is Usenet, right?
Sorry, I thought it was Twitter, where they swallow this kind of junk
hook, line, and sinker. Every time.
You monster! Now you have me wondering what the longest
palindrome in the first 100,000 digits of pi is.

Sincerely,

Gene Wirchenko
Mark Brader
2019-05-22 02:30:58 UTC
Permalink
Post by Gene Wirchenko
You monster! Now you have me wondering what the longest
palindrome in the first 100,000 digits of pi is.
Assuming that http://www.angio.net/pi/digits/pi1000000.txt has the
correct digits, it'd be 0136776310, starting at the 16061st decimal
place.

I'm actually surprised that it's unique and that short. In the whole
million digits, there are 9 other palindroms of length 10 digits,
9 of length 11, one of length 12, and one of length 13. But all of
these are between the 240,000th and 940,000th decimal places.

(The two longest are 450197791054, at the 273,840th decimal place, and
9475082805749, at the 879,326th. A simple C program found all of these
in less than a second, then took half an hour to confirm that there are
no longer ones in the first million digits.)
--
Mark Brader, Toronto "Remember that computers are very,
***@vex.net very fast..." -- Steve Summit

My text in this article is in the public domain.
Eric Sosman
2019-05-22 11:17:43 UTC
Permalink
Post by Mark Brader
Post by Gene Wirchenko
You monster! Now you have me wondering what the longest
palindrome in the first 100,000 digits of pi is.
Assuming that http://www.angio.net/pi/digits/pi1000000.txt has the
correct digits, it'd be 0136776310, starting at the 16061st decimal
place.
I'm actually surprised that it's unique and that short. [...]
Sounds about right to me. A ten-digit palindrome must start with
five digits ABCDE, then continue with E (probability roughly 1/10),
D (1/10), C (1/10), B (1/10), A (1/10), so the likelihood of the EDCBA
continuation is about 1e-5. In the first 1e5 digits of pi, one
occurrence of a (1e-5)-probability event is just about what I'd expect.
--
***@comcast-dot-net.invalid
Six hundred nine days to go.
Mark Brader
2019-05-22 18:08:22 UTC
Permalink
Post by Eric Sosman
Post by Mark Brader
Post by Gene Wirchenko
You monster! Now you have me wondering what the longest
palindrome in the first 100,000 digits of pi is.
Assuming that http://www.angio.net/pi/digits/pi1000000.txt has the
correct digits, it'd be 0136776310, starting at the 16061st decimal
place.
I'm actually surprised that it's unique and that short. [...]
Sounds about right to me. A ten-digit palindrome must start with
five digits ABCDE, then continue with E (probability roughly 1/10),
D (1/10), C (1/10), B (1/10), A (1/10), so the likelihood of the EDCBA
continuation is about 1e-5.
You're right, of course. I was only thinking about the observed rate
of other palindromes in the first million digits, and not about the
probabilitistic reasons for that.

In particular, it didn't occur to me that 10-digit and 11-digit
palindromes have the same probability of 1e-5, which fits with them
occurring about equally often in the first million digits -- but it
also means it's, shall we say, slightly surprising that there isn't
also an 11-digit palindrome in the first 100,000 digits.
--
Mark Brader | "The only thing required for the triumph of darkness
Toronto | is for good men not to call Hydro."
***@vex.net | --Michael Wares

My text in this article is in the public domain.
Basil Jet
2019-05-23 03:41:57 UTC
Permalink
See also https://en.wikipedia.org/wiki/Six_nines_in_pi
--
Basil Jet recently enjoyed listening to
Animal Collective - 2018 - Tangerine Reef
Phil Carmody
2019-05-30 18:22:10 UTC
Permalink
Post by Mark Brader
Post by Gene Wirchenko
You monster! Now you have me wondering what the longest
palindrome in the first 100,000 digits of pi is.
...
Post by Mark Brader
In particular, it didn't occur to me that 10-digit and 11-digit
palindromes have the same probability of 1e-5, which fits with them
occurring about equally often in the first million digits -- but it
also means it's, shall we say, slightly surprising that there isn't
also an 11-digit palindrome in the first 100,000 digits.
But only slightly surprising.
As (1-1/big)^big ~ 1/e
P(10 and 11 found) = 0.400
P(10 or 11 found) = 0.465
P(neither found) = 0.135

Phil
--
In order for there to be rights, there must be wrongs - if you want to
get rid of wrongs, which great leaders do, you *must* get rid of rights.
Mark Brader
2019-05-31 00:21:08 UTC
Permalink
Post by Phil Carmody
...but it also means it's, shall we say, slightly surprising that...
But only slightly surprising.
Violent agreement!
--
Mark Brader, Toronto "... trapped in a twisty little maze
***@vex.net of backslashes ..." -- Steve Summit
r***@gmail.com
2020-02-16 01:27:28 UTC
Permalink
besides the self-palindromic ones you mentioned, at 12-digites there are the following palindromic pairs in the first 1,000,000 digits, from the same source you cite.
(Interesting there is only 1 12-digit repeating sequence, "756130190263" in the same set). Why are there 4 times more palindromes than repeats?

"826086201398"
"893102680628"

"450197791054" self

"324623125383"
"383521326423"

"404631767287"
"782767136404"

"475082805749"
"947508280574"

"383521326423" self
Post by Mark Brader
Post by Gene Wirchenko
You monster! Now you have me wondering what the longest
palindrome in the first 100,000 digits of pi is.
Assuming that http://www.angio.net/pi/digits/pi1000000.txt has the
correct digits, it'd be 0136776310, starting at the 16061st decimal
place.
I'm actually surprised that it's unique and that short. In the whole
million digits, there are 9 other palindroms of length 10 digits,
9 of length 11, one of length 12, and one of length 13. But all of
these are between the 240,000th and 940,000th decimal places.
(The two longest are 450197791054, at the 273,840th decimal place, and
9475082805749, at the 879,326th. A simple C program found all of these
in less than a second, then took half an hour to confirm that there are
no longer ones in the first million digits.)
--
Mark Brader, Toronto "Remember that computers are very,
My text in this article is in the public domain.
Loading...