minimal spanning forest test