function reducer (key, value)
  combine the message emitted from mapper
  // get thebest and global optimum
  for each data block
    if fitness < global best
      global best = fitness
    
  
  emitbest and global optimum
Algorithm 3: MRQPSO reduce.