A content manager is working on an excel sheet. She has 6 columns in the sheet…
2023
A content manager is working on an excel sheet. She has 6 columns in the sheet - A, B, C, D, E and F. She has to check that no two columns should have the same entry. She can check only 2 columns at a time. How many times will she have to repeat the comparing process to complete the process for the whole file?
- A.
7
- B.
8
- C.
15
- D.
10
Show answer & explanation
Correct answer: C
Concept: When every item in a group of n items must be compared with every other item exactly once (and the order within a pair does not matter), the total number of unique pairs is given by the combination formula nC2 = n(n-1)/2. Equivalently, the first item is compared with the remaining (n-1) items, the next item with whichever items are still left to compare, and so on down to zero.
Application: The sheet has 6 columns: A, B, C, D, E and F. Comparing each column with every other column exactly once, the number of new comparisons contributed by each column (moving left to right) is:
Column A compared with B, C, D, E, F -> 5 comparisons.
Column B compared with C, D, E, F (A already done) -> 4 comparisons.
Column C compared with D, E, F -> 3 comparisons.
Column D compared with E, F -> 2 comparisons.
Column E compared with F -> 1 comparison.
Adding these up: 5 + 4 + 3 + 2 + 1 = 15.
Cross-check: Using the combination formula directly with n = 6: 6C2 = (6 x 5) / 2 = 15, which matches the step-by-step count above, confirming the total number of comparisons is 15.