An algorithm is not patent eligible subject matter.
Even if coupled with a generic computer which does nothing, but carry out the algorithm since the Alice-decision of 2014 by the SCOTUS.
Software may be patent eligible subject matter, still.
This means, an invention that includes software may still be granted a utility patent if it is not obvious, for example a system.
Even if the permutations majorly relate to the software component, and the system only uses one additional hardware component beyond a generic computer, it may still be a system which will incorporate software, and thereby protect the software much more broadly than copy right would; in this sense, the software will be subject to a utility patent. Independent claims of systems typically list the hardware component necessary and sufficient to run the broadest embodiment of the invention.
Furthermore, one may obtain a patent for a "computer program product" which is effectively described as the software stored on a storage device, in this sense, an embodiment of such a patent could be a thumb-drive that one copies the algorithm as software code that will perform operations on a generic computer.
As a third way to obtain patent on software (not an algorithm, but a chain of computer instructions such) is to describe the algorithm as a method. Method patents don't necessarily lay out the generic computer prerequisites.
It is common practice to describe patent eligible subject matter software in their patent-sought embodiments as each a system, a computer program product and a method.
The U.S. used to have the most liberal patent system favoring software - and even algorithm related - subject matters for the purposes of utility patent applications.
It is debatable that now the EPO is more liberal in this sense, my experience is that it is not; the EPO is still more restrictive, and it will be the same with the Unitary Patent of the EU as well.