Compute minimum peak

1. apply pseudo code
2. create compute_map and node_mem in new method
This is wrong.  It will mark almost all nodes as computed (except the function outputs).  Use fgraph.inputs.