Learn
Two separate pairs of adjacent characters are swapped.
Double transposition errors occur when two separate pairs of adjacent characters are swapped in the same string. This creates a more complex error pattern that can be harder to detect because the errors are distributed across the string.
Original: ABCDEF → Error: BADCEF (AB swapped AND CD swapped)
- 123456 → 213465 (12 swapped AND 45 swapped)
- ABCDEF → BACDEF → BADCEF (two transpositions)
- AB-1234 → BA-1324 (AB swapped AND 23 swapped)
How to recognize it
- Two separate pairs of adjacent characters are reversed
- Length remains the same
- All original characters are present
Common mistakes
- Missing one of the two transpositions
- Confusing with single transposition
- Not scanning the entire string
Step-by-step walkthrough
Find the error: Original '123456' vs Given '213465'
- Compare position 1: '1' vs '2' - mismatch
- Compare position 2: '2' vs '1' - mismatch
- First swap identified: '1' and '2' are transposed
- Compare position 3: '3' = '3'
- Compare position 4: '4' vs '4'
- Compare position 5: '5' vs '6' - mismatch
- Compare position 6: '6' vs '5' - mismatch
- Second swap identified: '5' and '6' are transposed
Answer: Double transposition error: '1-2' swapped at positions 1-2 AND '5-6' swapped at positions 5-6