A Simple Linear Diophantine Equation That Encodes All ~~Trajectories~~ Cycles

We set M = 3, meaning we classify each value in the trajectory by its remainder modulo 3. This gives three residue classes: [0], [1], and [2].

There are six possible transitions, but we are only concerned with the following (we ignore seed values that are multiples of 3 in this analysis):

  • From [1] to [2] via (3n + 1)/2
  • From [1] to [2] via n/2
  • From [2] to [1] via n/2
  • From [2] to [2] via (3n + 1)/2

For example, we observe that any value in [1] will either increase by 3k + 1 or decrease by 3k + 2 (for some integer k) when moving to [2].

The full transition table is as follows:

[1] → [2] [1] → [2] [2] → [1] [2] → [2]
-2 +1 -1 +0
-5 +4 -4 +3
-8 +7 -7 +6

For any value of d in the rule (3n + d)/2 such that d is congruent to 1 modulo 6. the transition table below remains the same (shared across all cases with some offsets).

To construct a Diophantine equation that encodes all trajectories we use a simple trick.

For instance, summing values from the first column [1] → [2] can be expressed as:

S = -2x - 3y

For example, (-2) + (-8) + (-20) = -2(3) - 3(8) = -30.

The last column does not require a second variable, so we only need seven variables in total.

Thus, the full linear Diophantine equation (for d congruent to 1 modulo 6) becomes:

-2 x_1 - 3 x_2 + x_3 + 3 x_4 - x_5 - 3 x_6 + 3 x_7 = 0

With the following constraints:

  • When x1 = 0, x2 also equals 0
  • When x3 = 0, x4 also equals 0
  • When x5 = 0, x6 also equals 0

Since we end up with the exact same equation for each value of d that is congruent to 1 mod 6, each solution V can represent a trajectory in one of the systems (or worlds). However, there are some solutions that are phantoms and do not represent any trajectory.

Interesting … what solution corresponds to the trajectory starting at 31 and ending at 1?

1 Like

It’s been a while since I touched any of these equations, so I made a little mistake (forgot what the solutions represent :man_facepalming:)…
the solutions to this Diophantine equation represent only cycles, not full trajectories.
My bad..

But in the special case where d = 1 only, the equation reduces to

-2 x_1 - 3 x_2 + x_3 + 3 x_4 - x_5 - 3 x_6 + 3 x_7 = -N + 1

whose solutions represent any trajectory. Here, N denotes the starting value (seed).

Then the solution that corresponds to the trajectory starting at 31 and ending at 1
is V = (8, 796, 12, 492, 20, 2574, 2876):

-2*(8) - 3*(796.0) + (12) + 3*(492.0) - (20) - 3*(2574.0) + 3*(2876.0) = -30.0

A detailed derivation of the solution vector V can be found in this Python Fiddle:

https://python-fiddle.com/saved/ef1f0a43-683a-4aa3-ae65-3037d7eaa41c?run=true

I hope it clarifies how the solution was obtained. Please let me know if any part needs further explanation.

1 Like

Is this property known?

Maybe this is already known/obvious, but I just noticed it…

In a cycle

E: sum of all even numbers (no repetitions)

O: sum of all odd numbers (no repetitions)

t: number of odd steps

using

(3n + d) / 2 for the odd step

n / 2 for the even step

Then:

E - O = d.t

example:

d = 17; a_0 = 23

orbit(23, 17) :: [23, 43, 73, 118, 59, 97, 154, 77, 124, 62, 31, 55, 91, 145, 226, 113, 178, 89, 142, 71, 115, 181, 280, 140, 70, 35, 61, 100, 50, 25, 46, 23]

E = 1690; O = 1384; t = 18

E - O = 306 = 17 * 18 = d.t

Yes (and I think it is in one of mathkook’s paper for the case d=1).
It’s really simple to show: In a cycle, \sum\limits_t(\frac{3o+d}{2})+\sum\limits_{k-t}(\frac{e}{2})=\sum\limits_t o+\sum\limits_{k-t} e
with o the odd elements of the cycle, and e the even elements
You do the math and find out that d\cdot t+\sum o=\sum e

1 Like

I just found his website, and I had no idea he was a Professor of CS — or that he owned this forum. I only knew him from his YouTube channel and assumed he was just a regular member.

Much respect, Professor.

An attempt to better explain the linear Diophantine equation I shared