Problem: Let G be an undirected graph, represented by an adjacency list, whose vertices are the numbers from 1 to n. Let S be a list with n^5 pairs of numbers. Explain in words what an efficient algorithm would look like to determine how many pairs of S correspond to edges of G and analyze its complexity.