Depth-Width tradeoffs in Algorithmic Reasoning of Graph Tasks with Transformers