Sie sind auf Seite 1von 22

PRELIMINARY NOTES DO NOT DISTRIBUTE

Nave Grouping & Trial Multiplication for Factorization

By,

Fred Viole
OVVO Financial Systems
fred.viole@ovvofinancialsystems.com

If at first the idea is not absurd, then there is no hope for it.
Albert Einstein

PRELIMINARY NOTES DO NOT DISTRIBUTE

I have been thinking a lot about factoring lately. I find the problem to be division. Namely you
have to ask how many groups of go into . This does nothing for answering the question:
What is the for any given ? There has to be a way that will tell you how many groups of
goes into it. I think I found it, thus avoiding trial division for factorization.
I was playing with a marble set with the kids and it hit me. You can successively group until it
gives you an answer of how many groups of go into . For example, when factoring 49:
Split 49 into 2 groups, as would be any person's initial split (I thought of the
ancients and rocks with this) leaving you with 25 and 24.

Split 25 into 13 and 12


Split 24 into 12 and 12

Split 13 into 6 and 7


Split 12 into 6 and 6
Split 12 into 6 and 6
Split 12 into 6 and 6

There are 7 groups of 6 and 1 group of 7. Place 1 from the group of 7 into the
groups of 6, and you now have 7 groups of 7 for the factors of 49. At each split,
there is a division step to be done, specifically in this example, can the group of
13 be split into the remaining 3 groups after the first split? or can the group of 7
be evenly placed into the remaining 7 groups of 6?
The steps of the procedure need to be formalized further, but if this can be tested on a smaller
RSA number it's possibly a game changer. And no, it's not a factor tree, which immediately
divides after each Node, it is more akin to a grouping tree.
Numbers divisible by 3 at the second node from a seed group of 2:
63
31
15

32
16 16

16

15 is divisible by three and 5 are placed in each group, leaving the factors: 3 groups of 21.

75
37
38
18 19 19 19
18 is divisible by three and 6 are placed in each group, leaving the factors: 3 groups of 25.
There's always going to be unequal groups after each Node for odd numbers, the question is can
you split them among the remaining groups evenly?
1|Page

PRELIMINARY NOTES DO NOT DISTRIBUTE

Even = 323 which is (17)(19), can be factored from a lower grouping, specifically the 5
group.

Number

3
7

groups
of
groups
of

Node 1

64

64

65

65

65

Node 2

32

32

33

33

33

32

32

32

32

32

16

16

16

16

16

16

16

16

17

17

17

17

16
16

16
16

16
16

16
16

16
16

33
32

Node 3
17
3

groups
of
groups
of

323

Leads to 17 groups of 19
Each procedure should have a stopping condition when both number of groups exceeds the
counts in the groups.
The above example highlights a prescient point:
There are multiple known groupings that will yield the factorization.
The lower factor
The higher factor
The higher factor 1

We note that 20 was the grouping in the above example (higher factor 19 + 1).

20
2

= 10 ,

10
2

= 5,

which is precisely why the factor was found from the 5 seed group as all even groups have a
smaller odd seed group base.

Thus we have increased our probability of finding a factor because we are not just looking
for a single result below
2|Page

PRELIMINARY NOTES DO NOT DISTRIBUTE

Initial Group
Node 1
2
3
5
7
9

Node 2
4
6
10
14
18

Node 3
8
12
20
28
36

Node 4
16
24
40
56
72

Node 5
32
48
80
112
144

Node 6
64
96
160
224
288

Node 7
128
192
320
448
576

Node 8
256
384
640
896
1152

Node 9
512
768
1280
1792
2304

Node
10
1024
1536
2560
3584
4608

Obviously there is no need to store the groupings, rather just identify their count and value (as
demonstrated in the images below). The following images represent full sequences in Excel.
They all have a specific rule involving the floor and the ceiling of the previous count and values.
Again, there is no need to store the full sequence, just the last count and value so that the next
can be generated.

3|Page

PRELIMINARY NOTES DO NOT DISTRIBUTE

Example of the solution given a specific seed group, and how the rest of the sequence flows from that initial solution.

Need to solve for the groups of a


given seed such that the sum of the
totals are equal to N.

In this example, given a seed group total of 149, how do you split = 88,271 using count values 592 and 593? Starting from a nave
division of 75 and 74 respectively, we can see that we are over by 11, thus the 74 groups of 593 must be reduced to 63 groups of 593;
while raising the 75 groups of 592 to 86 groups of 592.
(74 593) + (75 592) = 88,282
(63 593) + (86 592) = 88,271
The decreasing group starts with 148 and subtracts the increment, while the group of 149 adds the increment.

4|Page

PRELIMINARY NOTES DO NOT DISTRIBUTE

And we can see on the 5th iteration of a single increment our decreasing seed group total is 143 from 148, we have a mod of 0 for 103
groups and 618 members of the other group of 40. Thus 103 is a factor of 88,271.

5|Page

PRELIMINARY NOTES DO NOT DISTRIBUTE

And with 16 divisions (increasing and decreasing from every 0.0625 ), our maximum iterations would be equal to ( 32 ).

6|Page

PRELIMINARY NOTES DO NOT DISTRIBUTE

For = 10,041,507,409 it only took 1,119 increments to find the factor 95,923. It was identified in the Increasing from 0.25
sequence, which had a seed group total of 26,171. The other factor is of course 104683 and was located from the higher odd factor +1
group! 104682/2 = 52,341 would have also produced the factor 95,923. 3 possible groupings below .

7|Page

PRELIMINARY NOTES DO NOT DISTRIBUTE

As conjectured, for numbers with factors close to one another, the iterations are low. In this case, = (15485863)(15485867)
generates a result immediately with 0 iterations. The higher odd factor +1 group (15485868) reduced down to 3,871,467 again below
= 15,485,864.99

There are no tricks, gimmicks, or sleight of hand the closer the factors are to one another, the quicker the solution (reminiscent of
Fermats method). The nave groups from various divisions of N are deterministic in so much that every group will have the chance
to be the seed group. However, the probability a group is in anothers sequential grouping leads to lower iterations than max.
Thus increasing the divisions leads to even lower max iterations and even lower realized iterations!
8|Page

PRELIMINARY NOTES DO NOT DISTRIBUTE

Lemma(1): All seed groups to ( 2 ) will cover all of the seeds. Furthermore, only the odd seed
groups are necessary greater than 2.
For example, in factoring = 506,657 , ( = 711.798) factor 103 was identified from seed
group 492
INCREASING SOLUTION .6875N
1029.79

SEED

Mod

492

0
251

103
389

1029
1030

984

0
514

103
881

514
515

1968

258
257

1087
881

257
258

NUMBER 506,657
105987
400670

Which reduces to seed group 123, or 34.6% of .


DECREASING SOLUTION .1875N
4,119.16 NUMBER 506,657

SEED

Mod

123

0
19

103
20

4119
4120

246

0
57

103
143

2059
2060

492

0
251

103
389

1029
1030

984

0
514

103
881

514
515

1968

258
257

1087
881

257
258

424257
82400

9|Page

PRELIMINARY NOTES DO NOT DISTRIBUTE

Given the insignificant computations to run the sequence from a given seed, the efficiency may
rest in partitioning only the odd integers within [2,

].
2

For example, using (2 ) may

yield an appropriate number of partitions


Using an example close to 10,000 to illustrate, when factoring = 10,403 the following groups
would need to be seed groups in order to ensure all are checked:

= 51

11

13

15

17

19
37

21
39

23
41

25
43

27
45

29
47

31
49

33
51

35

Yielding only 26 seed groups necessary in order to deterministically test for a factor of 10,403.

Length of sequences:
We mentioned earlier that the sequence should stop once the group numbers are greater than or
equal to the counts within the groups. This effectively cuts the sequence in half and addresses
some concerns for factoring very large numbers.
Since the group number doubles every Node, the number of Nodes is related to the bit size of the
number. For example, 100 Nodes are necessary to reach 2100 , = 1.26765(1030 ) from a seed
group of 2. Simultaneously, the number within each group is decreasing by .5 each Node.
Therefore 50 Nodes represent the maximum sequence length from seed group 2 for = 2100 .
Said differently, half of the bit size of

is approximately the maximum length of the

sequence. Not bad, considering 22048 would only require 1,024 Nodes in its longest sequence!

10 | P a g e

PRELIMINARY NOTES DO NOT DISTRIBUTE

An example will help illustrate this important feature of limited sequence length:

INCREASING SOLUTION FROM 0


5,201.50

SEED

Mod

5201

5202

2600

2601

1300

1301

13

650

651

29

325

326

18

29

162

22

35

163

82

93

81

11

35

82

41

93

40

40

163

41

16

32

64

128

256

NUMBER

INCREASING SOLUTION FROM 0


10,403

2,080.60

SEED

Mod

2080

2081

1040

1041

11

17

520

521

37

260

261

54

77

130

131

66

157

65

66

33

157

32

32

163

33

10

20

40

80

160

320

NUMBER

10,403

DECREASING BY 0.5 EVERY NODE

11 | P a g e

PRELIMINARY NOTES DO NOT DISTRIBUTE

Probability of a Factor
Using = 798,607, which is (101)(7907), = 893.648 we demonstrate the multitude of
seed groups that will yield a factor.

SEED

INCREASING SOLUTION FROM 0


1,211.85 NUMBER
Mod

659

0
95

101
558

1211
1212

1318

0
605

101
1217

605
606

2636

0
302

101
2535

302
303

SEED

798,607

INCREASING SOLUTION FROM .0625N


13,535.71 NUMBER 798,607
Mod

59

4
11

17
42

13535
13536

118

2
0

17
101

6767
6768

Seed groups that produced the factor 101:


59**
67**
101**
659*
1977
3953
*Below
**Below

12 | P a g e

PRELIMINARY NOTES DO NOT DISTRIBUTE

IF factors are close then this method will find them in a reasonable amount of time. If
factors are far then it will take longer, but at the benefit of a reduced maximum possible
iteration. IF factors are very far apart, they become quick to find again. So extremely
close and extremely far apart factors are easy. Given RSAs propensity to generate the
largest number, it is conjectured that the factors will be relatively close to one another,
leading to a reasonable amount of time to factor using this method.

Denominator explained:
x2 to represent the

upper bound.

x2 to represent increasing and decreasing from the partitions.


x2 to represent just the odd numbers.

RSA Examples
RSA-100 = 15226050279225333605356183781326374297180681149613
80688657908494580122963258952897654000350692006139
RSA-100 = 37975227936943673922808872755445627854565536638199
40094690950920881030683735292761468389214899724061

N =
Known Seed group of larger factor:

25.7017% of N

13 | P a g e

PRELIMINARY NOTES DO NOT DISTRIBUTE

RSA-110 = 3579423417972586877499180783256845540300377802422822619
3532908190484670252364677411513516111204504060317568667
RSA-110 = 6122421090493547576937037317561418841225758554253106999
5846418214406154678836553182979162384198610505601062333

N =
Known Seed Group of larger factor:

12.9712% of N

RSA-120 = 227010481295437363334259960947493668895875336466084780038173
258247009162675779735389791151574049166747880487470296548479
RSA-120 = 327414555693498015751146303749141488063642403240171463406883
693342667110830181197325401899700641361965863127336680673013

N =
Known Seed Group of larger factor:

36.4151% of N

14 | P a g e

PRELIMINARY NOTES DO NOT DISTRIBUTE

Unknown Lower Seed Groups


The above RSA examples were illustrating known seed groups. However, there exist unknown
lower seed groups, further increasing the probability of finding a factor.
= 69,9951,361 which has factors (88523)(7907) would not have been assumed to have this
low of a seed group given the limits of its reduced upper factor to be 22,131 (plus 1) and 44,261
(minus 1) and its lower factor seed group of 7907.

SEED

DECREASING SOLUTION FROM .25N


284,648.78
Mod

2459

39
1085

530
1,929

284648
284649

4918

1842
1507

2989
1929

142324
142325

9836

0
1718

7907
1929

71162
71163

19672

96
859

17743
1929

35581
35582

39344

48
17790

17743
21601

17790
17791

DECREASING SOLUTION .28125N


94,882.93
SEED
Mod
7,377
13
530
94882
5871
6,847
94883
14754

0
6359

7907
6847

47441
47442

29508

0
2119

7907
21601

23720
23721

59016

11861
11860

37415
21601

11860
11861
15 | P a g e

PRELIMINARY NOTES DO NOT DISTRIBUTE

INCREASING SOLUTION .21875N


110,699.25

SEED

Mod

6,323

1703
1403

4,739
1,584

110699
110700

12646

3221
0

4739
7907

55349
55350

25292

3980
7121

4739
20553

27674
27675

50584

13838
13837

30031
20553

13837
13838

Questions / Concerns:

Does this truly reverse the focus of trial division or at the minimum just divide smaller
seemingly unrelated numbers to find factors? COUNTERPOINT: if so, we have
significantly reduced the bit size of the division!
Speed of algorithmcould the bit-wise AND operator speed up the algorithm even
though each seed group is odd? Binary long division to avoid modulus?
I am pretty sure the sequencing can be automated with minimal storage requirements,
but I am unsure of the number of steps. We need to compare and test.
How many unknown lower seed groups are there? Do they grow with N, thus making it
easier to factor as N gets larger?
How is square root remainder relevant to factor placement?

16 | P a g e

PRELIMINARY NOTES DO NOT DISTRIBUTE

Alternative To Division Altogether


One alternative is to division in any form is to use multiplication. The insights garnered from the
initial solution to the seed group allotment yielded a trial multiplication method.

Starting from the floor and the ceiling of the square root of the number, we can lower the floor
and raise the ceiling such that when multiplied we can compare to. Using a small example will
confirm the intuition
= 1,829
Whereby,
= 42

= 43

Step 1:
41
41 * 43 = 1,763
> 1,763 so we add to the ceiling
Step 2:
47
41 * 47 = 1,927
< 1,927 so we decrease the floor
Step 3:
39
39 * 47 = 1,833
< 1,833 so we decrease the floor, again
Step 4:
37
37 * 47 = 1,739
> 1,739 so we add to the ceiling
Step 5:
49
37 * 49 = 1,813
> 1,813 so we add to the ceiling again
Step 6:
51
37 * 51 = 1,887
< 1,887 so we decrease the floor

17 | P a g e

PRELIMINARY NOTES DO NOT DISTRIBUTE


Step 7:
33
33 * 51 = 1,683
> 1,683 so we add to the ceiling
Step 8:
53
33 * 53 = 1,749
> 1,749 so we add to the ceiling again
Step 9:
57
33 * 57 = 1,881
< 1,881 so we decrease the floor
Step 10:
31
31 * 57 = 1,767
> 1,767 so we add to the ceiling
Step 11:
59
31 * 59 = 1,829
= 1,829 and we have our factors!

There are 13 primes less than the square root of the number in this example, versus 11 trial
multiplications. You will notice we only used the 1s, 3s, 7s and 9s in the sequences to

eliminate obvious composite trials. Thus, we are using for a fully deterministic method, (2.5)
worst case multiplications (ending at the number 3).
The method can be fully partitioned among resources utilizing both increasing and decreasing
floors and ceilings. Given multiplications inherent speed advantage over division (~20x per a
quick search) this method may too warrant a serious investigation and trials.
Further adding to the efficiency is the known pairings that will generate a number:

If ends in a 1, we know that the multiplications have to be of the form 1x1, 9x9
or 3x7.
If ends in a 3, we know that the multiplications have to be of the form 3x1, or
7x9.
If ends in a 7, we know that the multiplications have to be of the form 7x1, or
3x9.
If ends in a 9, we know that the multiplications have to be of the form 3x3, 7x7
or 9x1.
18 | P a g e

PRELIMINARY NOTES DO NOT DISTRIBUTE

We are forced to utilize each component sequence of the non-equal pairs used as the floor, since
no decision rule yet exists to add insight to which sequence is the floor sequence.
So in our prior example = 1,829, starting with 41, our first pairing would have been 41*49
which equals 2,009. Our second attempt in the 1 sequence would be 31*49 which is too low,
then adding to the ceiling in the 9 sequence, we have 31*59. This is a testament to the power of
using any relevant information to lessen the task as well as the division of labor (for example,
one processor can be responsible for one floor sequence). Again, if trial division or trial
multiplication is deterministic in the same amount of numbers, time suggests using the
multiplication method.
Below is a detailed example of the 58 steps required to factor = 298,716,239 using the 7x7
sequences (since N ends in 9) and a division by 3 and 7 of those sequence entries to avoid
multiplying obvious non-primes. Extending this probabilistic primality check to the first
hundred primes will prove more efficient than 100 random composite numbers, due to the
overlapping numbers covered by earlier primes in the sequences. The following details this
efficiency.
Starting from 21 in the 1 sequence, every 3rd entry will be avoided as will every 7th. But, on
the 21st entry (231), the division by 7 is already covered by the 3. In fact, 33% of the 7 divisions
are already covered by the 3. 40.39% of 11s are already covered with the 3 and 7 division. By
the prime 29, 62.5% of those divisions are already accounted for by 3, 7, 11, 13, 17, 19 and 23.
Thus the most efficient probabilistic primality tests are those from the lowest primes.

= 298,716,239
= 17283.41

P
17,257
17,237

17,207

= 17,283

= 17,284

Initial P
17,267

Initial Q
17,287

PQ
298,494,629

N-(PQ)

P
17,267

IF PQ > N, REDUCE P UNTIL PQ < N


Q
PQ
17,317
17,317

17,347

298,839,469
298,493,129

298,489,829

N-PQ
221,610

IF PQ < N, INCREASE Q UNTIL PQ > N


Q
PQ
N-(PQ)
17,317
299,012,639
(296,400)

(123,230)
223,110
17,237
17,237

17,327
17,347

298,665,499
299,010,239

50,740
(294,000)

17,207
17,207

17,357
17,377

298,661,899
299,006,039

54,340
(289,800)

226,410

19 | P a g e

PRELIMINARY NOTES DO NOT DISTRIBUTE


P
17,197
17,177

Q
17,377
17,377

PQ
298,832,269
298,484,729

N-(PQ)
(116,030)
231,510

17,167
17,147

17,407
17,407

298,825,969
298,477,829

(109,730)
238,410

17,137
17,117
17,107
17,077

17,057

17,447
17,447
17,467
17,467

17,497

298,989,239
298,640,299
298,807,969
298,283,959

298,446,329

(66,530)
284,010

16,997

17,567

298,586,299

129,940

16,957
16,937

16,927
16,907
16,897
16,867

16,847
16,837
16,817

17,617
17,617

17,657
17,657
17,677
17,687

17,737
17,737
17,747

298,731,469
298,379,129

298,880,039
298,526,899
298,688,269
298,326,629

298,815,239
298,637,869
298,451,299

N-(PQ)

17,177
17,177

17,387
17,407

298,656,499
299,000,039

59,740
(283,800)

17,147
17,147

17,417
17,447

298,649,299
299,163,709

66,940
(447,470)

17,117

17,467

298,982,639

(266,400)

17,077
17,077

17,477
17,497

298,454,729
298,796,269

261,510
(80,030)

17,057

17,527

298,958,039

(241,800)

17,027

17,567

299,113,309

(397,070)

16,997

17,587

298,926,239

(210,000)

16,967
16,967

17,597
17,617

298,568,299
298,907,639

147,940
(191,400)

16,937
16,937

17,627
17,657

298,548,499
299,056,609

167,740
(340,370)

16,907

17,677

298,865,039

(148,800)

16,897

17,687

298,857,239

(141,000)

16,867
16,867

17,707
17,737

298,663,969
299,169,979

52,270
(453,740)

16,837

17,747

298,806,239

(90,000)

16,817

17,767

298,787,639

(71,400)

269,910

298,782,769
298,432,229

298,750,369
298,398,629

PQ

(91,730)
432,280

17,527
17,527

17,587
17,587

(273,000)
75,940

17,047
17,027

16,987
16,967

(34,130)
317,610

(15,230)
337,110

(163,800)
189,340
27,970
389,610

(99,000)
78,370
264,940

20 | P a g e

PRELIMINARY NOTES DO NOT DISTRIBUTE


P
16,787

16,777

Q
17,767

17,797

PQ
298,254,629

298,580,269

N-(PQ)
461,610

PQ

N-(PQ)

16,787
16,787

17,777
17,797

298,422,499
298,758,239

293,740
(42,000)

16,777

17,807

298,748,039

(31,800)

16,757

17,827

298,727,039

(10,800)

16,747

17,837

298,716,239

135,970

16,757

17,807

298,391,899

324,340

16,747

17,827

298,548,769

167,470

21 | P a g e

Das könnte Ihnen auch gefallen