That's not totally true; in the case of software, an implementation is code, which is copyrightable. The idea, the functioning of the code, is not copyrightable, but it may be patentable, because a patent is a more restricted protection on a more abstract idea.
patents protect inventions, not ideas. For physical object, this is easily discerned, but sometimes, it gets muddy when talking about a protocol, or some sort of algorithm. I dislike software patents, but the intention of patents isn't to protect an abstract idea (whether its been twisted to do so is another argument for another day...)
But an invention is obviously a kind of idea. Patents and copyright both protect kinds of ideas; that's why we call them intellectual property.
You actually patent running the algorithm on a general purpose machine, not the code itself. Code is unpatentable.
So in the case of software, how is a patent different from a copyright on your code?
UK law (and EU law) doesn't recognise software patents.