Compute minimum peak

1. apply pseudo code
2. create compute_map and node_mem in new method
defaultdict is builtin since 2.5.  We support 2.6+