### Archive

Posts Tagged ‘monotone convergence theorem’

## How to fold a paper into thirds, a real analysis perspective

Folding a paper into third is useful when you want to mail someone using an envelope. I search around the internet and there are so many ways to do this. So far, I didn’t see the method I am about to explain. I found this method by accident while I am teaching Real Analysis this semester. I am going to prove that this method actually works. Other methods that I found always use Geometry in the proof but I am going to use Real Analysis instead.

The procedure

Please have a look at the following figure.

The above figure is the first step of our method. Take a sheet of paper and let’s call the left side, side A and the right side, side B. First, you need to fold the paper side A as in the second image of the figure above. It doesn’t have to divide the paper equally, you can just fold it anywhere. Once you do that, you undo the fold and you will have a fold mark, which we call it $x_0$. Next, you need to fold again, but now you need to fold the right side (side B) along the fold mark $x_0$ as in the second row of the above figure. Now you will have two fold marks, the latter is called $y_0$. Now take a look at the following figure.

Now that we have two fold marks ($x_0$ and $y_0$), we need to fold side A along the fold mark $y_0$, as in the first row of the above figure. Undo the fold, you will have the third fold mark (we call it $x_1$). Next, we fold the side B until it touch the fold mark $x_1$ and we will have four fold marks, $x_0, x_1$ and $y_0, y_1$. Continue the step over and over again and at one stage, at the n-step, $x_n$ will be close to one third of the paper and $y_n$ will be very close to two third of the paper.

Simulation

Let’s take an example. Suppose in the beginning, let’s fold side A such that we divide the paper equally. Assume the length of a paper is 1. This means $x_0=0.5$. If we simulate this case, we will get the following table.

 n 1 2 3 4 5 $x_n$ 0.5 0.375 0.3475 0.3359375 0.333984375 $y_n$ 0.75 0.6875 0.671875 0.66796875 0.666992188 6 7 8 0.333496094 0.333374023 0.333343506 0.666748047 0.666687012 0.666671753

As we see, that it took approximately 4-8 steps until $x_n$ is closed to one third of a paper or $y_n$ is closed enough to two third of the paper. However, what happens if we choose different initial condition. We simulate this using a number of initial condition. Suppose we use an A4 paper which has length of 29.7 cm. We choose a number of different initial conditions. We can see the results in the following figures. The x-axis from the above figure is the initial condition and the y-axis is the number of iteration needed until it is closed enough to one third of paper. Since we use an A4 paper, the x-axis ranges from 0 to 29.7 cm.  The tolerance we use in the above figure is 1 mm. In conclusion, we only need to do only maximum four steps until the last fold mark is only 0.1 cm away from one third of the A4 paper.

We relax the tolerance in the above figure. We use 0.5 cm as the tolerance and the number of iterations is slightly improved. It can be seen that if our first trial is close enough to one third of A4 paper, we only need to do one step.

Mathematical proof

Finally, it comes to prove that this methods should work. mathematically not numerically. First of all, we need to mathematically model the above procedures. Let’s assume that the length of the paper we use is 1. Let’s use the same notation as used in the above procedures. Given $x_0$ we will get $y_0 = (1+x_0)/2$. Recursively, we could compute $x_n$ and $y_n$ as follow:

$x_n = y_{n-1}/2$ and $y_n=(1+x_n)/2$, as n=1,2, … .

Even though there are two sequences $(x_n)$ and $(y_n)$, we only need to consider $(x_n)$. We could simplify the sequence $(x_n)$ as follow.

$x_0$ is given and $x_n=y_{n-1}/2=((1+x_{n-1})/2)/2=(1+x_{n-1})/4$ for $n=1,2,\dots$.

Lemma 1
When $0 (as $1/3), the sequence $(x_n)$ is bounded above (bounded below).

Lemma 2
When $0 (as $1/3), the sequence $(x_n)$ is monotonically increasing (decreasing).

Theorem 3
Given $0, the sequence $(x_n)$ converges to 1/3.

Corollary 4
Given $0, the sequence $(y_n)$ converges to 2/3.

The proofs of the above results are given to my students as exercises.

This is the end of this note and the following is the code to produce the above figures.

```import math
import numpy as np
import pylab as plt

def f(x):
return (29.7+x)/2.0

def g(y):
return y/2.0

def number_of_iter(x,tol,max_iter):
iter = 0
er = abs(x-29.7/3)
if er <= tol: return 1
while er > tol and iter < max_iter:
iter = iter + 1
y = f(x)
x = g(y)
er = min(abs(29.7/3-x),abs(2*29.7/3-y))

return iter

#main code
x = np.arange(0,29.7,0.1)
y = []
tol = 0.5
max_iter = 100

for t in x:
result = number_of_iter(t,tol,max_iter)
y.append(result)

y = np.array(y)
ax = plt.gca()
ax.set_ylim([0,5])
plt.plot(x,y)
plt.show()
```