sample minimal graph search