Welcome to Fractal Forums

Fractal Software => Fragmentarium => Topic started by: kram1032 on January 15, 2017, 04:25:14 PM




Title: a multiplication table based on walking along a triangle
Post by: kram1032 on January 15, 2017, 04:25:14 PM
So I finally took the time to understand how the icosian calculus (https://en.wikipedia.org/wiki/Icosian_calculus) works.
It turns out that it's actually quite simple, geometrically (in the linked article it tells you what to do, given a flat graph of a dodecahedron, also pictured in the image), but it results in a 60-dimensional space (2 dimensions per edge of a dodecahedron) if you reinterpret it as some sort of "Icosian number". - However, this same process should work for any flat graph where each vertex has the same number of outgoing edges.
So I picked one of the simplest ones: I constructed the equivalent idea for a triangle. This results in a 6-dimensional space (2 dimensions per edge) which might be doable.

It works like this:
  • picture a triangle. Pick one edge and draw an arrow along it. (The choice is arbitrary due to symmetry)
  • Our first base-move is called i. It flips the direction of the arrow. It sort of acts like a -1.
  • Our second base-move is called k. For it you fix the tip of the arrow and rotate it along to the next edge, counterclockwise.
Note that, for the triangle, the direction of the rotation for the k-move doesn't actually matter. But if you were to try this same construction for more complicated graphs where each vertex has more than two edges coming out of it, it would.

For the triangle, both of our moves are self-inverse: i^2 = k^2 = 1 - the k-move actually obeys k^e=1 where e is the number of edges going out of a vertex.

You can now chain these moves together at will until you get all the positions on the triangle. If you do that, you'll end up with 6 different states, including the one you started at which is just called 1:

\begin{pmatrix}1 & i & k & ik & iki \end{pmatrix}

All longer moves can be reduced to these. From that we get the following multiplication table:

1
i
k
ki
ik
iki
i
1
ik
iki
k
ki
k
ki
1
i
iki
ik
ki
k
iki
ik
1
i
ik
iki
i
1
ki
k
iki
ik
ki
k
i
1

Note also, that kik = iki and (ik)^3=(ki)^3=kiik=ikki = 1

There are 15 standard 2D slices and 20 3D slices to check out. - Though presumably, as always, there will be a lot of symmetry between different slices.
Furthermore, due to this coming from the directed edges of a triangle, I'd also check a different 3D slice you get from looking at:
  • a = (1)-(i)
  • b = (ik)-(k)
  • c = (ki)-(iki)
since those sort of act as positive and negative direction of each other. (You will see why if you check graphically.)

Finally, for your convenience, here is the default Mandelbrot iteration formula:
u = u² + v² + w² + z² + 2xy + u0
v = 2uv + v(y+z) + x(w+z) + v0
w = 2uw + x(u+z) + y(v+z) + w0
x = y² + 2ux + vw + wz + zv + x0
y = x² + 2uy + vw + wz + zv + y0
z = 2uz + (v+w)(x+y) + z0

I assume any of the directions together with either x or y will always look the same, as well as any of the directions together with v or w. Directions u and z might be more unique. So the most interesting slices probably are ones containing u and z and either x/y or v/w.
Meanwhile, I also proposed a couple extra slices which then end up being:
a = u - v
b = y - w
c = x - z
which probably will also look interesting.

Since the original work is called "icosian calculus" (from icosahedron), I think the mulitplication table above should be called the "triangular calculus" and the corresponding number system would be the "triangular numbers"

Edit:
(http://i.imgur.com/Puuwbfa.png)
This is how it looks like, applied to a triangle.


Title: Re: a multiplication table based on walking along a triangle
Post by: Tglad on January 15, 2017, 07:53:50 PM
It reminds me a lot of (though not the same as) Timothy golden's polysign numbers http://www.von-eitzen.de/math/PolysignNumbers.pdf. Basically i and k we're the 2 directions along the triangle. He discovered that for 2 dimensions his algebra was equivalent to complex numbers. For 3D he drew a Mandelbrot set but I think it turned out to be just a sheared 2D Mandelbrot prism.


Title: Re: a multiplication table based on walking along a triangle
Post by: DarkBeam on January 15, 2017, 10:02:21 PM
Ermmm
All I want is a pretty pic plz :dink:


Title: Re: a multiplication table based on walking along a triangle
Post by: kram1032 on January 15, 2017, 10:34:56 PM
I just did the math and don't have software ready that could generate 3D slices from 6D formulae. I was hoping somebody else would give it a go :)
My initial goal was to write down the 60D formulae for icosian calculus, but that was before I understood what I was getting myself into ;D
By the way, something equivalent to this should be possible for any polygon and any platonic solid. Though the dimension of the algebra is twice the number of edges of the shape, so it quickly becomes somewhat intractable to write down the corresponding rules. Tetrahedral rules are 12D already, for instance.
It's also technically possible to try this for regular euclidean or hyperbolic grids, but that would give rise to infinitely many edges, so unless something clever is done it'll probably remain a mere theoretical possibility.

I suppose it's similar to Polysigns in that there sort of are multiple directions present. However, the rules from which this arises are completely different. And also, say, i isn't literally -1, i.e. 1+i\neq 0 - it's just that i flips arrows in the diagram I inserted in my first post.


Title: Re: a multiplication table based on walking along a triangle
Post by: kram1032 on January 15, 2017, 11:35:09 PM
There is a 3D subgroup which may also be interesting. Not sure. It corresponds to only going along the triangle in the "positive" direction (1, ik, ki). Interestingly there doesn't seem to be such a subgroup for the "negative" direction: "negative" values (i, k, iki) become positive ones if you multiply them. - This is equivalent to "minus times minus is plus".
The multiplication table for this subgroup is:
1
ik
ki
ik
ki
1
ki
1
ik

It's what you get when you introduce a constant j^3=1. Then either ik or ki take the role of j, while the other one will be j^2. This, I think I remember, already was tried, and wasn't particularly exciting.

The corresponding formula is:

x = x² + 2yz + x0
y = z² + 2xy + y0
z = y² + 2xz + z0

It should be symmetric in y and z, so for the most part it should suffice to check just a 2D slice with x and either y or z.

And of course there also is a 2D subgroup that corresponds to switching between "positive" and "negative" directions:

1
i
i
1

It's simply our bog standard split-complex numbers.

x = x² + y² + x0
y = 2 x y + y0

It exists twice more for (1, k) and (1, iki), since i^2=k^2=(iki)^2=1



Title: Re: a multiplication table based on walking along a triangle
Post by: DarkBeam on January 15, 2017, 11:54:12 PM
Code:
Finally, for your convenience, here is the default Mandelbrot iteration formula:
u = u² + v² + w² + z² + 2xy + u0
v = 2uv + v(y+z) + x(w+z) + v0
w = 2uw + x(u+z) + y(v+z) + w0
x = y² + 2ux + vw + wz + zv + x0
y = x² + 2uy + vw + wz + zv + y0
z = 2uz + (v+w)(x+y) + z0
My experience is that you should swap;
X/u Y/v Z/w
For a more classic brot because all quats contain squared terms into x... :)
Also Mb supports only 4d so it might be hard to port it.


Title: Re: a multiplication table based on walking along a triangle
Post by: kram1032 on January 16, 2017, 12:00:30 AM
Are you saying I should use different variable names? Well those should matter little, right? Just pick what ever your software of choice prefers :) And swapping them around arbitrarily should work just fine too. All that does, after all, is mirror the resulting set in the corresponding way.


Title: Re: a multiplication table based on walking along a triangle
Post by: claude on January 16, 2017, 03:50:07 PM
This group is isomorphic to S3 it seems:
https://groupprops.subwiki.org/wiki/Groups_of_order_6

I tried implementing it in Fragmentarium but just got a blank screen, maybe someone can see what I'm doing wrong and fix it?


Title: Re: a multiplication table based on walking along a triangle
Post by: kram1032 on January 17, 2017, 11:30:22 AM
I now have three more tables that are only four dimensional and based on shapes with only two edges, namely the digon (https://en.wikipedia.org/wiki/Digon) and a shape you get by opening up this shape on one side, where you get two variants (is the 1-state initially facing to the vertex or to an open end?), although I think that the two corresponding tables are probably technically the same, as in they would likely result in the same picture.
Regardless, since 6D seems to pose a challenge right now, perhaps try these 4D ones instead.

Digon (this may just be equivalent to Split-Complex Quaternions?)

1ikik
i1ikk
kik1i
ikki1

Two Edges Infacing

1ikik
i1ikk
ki1ik
ik1ik

Two Edges Outfacing (might give same result as infacing)

1ikiiki
i1ikiki
ki1ikii
ikiiki1


Title: Re: a multiplication table based on walking along a triangle
Post by: DarkBeam on February 05, 2017, 06:19:43 PM
Mark if possible provide a textual formula for squaring, I don't understand much about those tables :beer:


Title: Re: a multiplication table based on walking along a triangle
Post by: kram1032 on February 06, 2017, 02:24:32 PM
Why was this moved? This thread is program-agnostic. Oh well...

DarkBeam you mean the two-edged variants?

I'll give you the formulae but I'd urge you to learn to read the multiplication tables too: They are super useful, pretty straight forward and nicely compact. I'll try to explain them to you first.

Let's start with the simplest possible multiplication table:

1

To read it, you go "first of row times head of column equals entry".
Let's read the first row. Its leftmost entry is 1. So we know it's 1 \times.
Next, read the head of the column. It's another 1. So we know it's 1 \times 1 =.
Finally, the point where they meet is another 1. So we now know that, in this system, 1 \times 1 = 1. How exciting!

Ok that was, perhaps, overly simple. Let's try a 2D table, say, for the complex numbers:

1i
i-1

The very first entry is the same as before. It follows the exact same process as above. 1 \times 1 = 1.
Next, what about the second row first column?
Left most: i
Head: 1
Meet: i
i \times 1 = i
Now let's check the first row second column:
Left: 1
Head: i
Meet i
1 \times i = i
A multiplication table that's symmetric along its primary axis, like this one, is commutative.

Finally: Row 2 Column 2:
Left: i
Head: i
Meet: -1
i \times i = -1

If you want to read off the actual product of two arbitrary numbers given a multiplication table, you can also "quickread" it: Go through it from top to bottom (or from left to right either will do, just don't confuse your multiplication order: left side times top side!) for each of your unique elements. you can quickly collect all the terms right away. For instance, and please try following along, then it should be clear, let's take the table I termed Digon:

Find all 1s:
1*1 (from row 1 column 1)
i*i (row 2 column 2)
k*k (row 3 col 3)
ik*ik (r 4 c 4)

so if you call your number, say, a = a1 + ai i + ak k + aik ik and b = b1 + bi i + bk k + bik ik, we just found that the first result is:
c1 = a1 b1 + ai bi + ak bk + aik bik

Next, all the is:
1*i (1 2)
i*1
k*ik
ik*k
thus
ci = a1 bi + ai b1 + ak bik + aik bk

Next, all the ks:
1*k
i*ik
k*1
ik*i
ck = a1 bk + ai bik + ak b1 + aik bi

and finally, all  iks:
1*ik
i*k
k*i
ik*1
cik = a1 bik + ai bk + ak bi + aik b1

in summary:
c = (a1 b1 + ai bi + ak bk + aik bik) * 1 + (a1 bi + ai b1 + ak bik + aik bk) * i + (a1 bk + ai bik + ak b1 + aik bi) * k + (a1 bik + ai bk + ak bi + aik b1) * ik

Since this happens to be commutative (the multiplication table is symmetric along the major axis), this simplifies quite nicely in the case where a = b:
a² = (a1² + ai² + ak² + aik²) * 1 + 2 * (a1 a1 + ak aik) * i + 2 * (a1 ak + ai aik) * k + 2 * (a1 aik + ai ak)

I suspect this to look rather boring. It's probably, as said before, just the split-complex quaternions? Although I can't recall whether those would commute as this does.

The other two tables, at any rate, do not commute, so something different must go on there.

So next,  "Two Edges Infacing". - By the way, the labels I chose are, of course, arbitrary for the resulting multiplication table. They did come from what operations are possible at any given moment on a pair of edges connected at one end though. That's why "Two Edges Outfacing" doesn't have k on its own but it DOES have iki.
Anyway, here we go:
1:
1 1
i i
k k
ik k
c1 = a1 b1 + ai bi + ak bk + aik bk

i:
1 i
i 1
k i
ik k
ci = a1 bi + ai b1 + ak bi + aik bk

k:
1 k
i ik
k 1
ik ik
ck = a1 bk + ai bik + ak b1 + aik bik

ik:
1 ik
i k
k ik
ik 1
cik = a1 bik + ai bk + ak bik + aik b1

c = a1 b1 + ai bi + ak bk + aik bk + i (a1 bi + ai b1 + ak bi + aik bk) + k (a1 bk + ai bik + ak b1 + aik bik) + ik (a1 bik + ai bk + ak bik + aik b1)
c = a1 b1 + ai bi + (ak + aik) bk + i (ai b1 + (a1 + ak) bi + aik bk) + k (a1 bk + ak b1 + (ai +aik) bik) + ik (ai bk + (a1 + ak) bik + aik b1)
if a = b:
a² = a1² + ai² + ak² + (aik + ak) ak + i (2 a1 ai + (ai + aik) ak) + k (2 a1 ak + (ai + aik) aik) + ik (2 a1 aik + (ai + aik) ak)

and finally, outfacing:
1:
1 1
i i
ki i
iki iki

i:
1 i
i 1
ki iki
iki i

ki:
1 ki
i iki
ki 1
iki ki

iki:
1 iki
i ki
ki ki
iki 1

c = a1 b1 +ai bi + aki bi + aiki biki + i (a1 bi + ai b1 + aki biki + aiki bi) + ki (ai biki + aki b1 + (a1 + aiki) bki) + iki (a1 biki + (ai + aki) bki + aiki b1)
if a = b:
a² = a1² + ai² + (ai + aiki) aiki + i (2 a1 ai + (ai + aiki) aiki) + ki (2 a1 aki + (ai + aki) aiki) + iki (2 a1 aiki + (ai + aki) aki)

I hope that helps


Title: Re: a multiplication table based on walking along a triangle
Post by: DarkBeam on February 06, 2017, 06:21:37 PM
The resulting images look like an egg, not worth posting, sorry. :sad1:


Title: Re: a multiplication table based on walking along a triangle
Post by: SamTiba on February 06, 2017, 09:28:22 PM
Oh oh i want to see them! :D


Title: Re: a multiplication table based on walking along a triangle
Post by: kram1032 on February 07, 2017, 05:18:17 PM
so just completely smooth? No detail at all? I didn't expect them to be particularly interesting but to just not show any special detail at all seems hard to believe...
Did you check all the cuts? (It's unlikely that you were "lucky" and got the ONE cut that is entirely devoid of interesting structure but it's worth a try)


Title: Re: a multiplication table based on walking along a triangle
Post by: DarkBeam on February 07, 2017, 05:44:54 PM
I suspect that there is a sort of error going on in the formulas.
a² = a1² + ai² + ak² + (aik + ak) ak + i (2 a1 ai + (ai + aik) ak) + k (2 a1 ak + (ai + aik) aik) + ik (2 a1 aik + (ai + aik) ak)
Why all terms are positive? No formulas in the  database have all terms positive. :( Also I suspect (ai + aik) repeated in three terms does not look fine. :( Normally there is a sort of cycling.
Also I made an exception for you normally I just ignore formulas without preview images because they (very) often look bad in images. Sorry if I sound rude


Title: Re: a multiplication table based on walking along a triangle
Post by: kram1032 on February 08, 2017, 03:01:57 AM
I understand if you are discouraged by these results and rather don't want to spend your time exploring these further. That's fine.
Nevertheless, let me try to address your concerns about the particular form these formulas take.

The all-positive nature of these is correct. It's a consequence of how these tables arise. It's more of an extension of split-complex numbers than complex ones:

(a1 + aj j)(b1 + bj j) = a1 b1 + aj bj + j (a1 bj + aj b1) - this, to my knowledge, doesn't give a circle or egg, but rather, which of course is also boring, a square. Its Buddhabrot take looks somewhat interesting though. - all the orbits are along 45° angles of the axis but the densities vary in non-trivial ways.
I didn't expect super high detail interesting results from these but simply an "egg", and for all three of these no less, is surprising to me.

I'm not entirely sure if there is an obvious natural way to introduce negatives. I mean you could just randomly flip signs and define i² = -1 and/or k² = -1 or something but then the geometric meaning would be lost.
As for the lack of "cycling", I'm not quite sure what you mean by that, but the two that correspond to an edge pair that's open on one end certainly have a degeneracy to them:
The k-move turns this:
Code:
--.<-
into this:
Code:
->.--
and vice-versa, but if it's pointing outside:
Code:
<-.--
it will go around all the way and end up in the same position so then k does nothing.
The i-move, meanwhile, always works:
Code:
<-.--
turns into this:
Code:
->.--
and after that you can use the k-move as above.
Since k sometimes changes things and sometimes does not, that results in the degeneracies evident in the multiplication table / formula.
This is also why "Edges outfacing", i.e. calling either one of the following the "1-position",
Code:
<-.--
or
Code:
--.->
doesn't have k as its basis, but rather mixed moves like iki which does this:
Code:
<-.--
turns into
Code:
--.->
and vice versa.
(Basically, k rotates around the tip of a vector whereas iki turns around the shaft)

Putting numbers onto this is perhaps kind of weird but I was hoping something more interesting would happen. In principle, any group should be able to be made into this. For instance, here is a group with two elements, the integers modulo 2: (in the following, bold numbers aren't the same as your normal numbers. They will rather be the labels of the individual directions in a given system.)

0+0 = 0
0+1 = 1
1+0 = 1
1+1 = 0

aka the operation or.
This is slightly confusing in that the neutral element of addition is 0 and thus the neutral dimension that is equivalent to a scalar also is the one labeled 0. The corresponding multiplication table is:
01
10

so then you'd get a 2-dimensional system:
(a0+a1 1)(b0+b1 1) = (a0 b0 + a1 b1) 0 + (a0 b1 + a1 b0) 1
which, of course, is just the same as the split-complex numbers:
0 = 1
1 = j

There is also the and table, or multiplication over the integers modulo 2:
0*0 = 0
0*1 = 0
1*0 = 0
1*1 = 1

which actually can't quite be written in the same form as the other table. Gotta expand it to include a head column/row:
*01
000
101

with would, if used in the analogous way, give an incredibly degenerate number system:
(a0+a1 1)(b0+b1 1) = (a0 b0 + a0 b1 + a1 b0) 0 + (a1 b1) 1
which is just silly: In such a system, what ever is in the 1-direction, stays in the 1-direction.
I think this one isn't actually a group though: You cannot reach 1 from 0 so 0*1 does not have an inverse which would be a requirement for a group.

All these groups are not originally about numbers and so there is no reason for them to ever "be negative" as it were, so they will inherently never "accidentally" mimic the complex numbers. There might be something to change that though. Adding in a negative term is bound to make things more interesting seeing as to how j²=1 is the least interesting of the three major cases (the other two being i²=-1 and ε²=0 with (a1 + aε ε)(b1 + bε ε) = a1 b1 + (a1 bε + aε b1) ε and the aε bε term just vanishing), but I wonder if there is a way to do this "reasonably mathematically" rather than by throwing it in there randomly.


Title: Re: a multiplication table based on walking along a triangle
Post by: clacker on April 06, 2017, 01:41:51 AM
I ran the Fragemtarium code claude posted and it did give me an image.  Using the default settings but changing iterations to 100 I got an image that looks something like a clipped mandelbrot.  I am running Fragemtarium version 1.0.0 ("Cologne") on windows 10.  I can't say if that code is what kram1032 was asking for, but it did render an image.


Title: Re: a multiplication table based on walking along a triangle
Post by: kram1032 on April 06, 2017, 02:08:51 AM
huh, that's weird and interesting. Where did claude link actual code though? I only saw the link to Groups of Order 6?


Title: Re: a multiplication table based on walking along a triangle
Post by: clacker on April 06, 2017, 02:13:36 AM
it's at the bottom of that post:

http://www.fractalforums.com/fragmentarium/a-multiplication-table-based-on-walking-along-a-triangle/msg98920/#msg98920



Title: Re: a multiplication table based on walking along a triangle
Post by: kram1032 on April 06, 2017, 09:20:01 AM
ah, right, I'm just blind


Title: Re: a multiplication table based on walking along a triangle
Post by: clacker on April 08, 2017, 06:38:09 PM
I collected all of the slices above the diagonal.  The slices on the diagonal are just diagonal bands, and the ones below the diagonal are 90 degree rotations of those above.  I ran 1000 iterations and changed the escape radius to 10.  I also added a cross hair at 0,0.  Slices 0-3, 0-4, and 3-4 look very much like Mandelbrot sets to me.


Title: Re: a multiplication table based on walking along a triangle
Post by: kram1032 on April 08, 2017, 06:46:28 PM
The slices 03 04 and 34 look the most interesting to me. Though they are "just" weirdly cut off MSets. Can you try zooming in a bit into a bunch of spots? It'll probably just be more of the same seemingly incomplete, sharply cut MSet zooms, but maybe something interesting is hiding down there...


Title: Re: a multiplication table based on walking along a triangle
Post by: clacker on April 09, 2017, 03:17:25 AM
Here is a short low resolution animation zooming in on the 0-3 slice.  I had to really narrow down the size and number of frames down to fit within the forums maximum file size allowed.  It really looks like a sheared Mandelbrot to me.


Title: Re: a multiplication table based on walking along a triangle
Post by: kram1032 on April 09, 2017, 11:18:35 AM
Yeah, pretty normal-looking... thanks


Title: Re: a multiplication table based on walking along a triangle
Post by: clacker on April 10, 2017, 02:10:04 AM
I looked at a 3D slice through dimensions 0, 3, and 4 and got an image that looked like a Mandelbrot that had been tilted and then extruded.  I can see why the slices look the way the do know.  It surprises me that the ends are flat.  There are no subtractions in the math.  I can't wrap my head around why the numbers don't constantly expand.


Title: Re: a multiplication table based on walking along a triangle
Post by: kram1032 on April 10, 2017, 12:39:40 PM
So, at least in these three dimensions, it's simply an extruded/tilted MSet. That's weird. There ought to be some explanation for that. Something like a fairly straight forward transform to complex numbers.

There are a total of 20 such possible 3D slices. I don't expect all of them to be interesting, and some of them will be the same or just mirrored/rotated, judging by your 2D slices though.