Bamba amaxoxo

Ixoxo ligxuma lizungeze ulayini wezinombolo bese uzama ukulibamba. Ukugxuma nokubamba njalo kuyashintshana. Ixoxo liqala endaweni \(s \in \mathbb{Z}\) futhi ngakho konke ukunyakaza ligxuma ibanga le- \(z \in \mathbb{Z}\) (uma \(z>0\) , ligxume ngakwesokudla, ngaphandle kwalokho uma kwesobunxele). \(z\) kuyefana kukho konke ukweqa. Ukuqhafaza kuqukethe ukucacisa indawo ephelele. Umuntu akazi \(z\) noma \(s\) . Sikhombisa ukuthi kunendlela yokuhlala ubamba isele.


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

Sikhetha manje 

$$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 onikeza (ncamashi) isiQalo senombolo sezinombolo eziphelele kuyo yonke inombolo yemvelo. Ukukhethwa kwalo msebenzi kungenxa yemisebenzi \(f(n) = (-1)^n \left \lfloor \frac{n}{2} \right \rfloor\) , the \(\mathbb{N}\) ku \(\mathbb{Z}\) kanye \(g(2^kr) = (k+1, \frac{r+1}{2})\) , okuyi- \(\mathbb{N}\) \(\mathbb{N}^2\) imephu nge-bijective, ekhuthazekile.

Manje sikhombisa ukukhonjiswa kwe- \(h\) ( \(h\) nakho kungukujova, kepha asiyidingi le ndawo).

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

$$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).$$

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

Isibonelo, uma kuyithuba lethu lokuthuthela ku- \(n = 88\) , sibala \(h(88)=(2,3)\) bese ukhetha \(2 + 88 \cdot 3 = 266\) njengesikhundla.

Ngemuva kokuthi ngqo \(m\) ihambisane \(x_m + m \cdot y_m = s + m \cdot z = a_m\) ukhetho luwela \(x_m + m \cdot y_m = s + m \cdot z = a_m\) .

Ngokungeziwe ku- \(h\) , eminye imisebenzi eminingi efana nomsebenzi wokubhangqa weCantor noma i- bijective spiral iyenzeka.

Nakhu ukuqaliswa okulula kuJavaScript:

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

Emuva