Question: are algorithms discovered or invented?
Answer: Discovered. {A}, the set of all algorithms, has always been there. "Developing" an algorithm merely means picking one suitable one out of this infinite set. So, just as any other kind of mathematical formula, algorithms (and software in general) must not be allowed to be patented.