1. Initially we have q=2 (a-c-b & d-e). So introduce an internal vertex (u) and make these connected components child of u. u=> a-c-b; d-e; 2. Select component 1 = a-c-b. Check all lines from INPUT which are a subset of this component1.First line of INPUT i.e. "b c a" is a subset of component1. 3."b c a" now becomes the INPUT for the program and it is recursed again with this INPUT(Now for input "b c a" the auxiliary graph will be "b-c" & "a",i.e. two connected components,thus q=2 ...)