Patented algorithm: what authors are allowed to do?
If the algorithm in the patent is not published in a conference, can I publish it as (i) an independent researcher or (ii) an employee of another company?


You most likely signed a non-disclosure agreement which will prohibit you from publishing any work product. You can ask your employer to sign a waiver permitting publication.


  If the algorithm in the patent is published in a conference, can I build an (open source) tool from scratch to implement it? can I implement it for another company?


A goal of the patent system is to share knowledge in exchange for an exclusive right to exploit the invention for a limited period. It is country specific as to whether private or non-commercial use is excluded. WIPO's Exceptions and Limitations to Patent Rights: Private and/or Non Commercial Use (SCP/20/3) provides a useful starting point.



Requiring "2 patents a year" is dumb, it encourages quantity over quality.