1. Restate the problem in graph-theoretical terms:
- We have a bipartite graph G(A,B) where ∣A∣=∣B∣=n.
- There are n2−2n+2 colors, and each edge in G is colored with one of these colors.
- Each color is used on at least one edge.
- We need to prove that there exist two vertices P and Q such that there is no or exactly one (P,Q)-path, where a (P,Q)-path is a path from P to Q such that all edges in the path are the same color and all vertices in the path are distinct.
2. Initial observations:
- The total number of edges in a complete bipartite graph Kn,n is n2.
- Since we have n2−2n+2 colors, there are 2n−2 edges that are not used.
3. Consider the structure of the graph:
- Each vertex in A is connected to each vertex in B by a unique edge.
- Since there are n2−2n+2 edges, we can think of removing 2n−2 edges from the complete bipartite graph Kn,n.
4. **Analyze the implications of removing 2n−2 edges:**
- Removing 2n−2 edges from Kn,n means that some vertices in A and B will have fewer connections.
- Specifically, each vertex in A and B will have at least n−2 connections remaining.
5. Consider the coloring of the edges:
- Each color is used on at least one edge.
- Since there are n2−2n+2 colors, each color corresponds to a unique edge or a set of edges.
6. **Prove the existence of P and Q with no or exactly one (P,Q)-path:**
- Suppose for contradiction that for every pair of vertices P and Q, there are at least two (P,Q)-paths.
- This would imply that there are multiple paths of the same color connecting P and Q, which contradicts the fact that we have removed 2n−2 edges and each color is used on a unique set of edges.
7. Conclusion:
- Therefore, there must exist at least one pair of vertices P and Q such that there is no or exactly one (P,Q)-path.
■