connected subgraphs enumeration - raw sketch