Matemáticas en el juego Dobble

En nuestra última noche de juegos en familia, los niños sacaron con entusiasmo el juego Dobble (la edición de Harry Potter). Tras perder cinco rondas (sin que mi carta coincidiera visiblemente con la otra), me sorprendió descubrir que todos los jugadores pueden encontrar una pareja en cada ronda. Sin embargo, mi incredulidad solo se tradujo en más rondas perdidas: los niños simplemente eran más rápidos.


Razón suficiente para echar un vistazo más de cerca al juego desde un punto de vista matemático. Primero, el principio del juego: Dobble es un juego de cartas simple con \(55\) cartas redondas, cada una con ocho símbolos diferentes. Todas las cartas se reparten por turno, dejando solo la última carta en el medio de la mesa. Ahora todos los jugadores tienen que comparar simultáneamente los símbolos de la carta con los símbolos de su carta superior actual. Si un jugador ha encontrado el mismo símbolo en ambas cartas, puede colocar su carta en la pila siendo el más rápido en nombrar el símbolo. Gana el jugador que primero descarta todas sus cartas.

¿Cómo puede ser que haya \(55\) cartas de este tipo construidas de tal manera que dos cartas cualesquiera tengan exactamente un símbolo en común? ¿Cuál es el número mínimo de dichos símbolos que se deben utilizar? ¿Cuál es el número máximo de tarjetas de este tipo?

Primero, construimos estas tarjetas usando los siguientes pasos lógicos (todas las tarjetas construidas posteriormente tienen la propiedad de que están ordenadas en orden ascendente): La primera tarjeta debe tener 8 símbolos diferentes, es decir, lee:

$$\left(\begin{array}{c} 1 \\ 2 \\ 3 \\ 4 \\ 5 \\ 6 \\ 7 \\ 8 \end{array}\right)$$

¿Cómo construimos las siguientes cartas de manera que tengan exactamente un símbolo en común con la primera carta?:

$$\left(\begin{array}{c} 1 \\ x_{1.2} \\ x_{1.3} \\ x_{1.4} \\ x_{1.5} \\ x_{1.6} \\ x_{1.7} \\ x_{1.8} \end{array}\right), \left(\begin{array}{c} 1 \\ x_{2.2} \\ x_{2.3} \\ x_{2.4} \\ x_{2.5} \\ x_{2.6} \\ x_{2.7} \\ x_{2.8} \end{array}\right), \left(\begin{array}{c} 1 \\ x_{3.2} \\ x_{3.3} \\ x_{3.4} \\ x_{3.5} \\ x_{3.6} \\ x_{3.7} \\ x_{3.8} \end{array}\right), \ldots, \left(\begin{array}{c} 1 \\ x_{k.2} \\ x_{k.3} \\ x_{k.4} \\ x_{k.5} \\ x_{k.6} \\ x_{k.7} \\ x_{k.8} \end{array}\right)$$

Aquí ya se puede construir cualquier cantidad de tales tarjetas (simplemente complete los lugares en orden ascendente, comenzando con \(9\) ). Sin embargo, este caso trivial no es interesante, ya que estamos interesados ​​en un conjunto con un número mínimo de símbolos (y un número máximo de cartas). Consideremos ahora el segundo símbolo \( x_{l.2} \) de cada carta, para el cual obviamente se debe aplicar lo siguiente: \( x_{1.2} \neq x_{2.2} \neq x_{3.2} \neq \ldots \neq x_{k.2} \) . Por lo tanto, hemos introducido necesariamente \( k \) nuevos símbolos. Pero ahora \( k \leq 8-1 = 7 \) , ya que ninguno de los \( 7 \) símbolos \( x_{1.2},\, x_{1.3},\, x_{1.4},\, x_{1.5},\, x_{1.6},\, x_{1.7},\, x_{1.8} \) (de la carta más a la izquierda) puede coincidir con el segundo símbolo de cada una de las otras cartas (de lo contrario, habría dos símbolos idénticos ).

Hemos encontrado un máximo de estas 7 cartas nuevas:

$$\left(\begin{array}{c} 1 \\ x_{1.2} \\ x_{1.3} \\ x_{1.4} \\ x_{1.5} \\ x_{1.6} \\ x_{1.7} \\ x_{1.8} \end{array}\right), \left(\begin{array}{c} 1 \\ x_{2.2} \\ x_{2.3} \\ x_{2.4} \\ x_{2.5} \\ x_{2.6} \\ x_{2.7} \\ x_{2.8} \end{array}\right), \left(\begin{array}{c} 1 \\ x_{3.2} \\ x_{3.3} \\ x_{3.4} \\ x_{3.5} \\ x_{3.6} \\ x_{3.7} \\ x_{3.8} \end{array}\right), \left(\begin{array}{c} 1 \\ x_{4.2} \\ x_{4.3} \\ x_{4.4} \\ x_{4.5} \\ x_{4.6} \\ x_{4.7} \\ x_{4.8} \end{array}\right), \left(\begin{array}{c} 1 \\ x_{5.2} \\ x_{5.3} \\ x_{5.4} \\ x_{5.5} \\ x_{5.6} \\ x_{5.7} \\ x_{5.8} \end{array}\right), \left(\begin{array}{c} 1 \\ x_{6.2} \\ x_{6.3} \\ x_{6.4} \\ x_{6.5} \\ x_{6.6} \\ x_{6.7} \\ x_{6.8} \end{array}\right), \left(\begin{array}{c} 1 \\ x_{7.2} \\ x_{7.3} \\ x_{7.4} \\ x_{7.5} \\ x_{7.6} \\ x_{7.7} \\ x_{7.8} \end{array}\right)$$

Con el mismo argumento ahora construimos los siguientes mapas \(7\) (el primero de estos mapas tiene que chocar con nuestro mapa inicial, y no con \(1\) , de lo contrario sería con el \(7\) anterior mapas encontrados):

$$\left(\begin{array}{c} 2 \\ x_{8.2} \\ x_{8.3} \\ x_{8.4} \\ x_{8.5} \\ x_{8.6} \\ x_{8.7} \\ x_{8.8} \end{array}\right), \left(\begin{array}{c} 2 \\ x_{9.2} \\ x_{9.3} \\ x_{9.4} \\ x_{9.5} \\ x_{9.6} \\ x_{9.7} \\ x_{9.8} \end{array}\right), \left(\begin{array}{c} 2 \\ x_{10.2} \\ x_{10.3} \\ x_{10.4} \\ x_{10.5} \\ x_{10.6} \\ x_{10.7} \\ x_{10.8} \end{array}\right), \left(\begin{array}{c} 2 \\ x_{11.2} \\ x_{11.3} \\ x_{11.4} \\ x_{11.5} \\ x_{11.6} \\ x_{11.7} \\ x_{11.8} \end{array}\right), \left(\begin{array}{c} 2 \\ x_{12.2} \\ x_{12.3} \\ x_{12.4} \\ x_{12.5} \\ x_{12.6} \\ x_{12.7} \\ x_{12.8} \end{array}\right), \left(\begin{array}{c} 2 \\ x_{13.2} \\ x_{13.3} \\ x_{13.4} \\ x_{13.5} \\ x_{13.6} \\ x_{13.7} \\ x_{13.8} \end{array}\right), \left(\begin{array}{c} 2 \\ x_{14.2} \\ x_{14.3} \\ x_{14.4} \\ x_{14.5} \\ x_{14.6} \\ x_{14.7} \\ x_{14.8} \end{array}\right)$$

Este argumento puede continuarse para las siguientes \(7\) cartas de la misma manera; un total de \(8-2 = 6\) veces más. Por lo tanto, las últimas \(7\) cartas son:

$$\left(\begin{array}{c} 8 \\ x_{50.2} \\ x_{50.3} \\ x_{50.4} \\ x_{50.5} \\ x_{50.6} \\ x_{50.7} \\ x_{50.8} \end{array}\right), \left(\begin{array}{c} 8 \\ x_{51.2} \\ x_{51.3} \\ x_{51.4} \\ x_{51.5} \\ x_{51.6} \\ x_{51.7} \\ x_{51.8} \end{array}\right), \left(\begin{array}{c} 8 \\ x_{52.2} \\ x_{52.3} \\ x_{52.4} \\ x_{52.5} \\ x_{52.6} \\ x_{52.7} \\ x_{52.8} \end{array}\right), \left(\begin{array}{c} 8 \\ x_{53.2} \\ x_{53.3} \\ x_{53.4} \\ x_{53.5} \\ x_{53.6} \\ x_{53.7} \\ x_{53.8} \end{array}\right), \left(\begin{array}{c} 8 \\ x_{54.2} \\ x_{54.3} \\ x_{54.4} \\ x_{54.5} \\ x_{54.6} \\ x_{54.7} \\ x_{54.8} \end{array}\right), \left(\begin{array}{c} 8 \\ x_{55.2} \\ x_{55.3} \\ x_{55.4} \\ x_{55.5} \\ x_{55.6} \\ x_{55.7} \\ x_{55.8} \end{array}\right), \left(\begin{array}{c} 8 \\ x_{56.2} \\ x_{56.3} \\ x_{56.4} \\ x_{56.5} \\ x_{56.6} \\ x_{56.7} \\ x_{56.8} \end{array}\right)$$

Si ahora quisieras construir otra carta $$\left(\begin{array}{c} 9 \\ x_{57.2} \\ x_{57.3} \\ x_{57.4} \\ x_{57.5} \\ x_{57.6} \\ x_{57.7} \\ x_{57.8} \end{array}\right)$$ , esto fallaría porque esta carta no tiene un símbolo común con la carta inicial. Esto significa que hemos construido un máximo de \(1 + 8 \cdot 7 = 57\) tarjetas. Nuestro objetivo ahora es construir la misma cantidad.

Para hacer esto, miramos las primeras 7 cartas nuevas encontradas y llegamos a la conclusión de que necesitamos absolutamente \(7 \cdot 7\) nuevos símbolos (ninguna carta puede tener un símbolo duplicado y cada símbolo a otorgar puede no aparecer dos veces porque el \(1\) ya es doble):

$$\left(\begin{array}{c} 1 \\ 9 \\ 10 \\ 11 \\ 12 \\ 13 \\ 14 \\ 15 \end{array}\right), \left(\begin{array}{c} 1 \\ 16 \\ 17 \\ 18 \\ 19 \\ 20 \\ 21 \\ 22 \end{array}\right), \left(\begin{array}{c} 1 \\ 23 \\ 24 \\ 25 \\ 26 \\ 27 \\ 28 \\ 29 \end{array}\right), \left(\begin{array}{c} 1 \\ 30 \\ 31 \\ 32 \\ 33 \\ 34 \\ 35 \\ 36 \end{array}\right), \left(\begin{array}{c} 1 \\ 37 \\ 38 \\ 39 \\ 40 \\ 41 \\ 42 \\ 43 \end{array}\right), \left(\begin{array}{c} 1 \\ 44 \\ 45 \\ 46 \\ 47 \\ 48 \\ 49 \\ 50 \end{array}\right), \left(\begin{array}{c} 1 \\ 51 \\ 52 \\ 53 \\ 54 \\ 55 \\ 56 \\ 57 \end{array}\right)$$

Esto significa que necesitamos un mínimo de \(8 + (7 \cdot 7) = 57\) símbolos (es decir, ¡tantos símbolos como cartas!). Ahora estamos intentando arreglárnoslas con este número y encontrar una especificación de diseño para todos los demás elementos. Para hacer esto, construimos un doble ligeramente más pequeño que solo lleva \(3\) símbolos por carta y obtenemos como carta inicial

$$\left(\begin{array}{c} 1 \\ 2 \\ 3 \end{array}\right)$$

y las otras cartas

$$\left(\begin{array}{c} 1 \\ 4 \\ 5 \end{array}\right), \left(\begin{array}{c} 1 \\ 6 \\ 7 \end{array}\right)$$

$$\left(\begin{array}{c} 2 \\ x_{3.2} \\ x_{3.3} \end{array}\right), \left(\begin{array}{c} 2 \\ x_{4.2} \\ x_{4.3} \end{array}\right)$$

$$\left(\begin{array}{c} 3 \\ x_{5.2} \\ x_{5.3} \end{array}\right), \left(\begin{array}{c} 3 \\ x_{6.2} \\ x_{6.3} \end{array}\right)$$

con un total de \(1 + 3 \cdot 2 = 7\) cartas y \( 3 + (2 \cdot 2) = 7\) símbolos. Con un poco de prueba y error (y usando los símbolos ya asignados) obtienes el siguiente dobble:

$$\left(\begin{array}{c} 1 \\ 2 \\ 3 \end{array}\right)$$

$$\left(\begin{array}{c} 1 \\ 4 \\ 5 \end{array}\right), \left(\begin{array}{c} 1 \\ 6 \\ 7 \end{array}\right)$$

$$\left(\begin{array}{c} 2 \\ 4 \\ 6 \end{array}\right), \left(\begin{array}{c} 2 \\ 5 \\ 7 \end{array}\right)$$

$$\left(\begin{array}{c} 3 \\ 4 \\ 7 \end{array}\right), \left(\begin{array}{c} 3 \\ 5 \\ 6 \end{array}\right)$$

¿Se puede encontrar esto también sistemáticamente? Para hacer esto, ingresamos los símbolos recién asignados \(4, 5, 6, 7\) en una matriz cuadrada:

$$\begin{array}{ccc} 4 & & 5 \\ & & \\ 6 & & 7\end{array}$$

Ahora imaginamos para las dos primeras cartas (comenzando con los símbolos iniciales \ \(4\) y \(5\) ) líneas verticales que conectan los símbolos inferiores \(6\) y \(7\):

$$\begin{array}{ccc} 4 & & 5 \\ \vdots & & \vdots \\ 6 & & 7\end{array}$$

Dado que estas líneas no se cruzan, obtenemos (trazando los símbolos en las líneas de conexión línea por línea) las cartas válidas más cercanas:

$$\left(\begin{array}{c} 2 \\ 4 \\ 6 \end{array}\right), \left(\begin{array}{c} 2 \\ 5 \\ 7 \end{array}\right)$$

Finalmente, imaginamos conectar líneas con una pendiente diferente (en este caso con la pendiente \(1\) ):

$$\begin{array}{ccccc} & 4 & & 5 & \\ \ddots & & \ddots & & \ddots \\ & 6 & & 7 &\end{array}$$

La segunda línea de conexión (entre \(5\) y \(6\) ) sale de la matriz por el borde derecho y vuelve a entrar por el borde izquierdo. Al elegir inteligentemente el gradiente, nos aseguramos de que las líneas de conexión no se crucen entre sí, pero también de que las líneas de conexión anteriores (verticales) no se crucen. Esta idea de diseño finalmente conduce a la siguiente fórmula de diseño:

Un dobble con \(k \in \mathbb{N} \, | \, (k-1) \text{ prim} \) tiene \(1+(k \cdot (k-1)) = k^2-k+1 = k + (k-1)(k-1)\) cartas y símbolos. Para el mapa \(K_x\) con \(x \in \mathbb{N}\) y \(0 \leq x \leq (k-1) \cdot k\) se aplica:

$$K_x = \left(\begin{array}{c} f(x,1) \\ f(x,2) \\ \vdots \\ f(x,k) \end{array}\right), \,\, m = \left\lfloor \frac{x-1}{k-1} \right\rfloor + 1,$$

$$f(x,y) = \left\{\begin{array}{ll} y & \text{falls } x = 0 \\ \lfloor \frac{x-1}{k-1} \rfloor + 1, &\text{sonst falls } y = 1 \\ (k+1) + (k-1)(x-1) + (y-2), & \text{sonst falls } 0 < x < k \\ \left( \left((m-1)(k-1)+x\right)-1+ \left( (m-2)(y-2) \right) \right) \% (k-1) &\text{sonst} \\ + (k+1) + (k-1)(y-2)&\end{array}\right.$$

Hay \((k-1)\cdot k + 1 = k + (k-1)(k-1)\) piezas de estas cartas. Ahora solo queda mostrar:

$$ \forall x_1 < x_2 \in \{ 1, \ldots, k+(k-1)(k-1) \} \, \exists \, ! \, y_1, y_2 \in \{ 1, \ldots, k \}: f(x_1, y_1) = f(x_2, y_2) $$

  • 1er caso: \( x_1 = 0 \)
    • Caso 1a: \( 0 < x_2 < k \)
      • Para \(y_1 = 1\) y \(y_2 = 1\) :
        \(f(x_1, y_1) = f(0, 1) = 1\)
        \(f(x_2, y_2) = f(x_2, 1) = \lfloor \frac{x_2-1}{k-1} \rfloor + 1 = 1\) .
      • Para \(y_1 \neq 1\) y \(y_2 = 1\) :
        \(f(x_1, y_1) = f(0, y_1) = y_1 \neq 1\)
        \(f(x_2, y_2) = f(x_2, y_2) = \lfloor \frac{x_2-1}{k-1} \rfloor + 1 = 1\)
      • Para \(y_1 = 1\) y \(y_2 \neq 1\) :
        \(f(x_1, y_1) = f(0, 1) = 1\)
        \(f(x_2, y_2) = f(x_2, y_2) = (k+1) + (k-1)(x-1) + (y-2) =\)
        \((k+1)(x-1) + (k-1) + y \geq (k+1)(x-1)+y > 1\)
      • Para \(y_1 \neq 1\) y \(y_2 \neq 1\) es:
        \(f(x_1, y_1) = f(0, y_1) = y_1 \leq k\)
        \(f(x_2, y_2) = f(x_2, y_2) = (k+1) + (k-1)(x-1) + (y-2) > k\)
    • Caso 1b: \( x_2 \geq k \)
      • Para \(y_1 = \left\lfloor \frac{x_2-1}{k-1} \right\rfloor + 1\) y \(y_2 = 1\) tenemos:
        \(f(x_1, y_1) = f(0, \left\lfloor \frac{x_2-1}{k-1} \right\rfloor + 1) = \left\lfloor \frac{x_2-1}{k-1} \right\rfloor + 1\)
        \(f(x_2, y_2) = f(x_2, 1) = \left\lfloor \frac{x_2-1}{k-1} \right\rfloor + 1\)
      • Para \(y_1 \neq \left\lfloor \frac{x_2-1}{k-1} \right\rfloor + 1\) y \(y_2 = 1\) es:
        \(f(x_1, y_1) = f(0, y_1) = y_1 \neq \left\lfloor \frac{x_2-1}{k-1} \right\rfloor + 1\)
        \(f(x_2, y_2) = f(x_2, 1) = \left\lfloor \frac{x_2-1}{k-1} \right\rfloor + 1\)
      • Para \(y_2 \neq 1\) es:
        \(f(x_1, y_1) = f(0, y_1) = y_1 \leq k\)
        \(f(x_2, y_2) = \left( \left((m_2-1)(k-1)+x_2\right)-1+ \left( (m_2-2)(y_2-2) \right) \right) \% (k-1)\)
        \(+ (k+1) + (k-1)(y_2-2) \geq (k+1)+(k-1)(y_2-2) > k \)
  • Segundo caso: \( 0 < x_1 < k \)
    • Caso 2a: \( 0 < x_2 < k \)
      • Para \(y_1 = 1\) y \(y_2 = 1\) :
        \(f(x_1, y_1) = f(x_1, 1) = \left\lfloor \frac{x_1-1}{k-1} \right\rfloor + 1 = 1\)
        \(f(x_2, y_2) = f(x_2, 1) = \left\lfloor \frac{x_2-1}{k-1} \right\rfloor + 1 = 1\)
      • Para \(y_1 \neq 1\) y \(y_2 = 1\) :
        \(f(x_1, y_1) = f(x_1, y_1) = (k+1)+(k-1)(x_1-1)+(y_1-2) > 1\)
        \(f(x_2, y_2) = f(x_2, 1) = \left\lfloor \frac{x_2-1}{k-1} \right\rfloor + 1 = 1\)
      • Para \(y_1 = 1\) y \(y_2 \neq 1\) :
        \(f(x_1, y_1) = f(x_1, 1) = \left\lfloor \frac{x_1-1}{k-1} \right\rfloor + 1 = 1\)
        \(f(x_2, y_2) = f(x_2, y_2) = (k+1)+(k-1)(x_2-1)+(y_2-2) > 1\)
      • Para \(y_1 \neq 1\) y \(y_2 \neq 1\) es:
        \(f(x_1, y_1) = (k+1)+(k-1)(x_1-1)+(y_1-2) \leq\)
        \((k+1)+(k-1)(x_1-1)+(k-2)\)
        \(f(x_2, y_2) = (k+1)+(k-1)(x_2-1)+(y_2-2) \geq\)
        \((k+1)+(k-1)((x_1+1)-1)+(y_2-2) =\)
        \((k+1)+(k-1)(x_1-1) + (k-1) + (y_2-2) \geq\)
        \((k+1)+(k-1)(x_1-1) + (k-1) + (2-2) \geq\)
        \((k+1)+(k-1)(x_1-1) + (k-1) > (k+1)+(k-1)(x_1-1) + (k-2)\)
    • Caso 2b: \( x_2 \geq k \)
      • Para \(y_1 = 1\) y \(y_2 = 1\) :
        \(f(x_1, y_1) = f(x_1, 1) = \left\lfloor \frac{x_1-1}{k-1} \right\rfloor + 1 = 1\)
        \(f(x_2, y_2) = f(x_2, 1) = \left\lfloor \frac{x_2-1}{k-1} \right\rfloor + 1 \geq \left\lfloor \frac{k-1}{k-1} \right\rfloor + 1 = 2 > 1\)
      • Para \(y_1 = 1\) y \(y_2 \neq 1\) :
        \(f(x_1, y_1) = f(x_1, 1) = \left\lfloor \frac{x_1-1}{k-1} \right\rfloor + 1 = 1\)
        \(f(x_2, y_2) = \left( \left((m_2-1)(k-1)+x_2\right)-1+ \left( (m_2-2)(y_2-2) \right) \right) \% (k-1)\)
        \(+ (k+1) + (k-1)(y_2-2) \geq (k+1) + (k-1)(y_2-2) > 1\)
      • Para \(y_1 \neq 1\) y \(y_2 = 1\) :
        \(f(x_1, y_1) = \left( \left((m_1-1)(k-1)+x_1\right)-1+ \left( (m_1-2)(y_1-2) \right) \right) \% (k-1)\)
        \(+ (k+1) + (k-1)(y_1-2) \geq (k+1) + (k-1)(y_1-2) > 1\)
        \(f(x_2, y_2) = f(x_2, 1) = \left\lfloor \frac{x_2-1}{k-1} \right\rfloor + 1 = 1\)
      • Para \(y_1 \neq 1\) y \(y_2 \neq 1\) es:
        \((k+1) + (k-1)(x_1-1) + (y_1-2) =\)
        \(\left( \left((m_2-1)(k-1)+x_2\right)-1+ \left( (m_2-2)(y_2-2) \right) \right) \% (k-1)\)
        \(+ (k+1) + (k-1)(y-2)\)
        \(\Leftrightarrow y_1 = (k-1)y_2 - (k-1)(x_1+1) +\)
        \(\left( 2 + \left( \left( \left((m_2-1)(k-1)+x_2\right)-1+ \left( (m_2-2)(y_2-2) \right) \right) \% (k-1) \right) \right) \)
        Para \(y_2 = x_1+1\) con \( 2 \leq y_2 \leq k\) es
        \(y_1 = 2 + \left( \left( \left((m_2-1)(k-1)+x_2\right)-1+ \left( (m_2-2)(y_2-2) \right) \right) \% (k-1) \right)\) con \( 2 \leq y_1 \leq k\).
        Aquí solo hay una solución \( (y_1, y_2) \).
        Porque elegimos \(y^*_2=y_2-1\) como valor, es \(y^*_1 = y_1-(k-1) < 2\).
        Además, para \(y^*_2*=y_2+1\) luego \(y^*_1 = y_1+(k-1) > k\).
  • 3. Caso: \( x_1 \geq k \)
    • Caso 3a: \( x_2 \geq k \)
      • Caso 3a': \(m_1 = \left\lfloor \frac{x_1-1}{k-1} \right\rfloor +1 = \left\lfloor \frac{x_2-1}{k-1} \right\rfloor +1 = m_2\)
        • Para \(y_1 = 1\) y \(y_2 = 1\) :
          \(f(x_1, y_1) = f(x_1, 1) = m_1\)
          \(f(x_2, y_2) = f(x_2, 1) = m_2 = m_1\)
        • Para \(y_1 = 1\) y \(y_2 \neq 1\) :
          \(f(x_1, y_1) = f(x_1, 1) = m_1 = \left\lfloor \frac{x_1-1}{k-1} \right\rfloor + 1 \leq \left\lfloor \frac{((k-1) \cdot k)-1}{k-1} \right\rfloor + 1 =\)
          \(\left\lfloor k - \frac{1}{k-1} \right\rfloor + 1 = (k - 1) + 1 = k\)
          \(f(x_2, y_2) = \left( \left((m_2-1)(k-1)+x_2\right)-1+ \left( (m_2-2)(y_2-2) \right) \right) \%\)
          \((k-1) + (k+1) + (k-1)(y_2-2) \geq\)
          \((k+1) + (k-1)(y_2-2) \geq (k+1) > k\)
        • Para \(y_1 \neq 1\) y \(y_2 = 1\) :
          Ver \(y_1 = 1\) y \(y_2 \neq 1\) .
        • Para \(y_1 \neq 1\) y \(y_2 \neq 1\) es:
          \(f(x_1, y_1) = \left( \left((m_1-1)(k-1)+x_1\right)-1+ \left( (m_1-2)(y_1-2) \right) \right) \%\)
          \((k-1) + (k+1) + (k-1)(y_1-2) = L_1 + (k+1) + (k-1)(y_1-2)\)
          \(f(x_2, y_2) = \left( \left((m_2-1)(k-1)+x_2\right)-1+ \left( (m_2-2)(y_2-2) \right) \right) \%\)
          \((k-1) + (k+1) + (k-1)(y_2-2) = L_2 + (k+1) + (k-1)(y_2-2)\)
          Entonces \(f(x_1, y_1) = f(x_2, y_2) \Leftrightarrow\)
          \(L_1 + (k+1) + (k-1)(y_1-2) = L_2 + (k+1) + (k-1)(y_2-2) \Leftrightarrow\)
          \(L_1 + (k-1)(y_1-2) = L_2 + (k-1)(y_2-2) \Leftrightarrow\)
          \(L_1 - L_2 = (k-1)(y_2-y_1)\)
          Para \(y_1 \neq y_2\) es \(L_1-L_2 \leq (k-2 - 0) = k-2 < (k-1)(y_2-y_1)\).
          Para \(y_1 = y_2\) es \(L_1 - L_2 = 0 \Leftrightarrow L_1 = L_2\) y
          \(\left( \left((m_1-1)(k-1)+x_1\right)-1+ \left( (m_1-2)(y_1-2) \right) \right) \% (k-1) =\)
          \(\left( \left((m_2-1)(k-1)+x_2\right)-1+ \left( (m_2-2)(y_2-2) \right) \right) \% (k-1) \Leftrightarrow\)
          \(x_1 = x_2 + (k-1)\cdot l\) en contradicción con \(m_1 = m_2\).
      • Caso 3a'': \(m_1 = \left\lfloor \frac{x_1-1}{k-1} \right\rfloor +1 \neq \left\lfloor \frac{x_2-1}{k-1} \right\rfloor +1 = m_2\)
        • Para \(y_1 = 1\) y \(y_2 = 1\) :
          \(f(x_1, y_1) = f(x_1, 1) = m_1\)
          \(f(x_2, y_2) = f(x_2, 1) = m_2 \neq m_1\)
        • Para \(y_1 = 1\) y \(y_2 \neq 1\) :
          \(f(x_1, y_1) = f(x_1, 1) = m_1 = \left\lfloor \frac{x_1-1}{k-1} \right\rfloor + 1 \leq \left\lfloor \frac{((k-1) \cdot k)-1}{k-1} \right\rfloor + 1 =\)
          \(\left\lfloor k - \frac{1}{k-1} \right\rfloor + 1 = (k - 1) + 1 = k\)
          \(f(x_2, y_2) = \left( \left((m_2-1)(k-1)+x_2\right)-1+ \left( (m_2-2)(y_2-2) \right) \right) \%\)
          \((k-1) + (k+1) + (k-1)(y_2-2) \geq\)
          \((k+1) + (k-1)(y_2-2) \geq (k+1) > k\)
        • Para \(y_1 \neq 1\) y \(y_2 = 1\) :
          Ver \(y_1 = 1\) y \(y_2 \neq 1\) .
        • Para \(y_1 \neq 1\) y \(y_2 \neq 1\) es:
          \(f(x_1, y_1) = \left( \left((m_1-1)(k-1)+x_1\right)-1+ \left( (m_1-2)(y_1-2) \right) \right) \%\)
          \((k-1) + (k+1) + (k-1)(y_1-2) = L_1 + (k+1) + (k-1)(y_1-2)\)
          \(f(x_2, y_2) = \left( \left((m_2-1)(k-1)+x_2\right)-1+ \left( (m_2-2)(y_2-2) \right) \right) \%\)
          \((k-1) + (k+1) + (k-1)(y_2-2) = L_2 + (k+1) + (k-1)(y_2-2)\)
          Entonces \(f(x_1, y_1) = f(x_2, y_2) \Leftrightarrow\)
          \(L_1 + (k+1) + (k-1)(y_1-2) = L_2 + (k+1) + (k-1)(y_2-2) \Leftrightarrow\)
          \(L_1 + (k-1)(y_1-2) = L_2 + (k-1)(y_2-2) \Leftrightarrow\)
          \(L_1 - L_2 = (k-1)(y_2-y_1)\)
          Para \(y_1 \neq y_2\) es \(L_1-L_2 \leq (k-2 - 0) = k-2 < (k-1)(y_2-y_1)\).
          Para \(y_1 = y_2\) es \(L_1 - L_2 = 0 \Leftrightarrow L_1 = L_2\) y
          \(\left( \left((m_1-1)(k-1)+x_1\right)-1+ \left( (m_1-2)(y_1-2) \right) \right) \% (k-1) =\)
          \(\left( \left((m_2-1)(k-1)+x_2\right)-1+ \left( (m_2-2)(y_2-2) \right) \right) \% (k-1) \Leftrightarrow\)
          \(y = \frac{(k-1)\cdot l + (3-k)(m_2 - m_1) + (x_1 - x_2)}{m_2 - m_1}\)
          Bueno ahí para \(2 \leq y \leq k\) siempre un \(l \in \mathbb{N}_0\), así que eso
          \(m_2 - m_1 \mid (k-1)\cdot l + (3-k)(m_2 - m_1) + (x_1 - x_2)\).
          Prueba: hay \((k-1)\) es primo, es (debido al lema de Bézout)
          \((k-1)\cdot l \equiv -\left( (3-k)(m_2-m_1) + (x_1-x_2) \right) \, \mod (m_2-m_1)\)
          solucionable, porque \(\text{ggT}\left((k-1),(m_2-m_1)\right) = 1\) Divisiones \(-\left( (3-k)(m_2-m_1) + (x_1-x_2) \right)\).
          Entonces esta es la unica solucion \(l_1\), porque para uno
          \(l_2 = l_1 + (m_2-m_1)\) es \( y_2 = y_1 + (k-1) > k\).

También puede encontrar información interesante sobre el tema del dobble y las matemáticas aquí o aquí . En el siguiente script, puede ver la fórmula previamente probada en acción: Dobbles (para \((k-1)\) prim) se puede generar con solo presionar un botón:

See the Pen DOBBLE CREATOR by David Vielhuber (@vielhuber) on CodePen.

Atrás