set based KSH implementation; slow for matlab
matrix based greedy growth; not very fast either
min cut algorithm seems to work well
before working on c++ implementation of mincut