question

antoniogonzalez-9237 avatar image
0 Votes"
antoniogonzalez-9237 asked NonkiTakahashi commented

my factorization algorythm

its a pretty simple method:

if the number to factorize ends in 9 i know one of its factors its gonna end on 1 3 7 or nine

a 4 or a 2 is not posible

so i iterate through all posible two digits number attached to 1 3 7 or 9 multiplied by another number from zero to nine and select only those whos product termination match the original number and go on like that till the begining of the number

BRN441

small-basic
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Just FYI. This is my program Prime factors DFQ430.


0 Votes 0 ·
JanWieldraaijer-1495 avatar image
1 Vote"
JanWieldraaijer-1495 answered

Some observations:
- You have 4 subroutines in your program which are not used, (not critical but unnessesary)
- in Sub comienzo you loop from 2 to 9 which excludes number ending in a 1, so 121 cannot be factorised,
changing the loops from into 1 to 9 solves this.
- you calculate in these loops b (64 or 81 times), this is always the same, put that before the loops.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

antoniogonzalez-9237 avatar image
0 Votes"
antoniogonzalez-9237 answered

theres something i did wrong in my previous program and im not sure what

im onto a factorizing method that i think compromises rsa encryption security, do you think i could get in trouble if i was right?


ill elaborate on my method:


imagine you want to factorize the number 121, by its termination you know one of its factos its gonna end in 1,3,7 or 9, the rest of terminations are just not posible so im starting to siege

i make a for so i test all numbers from zero to nine like 01,11,21,31,41...,03,13,23,33,...

and i go on comparing terminations 11*01=11, termination dont match eliminated, 11*11=121, teminations match so 11 its a candidtae


on next iteration ill try 011,111,211,311...

011 is a winner

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

JanWieldraaijer-1495 avatar image
0 Votes"
JanWieldraaijer-1495 answered NonkiTakahashi commented

How fast is your algorithm?
Can you factirize the number 1956410986640441413344189841
I hav a program that does this in 0.062 seconds

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

My program DFQ430 causes overflow error with 1956410986640441413344189841...

0 Votes 0 ·
antoniogonzalez-9237 avatar image
0 Votes"
antoniogonzalez-9237 answered

im still trying to figure out how fast is my algorythm

this one is better but it still fails for some numbers im figuring out why:

PLQG647.000

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

antoniogonzalez-9237 avatar image
0 Votes"
antoniogonzalez-9237 answered

the previous program was bugged this is an improved version but still have to polish:

FDZM212.000

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

antoniogonzalez-9237 avatar image
0 Votes"
antoniogonzalez-9237 answered

this one is instantaneous but i still can not make it work for all numbers

CLGN16.000

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.