MathCastle
Graph TheoryMediumGraph Algorithms

Graph Algorithms · Medium problem

A graph has vertices s,a,b,c,d,e,fs,a,b,c,d,e,f and edges sa,sb,ab,ac,bc,bd,ce,de,ef,cdsa, sb, ab, ac, bc, bd, ce, de, ef, cd. Running a BFS from ss, how many of the graph's 1010 edges connect two vertices that end up in the SAME BFS layer (the same distance from ss)?