# Bamba amasele0518

Isele liyaxhuma lijikeleze umgca-manani uze uzame ukulibamba. Ukutsiba kunye nokubamba kuhlala kuyenye into. Isele liqala kwindawo $$s \in \mathbb{Z}$$ kwaye ngalo lonke ixesha lihamba litsiba umgama $$z \in \mathbb{Z}$$ (ukuba $$z>0$$ , liyaxhuma Ekunene, kungenjalo ukuba ngasekhohlo). $$z$$ iyafana kuwo wonke umtsi. Ukuqhawula kuqulathe imeko yenani elipheleleyo. Umntu akazi nokuba $$z$$ okanye $$s$$ . Sibonisa ukuba ikhona indlela yokusoloko ubamba isele.

Okokuqala, $$a_1 = s$$ kunye $$a_{n+1} = a_n + z = s + n \cdot z$$ nge $$s,z \in \mathbb{Z}$$ .

Sikhetha ngoku

$$h:\mathbb{N} \to \mathbb{Z}^2: h(2^k r) = \left ( (-1)^{k+1} \left \lfloor \frac{k+1}{2} \right \rfloor, (-1)^{\frac{r+1}{2}} \left \lfloor \frac{r+1}{4} \right \rfloor \right )$$

Njengomsebenzi onikezela (ngokuchanekileyo) inani lesiQinisekiso samanani apheleleyo kuwo onke amanani endalo. Ukukhetha lo msebenzi kungenxa yemisebenzi $$f(n) = (-1)^n \left \lfloor \frac{n}{2} \right \rfloor$$ , the $$\mathbb{N}$$ kwi $$\mathbb{Z}$$ kunye $$g(2^kr) = (k+1, \frac{r+1}{2})$$ , yona $$\mathbb{N}$$ kwi $$\mathbb{N}^2$$ imephu ngokubonakalayo, ekhuthazekileyo.

Ngoku sibonisa u-surctivity we- $$h$$ ( $$h$$ nayo inaliti, kodwa asiyidingi le propati).

Vumela $$(x,y) = (2^{k_1} r_1, 2^{k_2} r_2) \in\mathbb{Z}^2$$ . Kodwa emva koko

$$h \left ( 2^{2 \cdot 2^{k_1} r_1 - 1} \cdot (4 \cdot 2^{k_2} r_2 - 1) \right ) = (2^{k_1} r_1, 2^{k_2} r_2) = (x,y).$$

Ngenxa yoko: $$\forall (s,z) \in \mathbb{Z}^2 \, \exists \, m \in \mathbb{N}$$ nge $$h(m) = (x_m,y_m) = (s, z)$$ .

Umzekelo, ukuba lithuba lethu $$n = 88$$ , sibala $$h(88)=(2,3)$$ kwaye ukhethe $$2 + 88 \cdot 3 = 266$$ njengesikhundla.

Ke emva ngqo $$m$$ kushukuma nge $$x_m + m \cdot y_m = s + m \cdot z = a_m$$ ukhetho luwela kwixoxo.

Ukongeza kwi $$h$$ , mininzi eminye imisebenzi enje ngomsebenzi wokumatanisa kaCantor okanye isiphumo esibi esinokubakho.

Nalu ulwenziwo olulula kwiJavaScript:

See the Pen catch the frog by David Vielhuber (@vielhuber) on CodePen.

Emva