Join the growing community of curious minds on IDNLearn.com. Find reliable solutions to your questions quickly and easily with help from our experienced experts.

Complete the following magic squares by replacing the asterisks with numbers so that the sums of the rows, columns, and diagonals are always equal.

\begin{tabular}{|l|c|l|l|}
\hline
9 & [tex]$\ \textless \ em\ \textgreater \ $[/tex] & 8 & 14 \\
\hline
8 & 7 & [tex]$\ \textless \ /em\ \textgreater \ $[/tex] & 4 \\
\hline
7 & [tex]$\ \textless \ em\ \textgreater \ $[/tex] & 12 & [tex]$\ \textless \ /em\ \textgreater \ $[/tex] \\
\hline
13 & [tex]$\ \textless \ em\ \textgreater \ $[/tex] & [tex]$\ \textless \ /em\ \textgreater \ $[/tex] & 9 \\
\hline
\end{tabular}

\begin{tabular}{|l|l|l|c|}
\hline
9 & [tex]$\ \textless \ em\ \textgreater \ $[/tex] & 14 & [tex]$\ \textless \ /em\ \textgreater \ $[/tex] \\
\hline
14 & 15 & [tex]$\ \textless \ em\ \textgreater \ $[/tex] & [tex]$\ \textless \ /em\ \textgreater \ $[/tex] \\
\hline
7 & 21 & 10 & [tex]$\ \textless \ em\ \textgreater \ $[/tex] \\
\hline
[tex]$\ \textless \ /em\ \textgreater \ $[/tex] & 15 & [tex]$\ \textless \ em\ \textgreater \ $[/tex] & 8 \\
\hline
\end{tabular}

\begin{tabular}{|r|l|l|r|}
\hline
7 & 18 & 9 & 7 \\
\hline
9 & [tex]$\ \textless \ /em\ \textgreater \ $[/tex] & 23 & [tex]$\ \textless \ em\ \textgreater \ $[/tex] \\
\hline
[tex]$\ \textless \ /em\ \textgreater \ $[/tex] & 7 & 9 & [tex]$\ \textless \ em\ \textgreater \ $[/tex] \\
\hline
[tex]$\ \textless \ /em\ \textgreater \ $[/tex] & 15 & 2 & [tex]$*$[/tex] \\
\hline
\end{tabular}


Sagot :

Para resolver el problema de los cuadros mágicos, debemos encontrar los valores que hacen que la suma de las filas, columnas y diagonales sea la misma para cada cuadro. Procederemos con cada cuadro uno por uno, estableciendo primero una constante [tex]\( M \)[/tex] (la suma mágica) para cada cuadro, y luego resolviendo las ecuaciones necesarias.

### Primer Cuadro Mágico
[tex]\[ \begin{array}{|c|c|c|c|} \hline 9 & * & 8 & 14 \\ \hline 8 & 7 & * & 4 \\ \hline 7 & & 12 & \\ \hline 13 & & & 9 \\ \hline \end{array} \][/tex]

Llama a los asteriscos [tex]\( x_1, x_2, x_3, x_4, x_5, x_6, x_7 \)[/tex] de la siguiente manera:
[tex]\[ \begin{array}{|c|c|c|c|} \hline 9 & x_1 & 8 & 14 \\ \hline 8 & 7 & x_2 & 4 \\ \hline 7 & x_3 & 12 & x_4 \\ \hline 13 & x_5 & x_6 & 9 \\ \hline \end{array} \][/tex]

Sabemos que:
1. [tex]\(9 + x_1 + 8 + 14 = M\)[/tex]
2. [tex]\(8 + 7 + x_2 + 4 = M\)[/tex]
3. [tex]\(7 + x_3 + 12 + x_4 = M\)[/tex]
4. [tex]\(13 + x_5 + x_6 + 9 = M\)[/tex]

Por las columnas:
5. [tex]\(9 + 8 + 7 + 13 = M\)[/tex]
6. [tex]\(x_1 + 7 + x_3 + x_5 = M\)[/tex]
7. [tex]\(8 + x_2 + 12 + x_6 = M\)[/tex]
8. [tex]\(14 + 4 + x_4 + 9 = M\)[/tex]

Por las diagonales:
9. [tex]\(9 + 7 + 12 + 9 = M\)[/tex]
10. [tex]\(14 + x_2 + x_3 + 13 = M\)[/tex]

Calcula [tex]\( M \)[/tex] de la suma de la columna 1:
[tex]\[ M = 9 + 8 + 7 + 13 = 37 \][/tex]

Usamos este valor [tex]\( M \)[/tex] para encontrar los valores restantes.
De [tex]\( 9 + x_1 + 8 + 14 = 37 \)[/tex]:
[tex]\[ 31 + x_1 = 37 \Rightarrow x_1 = 6 \][/tex]
De [tex]\( 8 + 7 + x_2 + 4 = 37 \)[/tex]:
[tex]\[ 19 + x_2 = 37 \Rightarrow x_2 = 18 \][/tex]
De [tex]\( 7 + x_3 + 12 + x_4 = 37 \)[/tex]:
[tex]\[ 19 + x_3 + x_4 = 37 \Rightarrow x_3 + x_4 = 18 \][/tex]
De [tex]\( 13 + x_5 + x_6 + 9 = 37 \)[/tex]:
[tex]\[ 22 + x_5 + x_6 = 37 \Rightarrow x_5 + x_6 = 15 \][/tex]
De [tex]\( x_1 + 7 + x_3 + x_5 = 37 \)[/tex]:
[tex]\[ 6 + 7 + x_3 + x_5 = 37 \Rightarrow x_3 + x_5 = 24 \][/tex]
De [tex]\( 8 + x_2 + 12 + x_6 = 37 \)[/tex]:
[tex]\[ 8 + 18 + 12 + x_6 = 37 \Rightarrow 38 + x_6 = 37 \Rightarrow x_6 = -1 \][/tex] (error porque no hay solución, revisar valores).

### Segundo Cuadro Mágico
[tex]\[ \begin{array}{|c|c|c|c|} \hline 9 & & 14 & \\ \hline 14 & 15 & & \\ \hline 7 & 21 & 10 & * \\ \hline & 15 & & 8 \\ \hline \end{array} \][/tex]

Del primer cuadro:
[tex]\[ M = 14+21+10+8 = 53 \][/tex]

[tex]\[ \begin{array}{|c|c|c|c|} \hline 9 & x_1 & 14 & x_2 \\ \hline 14 & 15 & x_3 & x_4 \\ \hline 7 & 21 & 10 & x_5 \\ \hline x_6 & 15 & x_7 & 8 \\ \hline \end{array} \][/tex]

Suma de filas, columnas y diagonales debe ser igual a M.

Si M= 53
Fila 1: 9 + x_1 + 14 + x_2 = 9 + x_1 + 14 + x_2 = 53
Fila 2: 14 + 15 + x_3 + x_4 = 14 + 15 + x_3 + x_4 = 53
Fila 3: 7 + 21 + 10 + x_5 = 7 + 21 + 10 + x_5 = 53
Fila 4: x_6 + 15 + x_7 + 8 = x_6 + 15 + x_7 + 8 = 53

Columna 1:9 + 14 + 7 + x_6 = 9 + 14 + 7 + x_6 = 53
Columna 2: x_1 + 15 + 21 + 15 = x_1 + 15 + 21 + 15 = 53
Columna 3: 14 + x_3 + 10 + x_7 = 14 + x_3 + 10 + x_7 = 53
Columna 4: x_2 + x_4 + x_5 + 8 = x_2 + x_4 + x_5 + 8 = 53

### Tercer Cuadro Mágico
[tex]\[ \begin{array}{|r|l|l|r|} \hline 7 & 18 & 9 & 7 \\ \hline 9 & & 23 & \\ \hline & 7 & 9 & \\ \hline & 15 & 2 & \\ \hline \end{array} \][/tex]

Suma de filas, columnas y diagonales debe ser igual a M. Similar con el Primero.

### Resolveremos los anteriores en Python.
```
Your presence in our community is highly appreciated. Keep sharing your insights and solutions. Together, we can build a rich and valuable knowledge resource for everyone. Find clear answers at IDNLearn.com. Thanks for stopping by, and come back for more reliable solutions.