Octave Problems

From AIMSWiki

Table of contents

Circle

Suppose you draw a circle of radius R on a unit grid. Find N(R), the number of grid points enclosed in the circle. Since the area enclosed by each grid square is 1, the area of the enclosed squares is N(R) \times 1, which we expect to be roughly equal to πR2, the area of the circle.
As you increase R, does the difference
N(R)-\pi R^2 \rightarrow 0?
Does \frac{N(R)}{\pi R^2}\rightarrow 1?

Fun with π

  • Check that \sum_{n=1}^{\infty}\frac{1}{n^2} = \frac{\pi^2}{6}
  • We know that \sum_{n=1}^{\infty}\frac{1}{n^4} = \frac{\pi^4}{M}.
    Find M.
  • Check that \frac{2}{\pi}=\frac{2\cdot 2 \cdot 4 \cdot 4 \cdot 6 \cdot 6 \cdots}{1\cdot 3 \cdot 3 \cdot 5 \cdot 5\cdot 7 \cdots}

Lights

Suppose you have a string of five lights, all of which are on. If you flip the switch associated with a particular light, nothing happens to that light, but all of the other lights change state. For example, if your first action is to flip the switch associated with the first light, then the second, third, fourth, and fifth lights will turn off, but the first light will stay on. Now, if you choose to flip the second switch, the third, fourth, and fifth lights will go on, but the first light will go off. Can you turn all the lights off? If so, how? Is it possible to start with ten lights and switch them all off? One hundred?