how to find spanning set - Search