A new algorithm for the recognition of series parallel graphs