Impara
Due coppie separate di caratteri adiacenti sono scambiate.
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)
Come riconoscerlo
- Two separate pairs of adjacent characters are reversed
- Length remains the same
- All original characters are present
Errori comuni
- Missing one of the two transpositions
- Confusing with single transposition
- Not scanning the entire string
Soluzione passo per passo
Trovare l'errore: Originale '123456' vs Dato '213465'
- Confrontare posizione 1: '1' vs '2' - differenza
- Confrontare posizione 2: '2' vs '1' - differenza
- Primo scambio identificato: '1' e '2' trasposti
- Confrontare posizione 3: '3' = '3'
- Confrontare posizione 4: '4' = '4'
- Confrontare posizione 5: '5' vs '6' - differenza
- Confrontare posizione 6: '6' vs '5' - differenza
- Secondo scambio identificato: '5' e '6' trasposti
Risposta: Errore di doppia trasposizione: '1-2' scambiati E '5-6' scambiati