## Deriving music scale from harmonies

on August 21, 2011 in General | No Comments »

In the western world we have the predominance of the heptatonic scale.

I always wondered why the Major and the Minor scale are the dominating scales, whether one can derive this from some simple principle. It is kinda strange that there are 5 whole tone steps and 2 halftone steps:
Whole:Whole:Half:Whole:Whole:Whole:Half

One explanation is the use of the perfect 5th (Pythagorean tuning).
The interval of a perfect fifth, corresponds to a ratio of 3:2 of the frequencies. This ratio is experienced as quite harmonic.

The ratio of 2:1 is one octave.
So if we repeat perfect fifths and transpose them back into the octave, i.e. into values between 1 and 2 (by dividing by 2), we get the following values:

1. 3/2 = 1.5
2. 3/2 * 3/2 / 2 = 9/8 = 1.125
3. 3/2 * 3/2 * 3/2 / 2 = 27/16 = 1.6875
4. 3/2 * 3/2 * 3/2 * 3/2 / 4 = 81/64 = 1.265625
5. 3/2 * 3/2 * 3/2 * 3/2 * 3/2 / 4 = 243/128 = 1.8984375
6. (3/2)^6 / 8 = 729/512 = 1.423828125

When we order these values we get
0. < 2. < 4. < 6. < 1. < 3. < 5.
1 < 9/8 < 81/64 < 729/512 < 3/2 < 27/16 < 243/128 < 2
1 < 1.125 < 1.265625 < 1.423828125 < 1.5 < 1.6875 < 1.8984375 < 2

the multiplicative differences in each step are
9/8 / 1 = 9/8
81/64 / (9/8) = 9/8
729/512 / (81/64) = 9/8
3/2 / (729/512) = 256/243
27/16 / (3/2) = 9/8
243/128 /(27/16) = 9/8
2 / (243/128) = 256/243

Now 9/8 corresponds to a whole tone and 256/243=1.053497942386831... corresponds to a half tone.
So we have the characteristic pattern of 3 and 2 whole tones seperated by a half tone.

f=1, g=9/8, a=81/64, b=729/512, c=3/2, d=27/16, e=243/128, f=2
Or if we start with c=1, by multiplying with 2/3:
c=1, d=9/8, e=81/64, f=4/3, g=3/2, a=27/16, b=243/128, c=2

The following tones are
7. (3/2)^7 / 16 = 1.06787109375
8. (3/2)^8 / 16 = 1.601806640625
9. (3/2)^9 / 32 = 1.20135498046875
10. (3/2)^10 / 32 = 1.802032470703125
11. (3/2)^11 / 64 = 1.35152435302734375
12. (3/2)^12 / 128 = 1.0136432647705078125

The last value is called the Pythagorean comma.

## Types of non-associative arithmetics

on März 21, 2011 in General | No Comments »

When considering the free (additive) groupoid/magma that is generated by 1, we can define a multiplication inductively by:
1 * x = x
(a+b) * x = a*x + b*x
which gives us the plain non-associative arithmetic sometimes denoted by N.

Now we can impose equations on the groupoid. For example the free associative groupoid is the natural numbers (without 0) and the above multiplication is also definable there (and it is the multiplication on the natural numbers).

For any finite set of equations the above multiplication is still well defined, because of the right-distributivity of the multiplication.

This is satisfied by a number of well-known identities in quasigroup theory:

### Commutative Law x+y=y+x

The free monogenetic commutative groupoid can be embedded into the free monogenetic commutative loop.

### Associative Law (x+y)+z=x+(y+z)

The free monogenetic associative groupoid is the natural numbers, it can be embedded into the free associative loop which is the integer numbers.

### Left-Commutative or Left-Permutable Law x+(y+z)=y+(x+z)

The elements of the free left-commutative groupoid P can be represented as recursive multisets (two multisets [a1,...,am] and [b1,...,bn] are equal if m=n and (b1,…,bn) is a permutation of (a1,…,am))

[] is element of P and if a1,…,an are in P then also [a1,...,an] is element of P.
The operations can then be defined as
1=[]
a+[b1,...,bn] = [a,b1,...,bn]

We can not add a right neutral element 0 as this would imply commutativity
x+y=x+(y+0)=y+(x+0)=y+x

The free left-commutative groupoid can be embedded into the free left-commutative quasigroup with left-neutral element 0:

We extend the notation into
{±a1,…,±an}k
and define the operations as:

{}0 = 0 = 1-1
{}1 = [] = 1
{b1,…,bn}1=[b1,...,bn]

±a + {b1,…,bn}k = [±a,{b1,...,bn}(k-1)]
{a1,…,am}p – {b1,…,bn}q = {{a1,…,am}(p-1),-{b1,…,bn}(q-1)}

We gather elements in zero-braces {a1,…,am}0,{b1,…,bn}0 = {a1,…,am,b1,…,bn}0.
in each {a1,…,an}k we cancel two elements with opposite sign.
We gather nested braces by
{{b1,…,bn}k1}k2={b1,…,bn}(k1+k2)

Indeed 0 is not right neutral, for example 1+0=[1,{}(-1)].

An realization of P with function is given by starting with the identity function id(x)=x and then for two functions f, g also adding the function f^g.
Left inverse is the operation f^{1/g} and right inverse the operation ln(f)/ln(g).

[f1,...,fn] = x^(f1(x)…fn(x))
{f1,…,fn} = [f1,...,fn]-1 = log_x(x^{f1…fn})=f1…fn
0 = 1
1+0 = x^(x*log_x(1)) = 1 = 0
{1,{}(-1)} = {{}(-1)}={}(-1)
-1 + 1 = [-1] = x^(1/x)
0+

### (Bi)Symmetric or Medial or Entropic Law (x+y)+(z+w)=(x+z)+(y+w)

The medial law makes the multiplication commutative (!):
(a+b)*(x+y) = a*(x+y) + b*(x+y)
=(a*x + a*y) + (b*x+b*y) by induction & r-distributivity
=(a*x + b*x) + (a*y+b*y) medial law
=(x*a+x*b) + (y*a+y*b) by induction assumption
=x*(a+b) + y*(a+b) by induction and r-distributivity
= (x+y)*(a+b) by r-distributivity

The free monogenetic medial groupoid is neither left nor right cancellative, and hence can not be embedded into a quasigroup.  p. 175

### Commutative Medial Law

The free monogenetic commutative medial quasigroup can be represented by the polynomials (with allowed negative exponents) over the integers.

Addition is given by where x is the polynomial variable.
Accordingly Multiplication is the default multiplication of the polynomials.

Verify distributivity: ### idempotency x+x=x

This just yields the trivial groupoid {1}

### Stein-II-Identiy x+(y+x)=(y+x)+y

 J. Ježek, T. Kepka, Equational theories of medial groupoids, Algebra Universalis 17 (1983), 174-190.

## Non-associative (or structured, or arborescent) numbers

on März 12, 2011 in General | No Comments »

The perhaps most basic concept of mathematics are the natural numbers and the act of counting. For example the assertion of Kronecker “Die ganzen Zahlen hat der liebe Gott gemacht, alles andere ist Menschenwerk.” (“The integers are made by God, everything else is human made.”) stresses the important role of the natural/the integer numbers.

Counting is closely related with the concept of sets and their cardinality. Two sets have by definition the same number of elements if there is a one-one assignment of their elements. Sets have this strange property that one can arbitrarily rearrange their elements without changing the set, which is reflected in the associativity and the commutativity of the union-operation.

In computer science however however it is rather cumbersome to implement this unsortedness of the elements of a set. Here the underlying structure are ordered lists.

In a view from universal algebra and theoretical computer science one is given operations and constants (which can be seen as 0-ary operations) and they generate all the terms that can be made from these operations. For example if we have a constant/terminal element 1 and a binary operation + we can form the terms, 1, 1+1, (1+1)+1, 1+(1+1), (1+1)+(1+1), etc.

In the natural numbers all the grouping/bracketing falls flat and in the end it is just the number of 1′s regardless of the order or bracketing, e.g. 1+(1+1) = (1+1)+1 = 1+1+1.
From the standpoint of universal algebra one has to impose the associative law on the terms made up by + and 1 (which implies the commutative law) to beat the term structure flat.

If we however keep the bracketing structure one can still define multiplication (beside the inherent addition) in the default way (by left-distributivity), which is again associative, and we arrive at the concept of structured numbers.
When writing my Ph.D. thesis [Tra07] — which basically deals with exponentiation and the higher operations ladder — I was not aware of the existence of other literature about the topic. Just later slowly it turned out that there was some sparse activity from the 1950 to 1970 about that topic which however seems to remain unpursued, I think due to the difficulty of the matter.

To make the topic more explicit we call an algebraic structure non-associative arithmetic if it has a constant 1, an addition + and a multiplication *, which satisfy:
1 * x = x and (x+y)*z = x*z+y*z and which is generated from 1. The multiplication is then automatically associative.

In this article I want to summarize the findings by giving a commented literature list. I hope to attract people interested in that matter which in turn may contribute literature I didn’t find.

The logarithmetic – as introduced by Etherington – of a groupoid is defined as the set of exponents T (groupings/bracketings) of elements such that for all , . Addition is defined by and multiplication by .

[Bru55] uses associative right neoring as description and shows division by the center.

[Fra55] introduces symmetric law: (A+B)+(C+D)=(A+C)+(B+D).
[Eth59] calls it entropic law.

[Eva57] The additive entropic/symmetric law implies commutativity of the multiplication. By induction:
(A+B)(C+D) = (A+B)C + (A+B)D = C(A+B) + D(A+B)
= (CA+CB) + (DA+DB) = (CA+DA) + (CB+DB)
= A(C+D) + B(C+D)
= (C+D)(A+B)
S is N divided by the entropic law.
This then gives a commutative neoring. Embeddability into neofield?

[Eva57] embeds the free cyclic (generated by 1 element) groupoid N into a loop I, making addition invertible on both sides. Shows that still prime number decomposition is valid.

Questions about embeddability arise:
Embeddability of N into a structure with division
Embeddability of I into a structure with division (right skew neofield?)
Embeddability of S into a structure with division

[Min59] proves number theoretic theorems for the free cyclic logarithmetic:
(1) if then and are powers of the same element
(2) if or where is prime and then and are powers of .
(3) with then , , with .

[Bun57] shows cancellation of addition and (induced) multiplication of the free commutative groupoid.

[Tra07] introduces left-commutative law: a+(b+c) = b+(a+c) and constructs the free division structure of N.
constructs the free division structure of the left-commutative N.

### Literature (with links to the abstract in Zentralblatt)

[Eth39] Etherington, I. M. H. (1939). On non-associative combinations. Proc. R. Soc. Edinb., 59, 153–162.