Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Fast integer inverse root mapping

Name: Anonymous 2017-07-24 4:17

This came up in a /sci thread
(1-10 ->)
1,4,9,(1)6,(2)5,(3)6,(4)9,(6)4,(8)1,(10)0

How difficult is reverse mapping a square this way? (it runs least significant digit first lol)

Name: Anonymous 2017-07-24 6:18

I'm not sure if I understand how this map is supposed to look like. If it maps \(x\) to \(x^2\), just take the square root. If it maps \(x\) to the smallest non-negative \(y\) such that \(x^2 \equiv y (\mod b) for some base \(b\), there is no inverse map because the function isn't injective.

Name: Anonymous 2017-07-24 6:21

Does LaTeX only work on /test/?

Name: Anonymous 2017-07-24 11:51

>>2
It should map \(x\) to \(x^2\), ie perform an integer square root, but it only keeps the 1-10 lookup table, and has a two:one branch per digit

Name: Anonymous 2017-07-24 12:04

try a big ugly number test

x = sqrt(123456789)

start with 9, first digit of x is a 3 (+0) or a 7 (+4) {3*3's or 7*7's}
second digit 8 isn't in our map, but 8-4 = 4 is, giving a 2 (+0) or 8 (+6), and making first digit 7
third digit 7 again isn't in but 7-6 = is, giving a 1 or 9 (+8), and making second digit 8
..etc

Name: Anonymous 2017-07-24 14:10

>>3
it's bbcode

Name: Anonymous 2017-07-25 1:06

>>4
I still don't get it.

Name: Anonymous 2017-07-25 9:57

>>7
23*23 = 529
123*123 = 15129
2123*2123 = 4507129
42123*42123 = 1774347129
142123*142123 = 20198947129
5142123*5142123 = 26441428947129
75142123*75142123 = 5646338648947129

Name: Anonymous 2017-07-27 7:29

>>8
Still.

Name: Anonymous 2017-07-27 9:28

>>9
Some ancient peasant-level math tricks to compute sqrt?

Name: Anonymous 2017-07-27 9:47

Check my ancient math trick to compute dubs!

Name: Anonymous 2017-07-27 16:04

>>10
OK that makes sense

Name: Anonymous 2017-07-29 13:22

>>9
It's a work in progress

>>10
I can't argue, but aren't most of our math tricks pretty ancient?

Name: Anonymous 2017-07-29 13:31

Phocylides (Greek: Φωκυλίδης ὁ Μιλήσιος), Greek gnomic poet of Miletus, contemporary of Theognis of Megara, was born about 560 BC.

a^2 + b^2 = c^2 for etc

Name: Anonymous 2017-07-29 13:39

Imagine the shock-horror if it generalizes to a factorization algorithm

Name: Anonymous 2017-07-29 14:11

dcba * wxyz =
za + 10(zb + ay) + 100(by + zc + ax) + 1000(zd + aw + bx + yc) ...

Name: Anonymous 2017-07-29 16:44

>>15
Only if its somehow faster than https://en.wikipedia.org/wiki/General_number_field_sieve
In general you can check first million primes in seconds with brute force divisibility tests..
The difficulty of factoring (prime*prime) is that prime chosen is huge and random(not in the first Nth billion of primes), and this method doesn't scale well to large numbers.

Name: Anonymous 2017-07-30 1:47

>>17
It looks like it would be linear in the number of digits with enough parallel cores, and pretty memory-hungry

for a number of size 10^n, it will grow a set of ~ 10^n/2 possible solutions with a branching factor of ~10 per digit

Name: Anonymous 2017-07-30 3:11

the ones map is a bit lop-sided

0000000000 count 0 = 27
0123456789 count 1 = 4
0246802468 count 2 = 12
0369258147 count 3 = 4
0482604826 count 4 = 12
0505050505 count 5 = 9
0628406284 count 6 = 12
0741852963 = 4
0864208642 = 12
0987654321 = 4

Name: Anonymous 2017-07-30 6:07

lower bound 4^n/2

Name: Anonymous 2017-07-30 9:50

This is smallest RSA challenge semiprime(prime*prime)
1522605027922533360535618378132637429718068114961380688657908494580122963258952897654000350692006139

Name: Anonymous 2017-07-30 11:51

>>21
first digit is expected to be weak

9 gives 1*9 & 9*1, 3*3 or 7*7 (carry either 0 or 4)

1*9 carry zero | 3 gives 3*1 + 0*9 mod 10 = 3, 1*1 + 8*9 mod 10 = 3, for ten such pairs

Name: Anonymous 2017-07-31 1:44

9*1 carry zero is identical - no previous digit(s) have sidedness yet
3*3 and 7*7 also introduce no sidedness - retains symmetry

10 pairs expected for 3*3, 0*3 + 1*3, 2*3 + 9*3, 3*3 + 8*3 mod 10 = 3

7*7 carry -4 makes our next digits "13" a "09" for this branch

7*7 + 7*0 mod 10 = 9, ten pairs expected

Name: Anonymous 2017-07-31 2:07

Or possibly only five, 7*0 + 7*7 is no different to 7*7 + 7*0 with the current symmetry, same for the 3*3 set

symmetries should be broken on all branches now though - there was no way to make a nine or three with x*2

Don't change these.
Name: Email:
Entire Thread Thread List