FRANKFURT (Reuters) – German engineering group Siemens has agreed to buy U.S.-based Mentor Graphics in a $4.5 billion deal that will bolster its industrial software operations and help it keep pace with changes to manufacturing technology.