In an earlier post I showed an algorithm to factorize integers using backtracking. The algorithm was implemented in python. Here we have now the same thing in erlang. To run the code, copy the script and save it to a file named "factorize.erl". Then enter a shell and compile the module using the following command:… Read More »
Here is an algorithm, written in Python, to factorize integers, using backtracking. The time consumption should be around . So it's not the fastest one, but it's nice. To use it, save the code to a file. If you call the file, for example, "factorize.py", then run python factorize.py <integer to factorize> Have fun!