Moda colonial de 1810 donde podemos ver las distintas prendas
Solucion problema ajedrez v1.0
1. PROBLEMA DE AJEDREZ.
Colocar en un tablero de [2n X 2n] ó [(2n+1) X (2n+1)] casillas respectivamente (2n) ‘Reinas’ ó
(2n+1) ‘Reinas’ que no se amenacen entre ellas, utilizando un programa rápido y fácil.
Se eliminarán los tableros:
(1X1): una Reina sin movimiento
(2X2) y (3X3): solo se pueden colocar 1 y 2 Reinas respectivamente
Argumentación:
Como el “Caballo” es la única pieza que puede amenazar a la “Reina”, sin ser a su vez
amenazado por ella, el mejor movimiento para encontrar una solución al problema parece ser
el movimiento del “caballo” hacia arriba ó hacia abajo.
Hacia arriba: Hacia abajo:
Nomenclatura:
T(2n X 2n): Tablero par.
T (2n+1)X(2n+1) : Tablero impar.
Cx: Columna de casillas vertical de abscisa ‘x’
R(x,y): ‘Reina’ que ocupa la casilla (x,y)
x,y,n,k pertenecen a N:(naturales: 1,2,3,…)
Tipos de Tableros
A) Tableros pares (2n X 2n)
A1: si 2n+1 <> 3K (no divisible por 3)
A2: si 2n+1 = 3K (divisible por 3)
o y n= 2K (divisible por 2)
A3: si 2n+1 = 3K (divisible por 3)
o y n<>2K (no divisible por 2)
B) Tableros impares (2n+1)X(2n+1)
B1: si 2n+1 <> 3K
B2: si 2n+1 = 3K
2. SOLUCION.
A). TABLEROS (2n X 2n), pares.
A1: con 2n+1 <> 3K (no divisible por 3)
T (2n X 2n), (4X4), (6X6), (10X10), (12X12), (16X16),…
Formulario: T (2n X 2n) ; 2n+1 <> 3K
1 ≤ x ≤ n ; y = 2x ; R (x, 2x)
n+1 ≤ x ≤ 2n ; y= 2x-(2n+1) ; R(x,y) ó R [(x, 2x-(2n+1)]
A2: si 2n+1 = 3K (divisible por 3)
o y n= 2K (divisible por 2)
T (2n X 2n), (8X8), (20X20), (32X32), de 12 en 12…
Formulario: T (2n X 2n) ; 2n+1 = 3K; n=2K
1 ≤ x ≤ n ; y = 2x ; R (x, 2x)
n+1 ≤ x ≤ 2n ; x ≠ 2K ; y= 2x-(2n-1) ; R(x,y) ó R [(x, 2x-(2n-1)]
n+1 ≤ x ≤ 2n ; x = 2K ; y= 2x-(2n+3) ; R(x,y) ó R [(x, 2x-(2n+3)]
A3: si 2n+1 = 3K (divisible por 3)
o y n<>2K (no divisible por 2)
T (2n X 2n), (14X14), (26X26), (38X38), de 12 en 12…
Formulario: T (2n X 2n) ; 2n+1 = 3K; n≠ 2K
1 ≤ x ≤ n-1 ; y = 2x+2 ; R (x, 2x+2)
X=n ; y =2 ; R(n,2)
n+1 ≤ x ≤ 2n-3 ; y= 2x-(2n-5) ; R(x,y) ó R [(x, 2x-(2n-5)]
2n-2 ≤ x ≤ 2n ; y= 2x-(4n-5) ; R(x,y) ó R [(x, 2x-(4n-5)]
3. B). TABLEROS (2n+1) X (2n+1),impares.
B1: con 2n+1 <> 3K (no divisible por 3)
T ((2n+1)X(2n+1)), (5X5), (7X7), (11X11), (13X13), (17X17),…
Formulario: T (2n+1) X (2n+1)) ; 2n+1 <> 3K
1 ≤ x ≤ n ; y = 2x ; R (x, 2x)
n+1 ≤ x ≤ 2n+1 ; y= 2x-(2n+1) ; R(x,y) ó R [(x, 2x-(2n+1)]
B2: si 2n+1 = 3K (divisible por 3)
T ((2n+1)X(2n+1)), (9X9), (15X15), (21X21), de 6 en 6…
Formulario: T (2n+1) X (2n+1) ; 2n+1 = 3K;
1 ≤ x ≤ ; y = -2x +( ) ; R (x, -2x +( ))
< x ≤ n ; y = -2x +( ) ; R (x, -2x +( ))
n+1 ≤ x ≤ ; y = -2x +( ) ; R (x, -2x +( ))
< x ≤ 2n+1 ; y = -2x +( ) ; R (x, -2x +( ))
Soluciones derivadas.
De cada solución propuesta, se pueden dar otras por:
1) Rotación de 90º, 180º, 270º al tablero
2) Simetría de los 4 ejes de simetría del tablero
Más adelante se muestran los ejemplos.
4. EJEMPLOS DE SOLUCION.
A). TABLEROS (2n X 2n), pares.
A1: con 2n+1 <> 3K (no divisible por 3)
T (2n X 2n) = T(10X10)
10+1 <> 3K
A2: si 2n+1 = 3K (divisible por 3)
o y n= 2K (divisible por 2)
T (2n X 2n) = T (20 x 20)
20+1= 3K ; 10 = 2K
5. A3: si 2n+1 = 3K (divisible por 3)
o y n<>2K (no divisible por 2)
T (2n X 2n) = T (14 x 14)
14+1= 3K ; 7 <> 2K
B). TABLEROS (2n+1) X (2n+1),impares.
B1: con 2n+1 <> 3K (no divisible por 3)
T((2n+1)X(2n+1)) = T (13 x 13)
13<> 3K
6. B2: si 2n+1 = 3K (divisible por 3)
T((2n+1)X(2n+1)) = T (21 x 21)
21 = 3K
7. Y así para todos los del mismo tipo: 9X9, 15X15,..
Soluciones derivadas.
Cada solución propuesta tiene variantes fáciles y rápidas, conseguidas
8. a) Por simetría (4 ejes del tablero)
b) Por rotación del tablero de 90º, 180º, 270º
Ejemplo tablero 8x8
Lo mismo se puede hacer con cualquier otra solución.
10. POSIBLE PROGRAMACION INFORMATICA.
I. Tableros pares (2n x 2n) R(x,y)
LINEA 1: Programar tablero de 2n casillas de lado con ejes horizontal Ox y vertical Oy
LINEA 2: Casillas: 2n X 2n
LINEA 3:
- If 2n+1 <> 3K goto Linea 4
- If 2n+1 = 3K goto linea 7
LINEA 4: x Ɛ [1,n]; y=2x ; R (x,y)
LINEA 5: x Ɛ [n+1,2]; y=2x-(2n+1) ; R (x,y)
LINEA 6: Programar ‘R’ en casillas (x,y)
LINEA 7:
- If n=2K goto línea 8
- If n <> 2K goto linea 11
LINEA 8: x Ɛ [1,n]; y=2x ; R (x,y)
LINEA 9: If x Ɛ [n+1,2n] y x<> 2K; y=2x-(2n-1) ; R (x,y)
LINEA 10: If x Ɛ [n+1,2n] y x= 2K; y=2x-(2n+3) ; R (x,y)
LINEA 11: Programar ‘R’ en casillas (x,y)
LINEA 12: x Ɛ [1,n-1]; y=2x+2 ; R (x,y)
LINEA 13: x Ɛ [n]; y=2; R (n,2)
LINEA 14: x Ɛ [n+1,2n-3]; y=2x-(2n-5); R (x,y)
LINEA 15: x Ɛ [2n-2,2n]; y=2x-(4n-5); R (x,y)
LINEA 16: Programar ‘R’ en casillas (x,y)
11. II. Tableros impares (2n+1) x (2n+1) R(x,y)
LINEA 1: Programar tablero de 2n+1 casillas de lado con ejes horizontal Ox y vertical Oy
LINEA 2: Casillas: (2n+1) X (2n+1)
LINEA 3: If 2n+1 <> 3K goto LINEA 4
- If 2n+1 = 3K goto LINEA 7
LINEA 4: x Ɛ [1,n] ; y = 2x ; R(x,y)
LINEA 5: x Ɛ [n+1,2n+1] ; y = 2x-(2n+1) ; R(x,y)
LINEA 6: Programar ‘R’ en casillas (x,y)
LINEA 7: 1 ≤ x ≤ ; y = -2x+ ; R(x,y)
LINEA 8: + 1 ≤ x ≤ n ; y = -2x+ ; R(x,y)
LINEA 9: n+1 ≤ x ≤ ; y = -2x+ ; R(x,y)
LINEA 10: + 1 ≤ x ≤2n+1 ; y = -2x+ ; R(x,y)
LINEA 11: Programar ‘R’ en casillas (x,y)