First solution in Clear category for Break Rings by
from itertools import chain, combinations
rings = set(chain(*connections))
for num in range(1, len(rings)):
for broken_rings in combinations(rings, num):
# 'connection' will be broken when it intersect with 'set(broken_rings)'
if all(connection & set(broken_rings) for connection in connections):
Feb. 21, 2015