New preprint: Transformers Provably Learn Algorithmic Solutions for Graph Connectivity, But Only with the Right Data.