You could use the algorithms, just not their implementation of the algorithms. If you rewrote it from scratch, following their text (not their source code), you were fully allowed to use it.
I'm curious how this works in the case of reinvention. Some algorithms are so simple that there is basically one canonical way of writing it. I'm assuming copyright doesn't cover the independent implementation in such cases?
it would be an invalid patent (or at least should be), because
1. There is prior art
2. it is obvious to a domain expert
But given the US patent office's track record, I wouldn't be too surprised if you were able to get a patent. Just don't expect it to hold up in court.
Patents on software are not that simple - it needs to describe an entire physical system that gives value to a user, not just an abstract function that does computation.