Added graph decomposition algorithm