Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2 0f 3 exercises exercised #3

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

2 0f 3 exercises exercised #3

wants to merge 6 commits into from

Conversation

jfindlay
Copy link

No description provided.

jfindlay added 6 commits June 22, 2013 10:16
The ordering I assumed only checked numbers on the diagonal and
superdiagonal matrix elements.  I need to check all the matrix elements:
(n - i)*(n - j) = n**2 - (i + j)*n + i*j.  However, my new, far simpler
idea is to assume that the largest palindrome in the set (or square
matrix with elements (n - i)*(n - j) for integers 0 <= i,j <= n) is much
closer to n**2 than to 0: n**2 > largest_base_ten_palindrome >> 0.
The assumption used is helpful to find the larges palindrome without
permuting the whole parameter space, however the palindrome itself can
be found in multiple binary combinations of the prime factors of the
palindrome.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant