2 -- -- 4 -- -- 6 / | | 1 | | vertex cover = { 2 , 3 , 4 } \ | | 3 -- -- 5
V = 6 NEW_LINE E = 7 NEW_LINE insertEdge ( 1 , 2 ) NEW_LINE insertEdge ( 1 , 3 ) NEW_LINE insertEdge ( 2 , 3 ) NEW_LINE insertEdge ( 2 , 4 ) NEW_LINE insertEdge ( 3 , 5 ) NEW_LINE insertEdge ( 4 , 5 ) NEW_LINE insertEdge ( 4 , 6 ) NEW_LINE print ( " Minimum ▁ size ▁ of ▁ a ▁ vertex ▁ cover ▁ = ▁ " , findMinCover ( V , E ) ) NEW_LINE