It happens pretty seldom that two people event exactly the same way to solve a problem. And patent rights grant only a monopoly for a concrete solution and not for a general idea. I wish that were true. However, the patent monopoly typically covers a somewhat general technique, not a concrete solution.