back to list

Calculating geometric complexity II

🔗Gene Ward Smith <genewardsmith@juno.com> <genewardsmith@juno.com>

1/27/2003 4:07:46 AM

Here are Maple routines which have the exact coefficients. They are not, of course, computationally effiecient, but it would be easy to
calculate the logarithms only once if that is a problem, though I havn't found complexity calculations to be a bottleneck. These should be readily translatable to Matlab, Python, or anything else.

gc7 := proc(l)
# l is 7-limit wedgie

sqrt(evalf(1/4*(-ln(5)^4+4*ln(5)^2*ln(7)^2)*l[1]^2
+1/4*(-ln(3)^4+4*ln(3)^2*ln(7)^2)*l[2]^2
+1/4*(-ln(3)^4+4*ln(3)^2*ln(5)^2)*l[3]^2
+1/2*(ln(3)^2*ln(5)^2-2*ln(3)^2*ln(7)^2)*l[1]*l[2]
-1/2*ln(3)^2*ln(5)^2*l[1]*l[3]+
1/2*(ln(3)^4-2*ln(3)^2*ln(5)^2)*l[2]*l[3])) end:

gc11 := proc(l)
# l is 11-limit linear wedgie

sqrt(evalf((-1/4*ln(5)^2*ln(7)^4-1/4*ln(11)^2*ln(5)^4+ln(7)^2*ln(11)^2*ln(5)^2)*l[1]^2
+(ln(11)^2*ln(7)^2*ln(3)^2-1/4*ln(3)^4*ln(11)^2-1/4*ln(3)^2*ln(7)^4)*l[2]^2
+(ln(3)^2*ln(5)^2*ln(11)^2-1/4*ln(3)^2*ln(5)^4-1/4*ln(3)^4*ln(11)^2)*l[3]^2
+(ln(7)^2*ln(3)^2*ln(5)^2-1/4*ln(3)^2*ln(5)^4-1/4*ln(7)^2*ln(3)^4)*l[4]^2
+(1/2*ln(3)^2*ln(5)^2*ln(11)^2-ln(11)^2*ln(7)^2*ln(3)^2+1/4*ln(3)^2*ln(7)^4)*l[1]*l[2]
+(-1/2*ln(3)^2*ln(5)^2*ln(11)^2+1/4*ln(7)^2*ln(3)^2*ln(5)^2)*l[1]*l[3]
-1/4*ln(7)^2*ln(3)^2*ln(5)^2*l[1]*l[4]
+(-ln(3)^2*ln(5)^2*ln(11)^2+1/2*ln(7)^2*ln(3)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l[4]*l[6]
+(-1/2*ln(3)^4+ln(3)^2*ln(5)^2)*l[5]*l[6])) end:

🔗Graham Breed <graham@microtonal.co.uk>

1/27/2003 4:34:21 AM

Gene Ward Smith wrote:
> Here are Maple routines which have the exact coefficients. They are not, of course, computationally effiecient, but it would be easy to
> calculate the logarithms only once if that is a problem, though I havn't found complexity calculations to be a bottleneck. These should be readily translatable to Matlab, Python, or anything else.

How are you indexing your wedgies? I use tuples, so that when multiplying 1-vectors,

z[i, j] = x[i,] + y[j,]

where x[0,] is the octave coefficient, x[1,] the 3:1 and so on. Can you provide conversion tables between your [i] and my [i,j]?

I think I've got the idea of vals as well. A dual isn't the same as a complement! Using ^ for the wedge product, and ~ for the complement, we have

h12^~comma = ~comma^h12 = {}

where "h12" is the val for 5-limit 12-equal, "comma" is the unison vector for 81:80 and {} is the empty wedgie.

Vals and unison vectors are both 1-vectors. For duality, I'll have to add a flag to each object. So the complement operation also inverts the flag. A unison vector has the dual flag set to 0 and a val has the dual flag set to 1.

To compute a wedge product, both dual flags has to agree. So when you ask to calculate h12^comma, the function can look at the two dual flags, see they aren't the same, and take the complement of the second element to make it so. That means, asking for

h12^comma

means you get

h12^~comma

and it doesn't matter if you meant

~h12^comma

because the dual flag gets set again for the next step of the calculation. And in this case the result is the same anyway.

You can also say that

h12^h7 == comma

because h12^h7 will have its dual flag set, and the comparison function knows it really has to return

h12^h7 == ~comma

and the routine for calculating a linear temperament knows it needs to start with a wedgie that has its dual flag cleared, and so if you feed it h12^h7 it converts it to ~(h12^h7).

I still don't know how to store a multivector so that it's its own dual which seems to be what you're doing.

Graham

🔗Gene Ward Smith <genewardsmith@juno.com> <genewardsmith@juno.com>

1/27/2003 5:16:03 AM

--- In tuning-math@yahoogroups.com, Graham Breed <graham@m...> wrote:
> Gene Ward Smith wrote:
> > Here are Maple routines which have the exact coefficients. They are not, of course, computationally effiecient, but it would be easy to
> > calculate the logarithms only once if that is a problem, though I havn't found complexity calculations to be a bottleneck. These should be readily translatable to Matlab, Python, or anything else.
>
> How are you indexing your wedgies? I use tuples, so that when
> multiplying 1-vectors,
>
> z[i, j] = x[i,] + y[j,]
>
> where x[0,] is the octave coefficient, x[1,] the 3:1 and so on. Can you
> provide conversion tables between your [i] and my [i,j]?

I'm not sure if we are speaking the same language, but I'm using lexicographical order; that is, z[0,1], z[0,2] .... z[0,n] would
be followed by z[1,2]...z[1,n] and so forth. This gives a linear temperament wedgie as the product of two vals, and puts the 2-part, which is related to the generators column of the period-generator matrix, at the beginning.

> I think I've got the idea of vals as well. A dual isn't the same as a
> complement! Using ^ for the wedge product, and ~ for the complement, we
> have
>
> h12^~comma = ~comma^h12 = {}
>
> where "h12" is the val for 5-limit 12-equal, "comma" is the unison
> vector for 81:80 and {} is the empty wedgie.

Are you still using empty wedgies for zero vectors? I hope this isn't giving problems. In any case, the above is definitional; ~comma is the
3-product such that h ^ ~comma = h(comma), so that we can identify
compliments with duals.

> Vals and unison vectors are both 1-vectors. For duality, I'll have to
> add a flag to each object. So the complement operation also inverts the
> flag. A unison vector has the dual flag set to 0 and a val has the dual
> flag set to 1.

Makes sense.

> I still don't know how to store a multivector so that it's its own dual
> which seems to be what you're doing.

I'm simply being unsophisticated about it--I store the wedgies as lists, and reverse the ordering when I compute from commas, etc. in order to get the lists to be the same.

🔗Graham Breed <graham@microtonal.co.uk>

1/27/2003 8:29:31 AM

Gene Ward Smith wrote:

> I'm not sure if we are speaking the same language, but I'm using lexicographical order; that is, z[0,1], z[0,2] .... z[0,n] would
> be followed by z[1,2]...z[1,n] and so forth. This gives a linear temperament wedgie as the product of two vals, and puts the 2-part, which is related to the generators column of the period-generator matrix, at the beginning.

Oh, that's good. It should be the same as my invariant. But are 7-limit wedge products taken from vectors or vals?

I get 7-limit meantone as 21.97, 11-limit meantone as 31.72 and h12^h19^h22 in the 11-limit as 29.52. The planar temperament with 441:440 and 225:224 is 34.44.

> Are you still using empty wedgies for zero vectors? I hope this isn't giving problems. In any case, the above is definitional; ~comma is the
> 3-product such that h ^ ~comma = h(comma), so that we can identify > compliments with duals.

Empty wedgies are empty wedgies. I haven't had any trouble with them.

> I'm simply being unsophisticated about it--I store the wedgies as lists, and reverse the ordering when I compute from commas, etc. in order to get the lists to be the same.

That sounds like taking the complement. I thought you said you didn't have to because you were using duality. And how can you be sure that reversing the list will do the trick? Some of the coefficients should be negated if you aren't using a special ordering.

Graham

🔗Graham Breed <graham@microtonal.co.uk>

1/27/2003 8:38:22 AM

Gene Ward Smith wrote:

> I'm not sure if we are speaking the same language, but I'm using lexicographical order; that is, z[0,1], z[0,2] .... z[0,n] would
> be followed by z[1,2]...z[1,n] and so forth. This gives a linear temperament wedgie as the product of two vals, and puts the 2-part, which is related to the generators column of the period-generator matrix, at the beginning.

Oh, and I expect you're indexing from 1 as well. In which case I get

7-limit meantone 23.76
11-limit meantone 23.85
h12^h19^h22 22.77
441:440 ^ 225:224 28.57

Graham

🔗Gene Ward Smith <genewardsmith@juno.com> <genewardsmith@juno.com>

1/27/2003 7:28:57 PM

--- In tuning-math@yahoogroups.com, Graham Breed <graham@m...> wrote:
> Gene Ward Smith wrote:
>
> > I'm not sure if we are speaking the same language, but I'm using lexicographical order; that is, z[0,1], z[0,2] .... z[0,n] would
> > be followed by z[1,2]...z[1,n] and so forth. This gives a linear temperament wedgie as the product of two vals, and puts the 2-part, which is related to the generators column of the period-generator matrix, at the beginning.
>
> Oh, that's good. It should be the same as my invariant. But are
> 7-limit wedge products taken from vectors or vals?

Either, but I follow the val ordering.

> I get 7-limit meantone as 21.97, 11-limit meantone as 31.72 and
> h12^h19^h22 in the 11-limit as 29.52. The planar temperament with
> 441:440 and 225:224 is 34.44.

I'm afraid I don't know what these numbers mean. I have

7-limit meantone: h50^h31 = 126/125^81/80 = [1, 4, 10, 12, -13, 4]

h12^h19^h22 = 100/99^225/224 = [-1,2,-2,2,2,-8,-5,-2,14,-6]

225/224^441/440 = h41^h31^h12 = [1,-2,3,-2,6,-6,5,-13,11,-4]

> > I'm simply being unsophisticated about it--I store the wedgies as lists, and reverse the ordering when I compute from commas, etc. in order to get the lists to be the same.
>
> That sounds like taking the complement. I thought you said you didn't
> have to because you were using duality.

I said I was using duality to identify compliments. I started out trying to do things the right way, as you seem to be doing, but it gave me trouble, so I settled for a fast, simple-minded approach, which means I have a separate program for each kind of wedge product I want to take.

And how can you be sure that
> reversing the list will do the trick? Some of the coefficients should
> be negated if you aren't using a special ordering.

Sometimes I do. I simply make the wedge product of "vectors", or what I would call intervals, correspond to the wedge product for vals, which I take as the basis.

🔗Graham Breed <graham@microtonal.co.uk>

1/28/2003 4:04:50 AM

Gene Ward Smith wrote:

>>Oh, that's good. It should be the same as my invariant. But are >>7-limit wedge products taken from vectors or vals?
> > Either, but I follow the val ordering.

Okay, so that's the one that give the mapping correctly

>>I get 7-limit meantone as 21.97, 11-limit meantone as 31.72 and >>h12^h19^h22 in the 11-limit as 29.52. The planar temperament with >>441:440 and 225:224 is 34.44.
> > I'm afraid I don't know what these numbers mean. I have

They're geometric complexity, calculated from your algorithm! Look at the subject line!!!!

Why are you using natural logarithms in the definition? I have my standard arrays as logarithms to base 2, and that's the metric that gives interval sizes in octaves. It'd be much easier if geometric complexity stayed in base 2.

> 7-limit meantone: h50^h31 = 126/125^81/80 = [1, 4, 10, 12, -13, 4]

Okay, we're already in trouble. I make this val

(0, 1): 1
(0, 2): 4
(0, 3): 10
(1, 2): 4
(1, 3): 13
(2, 3): 12

That'd be an invariant of

[1, 4, 10, 4, 13, 12]

Which isn't what you give! You must be using (3,1) instead of (1,3) for the sign to match. And the ordering isn't the same, and I don't see how that can be numerical order of the bases, whatever the bases are. So what other surprises do you have up your sleeve?

I'm fully in agreement with the calculations for wedge product and complement given in

http://www.ses.swin.edu.au/homes/browne/grassmannalgebra/book/

where my bases are the coefficients of his e's (except that I start with 0 instead of 1). So can you please state your algorithms in terms of these?

> h12^h19^h22 = 100/99^225/224 = [-1,2,-2,2,2,-8,-5,-2,14,-6]

(0, 1, 2): 1 *
(0, 1, 3): 2
(0, 1, 4): 2 *
(0, 2, 3): -2 *
(0, 2, 4): 2
(0, 3, 4): 8 *
(1, 2, 3): -5
(1, 2, 4): 2 *
(1, 3, 4): 14
(2, 3, 4): 6 *

Here, it's the right order but the signs are wrong. It's also different to the invariant I defined, which always converts to the smaller bases. I can change that to always have the dual flag set and I don't think there'll be any repercussions. And the signs don't matter for the complexity calculation, so this one's okay.

> 225/224^441/440 = h41^h31^h12 = [1,-2,3,-2,6,-6,5,-13,11,-4]

> I said I was using duality to identify compliments. I started out trying to do things the right way, as you seem to be doing, but it gave me trouble, so I settled for a fast, simple-minded approach, which means I have a separate program for each kind of wedge product I want to take. No, you've repeatedly said things like the the wedge product of 2 vals is the same as that of n-1 commas, which only works if you use duality. I'd rather keep the complements in there, explicit is better than implicit and all that. But now I've implemented duality to fit in with you, you say you've been taking complements all the time!

Oh, and "compliment" and "complement" are different words.

>>reversing the list will do the trick? Some of the coefficients should >>be negated if you aren't using a special ordering.
> > Sometimes I do. I simply make the wedge product of "vectors", or what I would call intervals, correspond to the wedge product for vals, which I take as the basis.

So can you give the general algorithm for geometric complexity? I think I've got an interior product worked out, but (as with the complement) only for the Euclidian metric. Which Browne says is the identity matrix, although you have some other metric that you also say is Euclidian.

Graham

🔗Gene Ward Smith <genewardsmith@juno.com> <genewardsmith@juno.com>

1/28/2003 5:36:16 AM

--- In tuning-math@yahoogroups.com, Graham Breed <graham@m...> wrote:
> Gene Ward Smith wrote:

> I'm fully in agreement with the calculations for wedge product and
> complement given in
>
> http://www.ses.swin.edu.au/homes/browne/grassmannalgebra/book/
>
> where my bases are the coefficients of his e's (except that I start with
> 0 instead of 1). So can you please state your algorithms in terms of these?

I'll check it out.

> No, you've repeatedly said things like the the wedge product of 2 vals
> is the same as that of n-1 commas, which only works if you use duality.

People define things in different ways; you could introduce interior products, for instance. The way Browne does things is a little unusual and I haven't been trying to follow him. For our musical purposes, as far as I can see we only need to multiply by either vals or intervals, and we can, if we like, consider that the kind of product is determined by whether we are taking it with a val or an interval.

> I'd rather keep the complements in there, explicit is better than
> implicit and all that. But now I've implemented duality to fit in with
> you, you say you've been taking complements all the time!

It's duality which allows us to identify a compliment with a dual. In other words, an interval, which is the dual to a val, can be identified with an n-1 grade element in the exterior power of the vals, and vice-versa.

> So can you give the general algorithm for geometric complexity? I think
> I've got an interior product worked out, but (as with the complement)
> only for the Euclidian metric. Which Browne says is the identity
> matrix, although you have some other metric that you also say is Euclidian.

If you consider both vals and intervals to be 1-vectors, then the mapping of an interval by the val is an inner product. Mostly, mathematicians would simply leave the vals and intervals to be dual spaces, and identify the double dual with the original space. That's one possible kind of metric, but we don't actually need to make it a metric if we don't do things in Browne's way but in a more usual way.

The metric I am using for geometric complexity is a metric not on intervals, but on octave classes. The classes are 1-vectors in a space of one less dimension, and the wedge products are being taken in this different space. This now is the situation as Browne envisions it, except that we are not using an orthonormal basis. However, a coordinate transformation will take us to such a basis, which means that elements of any grade can be measured--we are in a Euclidean setting, which from my point of view we are *not* in when we start with vals and intervals, where we are in a vector space V and its dual space V^* setting.

🔗Graham Breed <graham@microtonal.co.uk>

1/28/2003 6:35:19 AM

Gene Ward Smith wrote:

> People define things in different ways; you could introduce interior products, for instance. The way Browne does things is a little unusual and I haven't been trying to follow him. For our musical purposes, as far as I can see we only need to multiply by either vals or intervals, and we can, if we like, consider that the kind of product is determined by whether we are taking it with a val or an interval.

So far, all we need are wedge products and complements. But you only defined wedge products -- I had to work out the complement for myself. If the wedge product works on general multivectors, there's no need to distinguish vals from intervals. Even if the distinction is preserved, you need to do complements, they're just hidden away.

The only text I have is Browne's, so if you're using different definitions, how are any of us supposed to know what you mean?

>>So can you give the general algorithm for geometric complexity? I think >>I've got an interior product worked out, but (as with the complement) >>only for the Euclidian metric. Which Browne says is the identity >>matrix, although you have some other metric that you also say is Euclidian.
> > > If you consider both vals and intervals to be 1-vectors, then the mapping of an interval by the val is an inner product. Mostly, mathematicians would simply leave the vals and intervals to be dual spaces, and identify the double dual with the original space. That's one possible kind of metric, but we don't actually need to make it a metric if we don't do things in Browne's way but in a more usual way.

The inner product can be calculated from wedge products and complements. There's no need to bring dual spaces into it. It's the only way I know to get the size of a wedgie, and for it to work as a complexity measure a metric needs to be applied to the complement operation. It does need to work beyond 1-vectors because we need to get the complexity of other wedgies.

> The metric I am using for geometric complexity is a metric not on intervals, but on octave classes.

What's an octave class?

> The classes are 1-vectors in a space of one less dimension, and the wedge products are being taken in this different space.

You mean it's octave-equivalent space? Well, we've always been able to rate the complexity of the mapping. We need to get the complexity of intermediate wedgies, like spatial temperaments in 13-equal.

> This now is the situation as Browne envisions it, except that we are not using an orthonormal basis.

We aren't?

> However, a coordinate transformation will take us to such a basis, which means that elements of any grade can be measured--we are in a Euclidean setting, which from my point of view we are *not* in when we start with vals and intervals, where we are in a vector space V and its dual space V^* setting.

So what's the transformation? And how do you transform coordinates of wedgies anyway?

Graham

🔗Gene Ward Smith <genewardsmith@juno.com> <genewardsmith@juno.com>

1/29/2003 1:34:31 AM

--- In tuning-math@yahoogroups.com, Graham Breed <graham@m...> wrote:

So
> what other surprises do you have up your sleeve?

Hopefully, none. I changed my 7-limit wedgie (a routine I wrote before the Browne book arrived on the scene) to conform to standard order. My 11-limit linear wedgie already tracks with yours. In neither case do the definitions of geometric complexity need changing.

> > h12^h19^h22 = 100/99^225/224 = [-1,2,-2,2,2,-8,-5,-2,14,-6]
>
> (0, 1, 2): 1 *
> (0, 1, 3): 2
> (0, 1, 4): 2 *
> (0, 2, 3): -2 *
> (0, 2, 4): 2
> (0, 3, 4): 8 *
> (1, 2, 3): -5
> (1, 2, 4): 2 *
> (1, 3, 4): 14
> (2, 3, 4): 6 *
>
> Here, it's the right order but the signs are wrong. It's also different
> to the invariant I defined, which always converts to the smaller bases.

I simply reversed the ordering for the product of two vals and used it for the planar wedgie determined from the product of two intervals, but we could change that.

> I can change that to always have the dual flag set and I don't think
> there'll be any repercussions. And the signs don't matter for the
> complexity calculation, so this one's okay.

Actually, the signs do matter in this case--this is the only time your calculations should be of from mine.