Applications of Connected Components