\section*{Task 2 - 311012}

For a cuboid, the following are given: the volume \(24552 \mathrm{~cm}^{3}\), the surface area \(17454 \mathrm{~cm}^{2}\), and the length of one edge \(3 \mathrm{~cm}\). Inge and Rolf want to determine the lengths of the other edges.

Inge says that she found the solution using a quadratic equation and that the lengths sought, measured in cm, are integers.

Rolf replies that he cannot solve quadratic equations yet; but if the integer nature of the sought lengths is known, his BASIC skills are sufficient to solve the problem using a computer.

How could Inge have solved the problem, and how could Rolf have solved it?
}

a) If \(a, b\) are the measurements of the other edges in cm, then it follows that

\[
\begin{aligned}
3 \cdot a \cdot b & =24552 \\
2 \cdot(a b+3 a+3 b) & =17454 \\
\text { from (1) it follows } a b & =8184 \\
\text { from (2) it follows } \quad a b+3 a+3 b & =8727
\end{aligned}
\]

Subtracting (3) from this, we get \(3 a+3 b=543\), so \(a+b=181\)

From (4) it follows that \(b=181-a\); substituting this into (3) gives

\[
a \cdot(181-a)=8184 \quad ; \quad a-181 a+8184=0
\]

This quadratic equation has the solutions

\[
\begin{gathered}
a_{1 ; 2}=\frac{181}{2} \pm \sqrt{\frac{32761}{4}-8184}=\frac{181}{2} \pm \sqrt{\frac{25}{4}} \\
a_{1}=93 \quad ; \quad a_{2}=88
\end{gathered}
\]

According to (4), the corresponding values are \(b_{1}=88\) and \(b_{2}=93\).

We confirm that they satisfy (4) as well as (3), from which (1) and (2) also follow. Thus, the lengths of the other edges are \(88 \mathrm{~cm}\) and \(93 \mathrm{~cm}\).
b) Rolf could proceed as follows to set up a program:

We let \(a\) take the values \(1,2,3, \ldots\). For each \(a\), the computer should calculate the value of \(b\) from (1) and then check whether (2) is satisfied (and if so, output \(a\) and \(b\)).

The end of the process should be reached when no integer \(b\) can occur anymore. (Since \(b\) decreases as \(a\) increases (as evident from (1)), the process can certainly be terminated when \(b<1\). This will definitely be achieved (important!) because \(a\) not only increases but grows beyond any bound. An example of such a process is the program

```

10 A=0
20 A=A+1
30 B=24552/3/A
40 IF B<1 THEN END

```
![](https://cdn.mathpix.com/cropped/2024_06_06_b85a894aa8dbf722a7b3g-1591.jpg?height=48&width=911&top_left_y=770&top_left_x=230)
```

60 GOTO 20

```

Hint: To reduce computation time, one can calculate values that are frequently used in the process at the beginning and assign them to a variable.

Furthermore, the system (1), (2) can be replaced by the simpler (3), (4) (and use the fact that if \(a\) increases by 1, \(b\) decreases by 1). Most importantly, a more favorable termination condition can be chosen: It suffices to search for pairs with \(a \leq b\), which is equivalent to \(a \leq 90\) according to (4) (and also allows the use of the more convenient FOR-NEXT loop instead of the above lines 20, 40, 60). A more practical program is thus, for example,

```

10 P = 8184
20 B=181
30 FOR A=1 TO 90
40 B=B-1
50 IF A*B=P THEN PRINT A,B
60 NEXT A

```