Pubblicità

Doppia Trasposizione

Due coppie separate di caratteri adiacenti sono scambiate.

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'

  1. Confrontare posizione 1: '1' vs '2' - differenza
  2. Confrontare posizione 2: '2' vs '1' - differenza
  3. Primo scambio identificato: '1' e '2' trasposti
  4. Confrontare posizione 3: '3' = '3'
  5. Confrontare posizione 4: '4' = '4'
  6. Confrontare posizione 5: '5' vs '6' - differenza
  7. Confrontare posizione 6: '6' vs '5' - differenza
  8. Secondo scambio identificato: '5' e '6' trasposti

Risposta: Errore di doppia trasposizione: '1-2' scambiati E '5-6' scambiati

Indicazioni per la pratica

Controllo Errori

Pubblicità