Roberto Grena algorithm implementation in java language using multiple threads of execution