According to U.S. and E.U. patent laws, you cannot directly patent an algorithm. This is the main reason why we do not usually patent the results of our research efforts.