A coloring approach to the structural diagnosis of interconnects