English Issue, December 2002
|Previous page||Contents||Next page||ORDER FORM|
Solution of the problems for information technology November 2001
I. 9. Binomial coefficients can be arranged in the usual Pascal's triangle as in the figure. Except for the outermost entries in each row, every number is the sum of its upper and upper-left neighbours.
Prepare your Excel sheet capable of displaying the first N+1 rows of Pascal's triangle in this arrangement. Let the value of N (1 \(\displaystyle \le\)N \(\displaystyle \le\)20) be entered in the 7th cell of the first row. The sheet should contain exactly N+1 rows in every case.
Solution. The solution is simple taking into account the well-known properties of the Pascal's triangle: any element is the sum of its upper neighbours. But our table is on a tilt now, so its upper and upper-left neighbours are to be summed.
The solution itself reads:
there is everywhere either 1's or nothing, corresponding to the N+1 rows to be displayed, that is depending on the number of the row.
The other cells will contain
since only those rows are to be printed here in which the number of the row is at most N+1 (the value of N is at
Filling of the table is also simple, because Excel automatically increases the row and column identifiers of the cells upon filling. One has to take care not to put anything into cells from the sixth one in the second row, otherwise the whole triangle will be incorrect: we can not carry out addition using only one character.
You can download the solution from http://www.komal.hu/verseny/2001-11/I.e.shtml.