Skip to main content
edited tags
Link
added 742 characters in body
Source Link

matrix from (1,1) to (3,3)$$\mathfrak{U} = \left(\begin{matrix} x_{11} & x_{12} & x_{13} \\ x_{21} & x_{22} & x_{23} \\ x_{31} & x_{32} & x_{33} \end{matrix}\right)$$

f(A) = (x_11 + x_12 + x_13) ⋅ (x_21 + x_22 + x_23) ⋅ (x_31 + x_32 + x_33)$$\begin{align} f(\mathfrak{U}) & = \left(\begin{matrix} \underbrace{(x_{11} + x_{12} + x_{13})}_\cdot \\ \overbrace{\underbrace{(x_{21} + x_{22} + x_{23})}}_\cdot \\ \overbrace{(x_{31} + x_{32} + x_{33})} \\ \end{matrix}\right) \\ & = (x_{11} + x_{12} + x_{13}) \cdot (x_{21} + x_{22} + x_{23}) \cdot (x_{31} + x_{32} + x_{33}) \end{align}$$

Example with the maximum 3×3 grid highlighted$$\begin{matrix} 40 & 30 & 42 & 22 & 74 \\ 294 & 97 & \color{red} {35} & \color{red}{272} & \color{red}{167} \\ 52 & 8 & \color{red}{163} & \color{red}{270} & \color{red}{242} \\ 247 & 130 & \color{red}{216} & \color{red} {68} & \color{red}{266} \\ 283 & 245 & 164 & 53 & 148 \\ \end{matrix}$$

The part highlighted in red is the part where the value of the function f(A)\$f(\mathfrak{U})\$ is largest for the entire grid:

(35 + 272 + 167) ⋅ (163 + 270 + 242) ⋅ (216 + 68 + 266) = 175972500\$(35 + 272 + 167) ⋅ (163 + 270 + 242) ⋅ (216 + 68 + 266) = 175972500\$

Output is the result of the function f(A)\$f(\mathfrak{U})\$ for the 3×3 sub-grid that gives the largest result. In above example this would have been 175972500\$175972500\$.

matrix from (1,1) to (3,3)

f(A) = (x_11 + x_12 + x_13) ⋅ (x_21 + x_22 + x_23) ⋅ (x_31 + x_32 + x_33)

Example with the maximum 3×3 grid highlighted

The part highlighted in red is the part where the value of the function f(A) is largest for the entire grid:

(35 + 272 + 167) ⋅ (163 + 270 + 242) ⋅ (216 + 68 + 266) = 175972500

Output is the result of the function f(A) for the 3×3 sub-grid that gives the largest result. In above example this would have been 175972500.

$$\mathfrak{U} = \left(\begin{matrix} x_{11} & x_{12} & x_{13} \\ x_{21} & x_{22} & x_{23} \\ x_{31} & x_{32} & x_{33} \end{matrix}\right)$$

$$\begin{align} f(\mathfrak{U}) & = \left(\begin{matrix} \underbrace{(x_{11} + x_{12} + x_{13})}_\cdot \\ \overbrace{\underbrace{(x_{21} + x_{22} + x_{23})}}_\cdot \\ \overbrace{(x_{31} + x_{32} + x_{33})} \\ \end{matrix}\right) \\ & = (x_{11} + x_{12} + x_{13}) \cdot (x_{21} + x_{22} + x_{23}) \cdot (x_{31} + x_{32} + x_{33}) \end{align}$$

$$\begin{matrix} 40 & 30 & 42 & 22 & 74 \\ 294 & 97 & \color{red} {35} & \color{red}{272} & \color{red}{167} \\ 52 & 8 & \color{red}{163} & \color{red}{270} & \color{red}{242} \\ 247 & 130 & \color{red}{216} & \color{red} {68} & \color{red}{266} \\ 283 & 245 & 164 & 53 & 148 \\ \end{matrix}$$

The part highlighted in red is the part where the value of the function \$f(\mathfrak{U})\$ is largest for the entire grid:

\$(35 + 272 + 167) ⋅ (163 + 270 + 242) ⋅ (216 + 68 + 266) = 175972500\$

Output is the result of the function \$f(\mathfrak{U})\$ for the 3×3 sub-grid that gives the largest result. In above example this would have been \$175972500\$.

images fixed (inlining HTTP images doesn't work anymore); for more info, see https://gist.github.com/Glorfindel83/9d954d34385d2ac2597bbe864466259f
Source Link
Riker
  • 7.9k
  • 4
  • 39
  • 73

enter image description herematrix from (1,1) to (3,3)

enter image description here

matrix from (1,1) to (3,3)

images fixed (inlining HTTP images doesn't work anymore); for more info, see https://gist.github.com/Glorfindel83/9d954d34385d2ac2597bbe864466259f
Source Link
Loading
replaced http://codegolf.stackexchange.com/ with https://codegolf.stackexchange.com/
Source Link
Loading
edited tags
Link
Loading
added 189 characters in body
Source Link
Joey
  • 13.2k
  • 2
  • 43
  • 73
Loading
added another sample; added 31 characters in body
Source Link
Joey
  • 13.2k
  • 2
  • 43
  • 73
Loading
images instead of crude ASCII formulas
Source Link
Joey
  • 13.2k
  • 2
  • 43
  • 73
Loading
Tweeted twitter.com/#!/StackCodeGolf/status/40650447748341760
edited title
Link
Joey
  • 13.2k
  • 2
  • 43
  • 73
Loading
added 60 characters in body
Source Link
Joey
  • 13.2k
  • 2
  • 43
  • 73
Loading
added 1181 characters in body
Source Link
Joey
  • 13.2k
  • 2
  • 43
  • 73
Loading
Source Link
Joey
  • 13.2k
  • 2
  • 43
  • 73
Loading