Final answer:
To find all the pairs of kings or queens (a,b) such that a was the great grandchild of b, we need to understand the concept of generations and identify the pairs where the great grandchild matches with the king or queen.
Step-by-step explanation:
To find all the pairs of kings or queens (a,b) such that a was the great grandchild of b, we need to understand the concept of generations. Let's consider a king or queen A who is the great grandchild of king or queen B. This means that there are three generations between A and B.
So, to find the pairs, we can start by listing all the kings or queens and their descendants up to three generations. We can then identify the pairs where the great grandchild matches with the king or queen. For example, if we have king B and their descendants are C, D, E, and F, and among them E is the great grandchild, then the pair would be (E, B).
By following this approach, we can find all the pairs of kings or queens such that a was the great grandchild of b.