Defactoring algorithms: Difference between revisions

Defactoring methods: re-evaluation
Identifying enfactored mappings: -> heuristics. Comment out the part that should be discussed in an article about saturation; this one should focus on the how
Line 9: Line 9:
Regarding the development of a canonical form for temperaments using only linear algebra, Dave and Douglas did manage to develop such a form, which is documented here: [[defactored Hermite form]]. It was Gene himself who first described this form (as the result of his "saturation" algorithm), so he either didn't realize the full implications of his discovery, or it was simply not popularized and plugged in with the rest of the hive knowledge.</ref>.  
Regarding the development of a canonical form for temperaments using only linear algebra, Dave and Douglas did manage to develop such a form, which is documented here: [[defactored Hermite form]]. It was Gene himself who first described this form (as the result of his "saturation" algorithm), so he either didn't realize the full implications of his discovery, or it was simply not popularized and plugged in with the rest of the hive knowledge.</ref>.  


== Identifying enfactored mappings ==
== Heuristics ==
Sometimes enfactoring can be identified naked-eye and removed by trial and error, particularly when it is immediately apparent. For example:


First, let us understand the problem.
<math>\displaystyle \begin{bmatrix} 24 & 38 & 56 \end{bmatrix}</math>


=== Immediately apparent enfactoring ===
This mapping has only a single row, and we can see that every element in that row is even. Therefore we have a common factor of at least 2. In this case it is in fact exactly 2. So we can say that this is a 2-enfactored mapping. By dividing out the common factor we obtain


Sometimes the enfactoring of a mapping is immediately apparent. For example:
<math>\displaystyle \begin{bmatrix} 12 & 19 & 28 \end{bmatrix}</math>
 
<math>
\left[
\begin{array} {r}
24 & 38 & 56 \\
\end{array}
\right]
</math>
 
This mapping has only a single row, and we can see that every element in that row is even. Therefore we have a common factor of at least 2. In this case it is in fact exactly 2. So we can say that this is a 2-enfactored mapping.


<!--
Being enfactored tells us that it's wasteful to use this mapping. Specifically, being 2-enfactored tells us that we have 2x as many pitches as we need. Said another way, half of the pitches in our system are bringing nothing to the table, at least not in terms of approximating intervals built out of the 5-limit primes 2, 3, and 5, which is the primary goal of a temperament.
Being enfactored tells us that it's wasteful to use this mapping. Specifically, being 2-enfactored tells us that we have 2x as many pitches as we need. Said another way, half of the pitches in our system are bringing nothing to the table, at least not in terms of approximating intervals built out of the 5-limit primes 2, 3, and 5, which is the primary goal of a temperament.


Line 32: Line 24:


Think of it this way: because every element is even, any [[JI]] interval you'd map with with the mapping must come out as an even number of steps of 24-ET, by the definition of the dot product, and every even step of 24-ET is just a step of 12-ET. Examples: {{vector|1 -2 1}}.{{map|24 38 56}} = 24 - 76 + 56 = 4, {{vector|1 1 -1}}.{{map|24 38 56}} = 24 + 38 - 56  = 6.
Think of it this way: because every element is even, any [[JI]] interval you'd map with with the mapping must come out as an even number of steps of 24-ET, by the definition of the dot product, and every even step of 24-ET is just a step of 12-ET. Examples: {{vector|1 -2 1}}.{{map|24 38 56}} = 24 - 76 + 56 = 4, {{vector|1 1 -1}}.{{map|24 38 56}} = 24 + 38 - 56  = 6.
-->
However, enfactoring is often not apparent. Consider this example:


=== Hidden enfactoring ===
<math>\displaystyle
 
\begin{bmatrix}  
Other times, enfactoring is less apparent. Consider this example:
 
<math>
\left[
\begin{array} {r}
3 & 0 & -1 \\
3 & 0 & -1 \\
0 & 3 & 5 \\
0 & 3 & 5 \\
\end{array}
\end{bmatrix}
\right]
</math>
</math>


This is a form of 5-limit [[porcupine]], a [[rank-2]] temperament (in fact it is the result of putting it into [[IRREF]]). Looking at either row, neither map has a common factor. But remember that we also need to check linear combinations of rows. If we subtract the 2nd row from the 1st row, we can produce the row {{map|3 -3 -6}}, which has a common factor of 3. So this mapping is also enfactored, even though it's not obvious from just looking at it.
This is a form of 5-limit [[porcupine]], a [[rank-2]] temperament (in fact it is the result of putting it into [[IRREF]]). Looking at either row, neither map has a common factor. But remember that we also need to check linear combinations of rows. If we subtract the 2nd row from the 1st row, we can produce the row {{map| 3 -3 -6 }}, which has a common factor of 3. So this mapping is also enfactored, even though it is not obvious from just looking at it.
 
If you're unsure why this {{map|3 -3 -6}} matters despite not being in {{rket|{{map|3 0 -1}} {{map|0 3 5}}}}, we may need to quickly review some linear algebra fundamentals. It may take some getting used to, but a mapping can be changed to another equivalent mapping (both mappings will map input vectors to the same scalars) by replacing any row with linear combinations of its rows. That is, we could replace either {{map|3 0 -1}} or {{map|0 3 5}} in our original matrix {{rket|{{map|3 0 -1}} {{map|0 3 5}}}} to get {{rket|{{map|3 -3 -6}} {{map|0 3 5}}}} or {{rket|{{map|3 0 -1}} {{map|3 -3 -6}}}} and any of these mappings represent the same temperament.
 
Another classic example of hidden enfactoring is the one used on [http://tonalsoft.com/enc/t/torsion.aspx Tonalsoft's article for torsion]. As a matrix, the pair of commas [[648/625]] and [[2048/2025]] for [[Joe Monzo]]'s periodicity block there would look like:
 
<math>
\left[
\begin{array} {r}
3 & 11 \\
4 & -4 \\
-4 & -2 \\
\end{array}
\right]
</math>
 
No column has a GCD > 1. And yet, if we subtract the first comma from the second, we get {{vector|11 -4 -2}} - {{vector|3 4 -4}} = {{vector|8 -8 2}}, which is clearly 2×{{vector|4 -4 2}}.
 
=== Well-hidden enfactoring ===


<!--
If you're unsure why this {{map| 3 -3 -6 }} matters despite not being in {{rket| {{map| 3 0 -1 }} {{map| 0 3 5 }} }}, we may need to quickly review some linear algebra fundamentals. It may take some getting used to, but a mapping can be changed to another equivalent mapping (both mappings will map input vectors to the same scalars) by replacing any row with linear combinations of its rows. That is, we could replace either {{map| 3 0 -1 }} or {{map| 0 3 5 }} in our original matrix {{rket| {{map| 3 0 -1 }} {{map| 0 3 5 }} }} to get {{rket|{{map|3 -3 -6}} {{map| 0 3 5 }} }} or {{rket| {{map| 3 0 -1 }} {{map| 3 -3 -6 }} }} and any of these mappings represent the same temperament.
-->
Sometimes the hidden common factor is even harder to find. Consider the mapping:
Sometimes the hidden common factor is even harder to find. Consider the mapping:


<math>
<math>\displaystyle
\left[
\begin{bmatrix}  
\begin{array} {r}
6 & 5 & -4 \\
6 & 5 & -4 \\
4 & -4 & 1 \\
4 & -4 & 1 \\
\end{array}
\end{bmatrix}
\right]
</math>
</math>


To find this common factor, we need to linearly combine two of the first row {{map|6 5 -4}} and negative three of the 2nd row {{map|4 -4 1}} to produce {{map|0 22 -11}}. So we can see here that its common factor is 11. But there's no clear relationship between the numbers 2 and 3 and the number 11. And so we can begin to see that the problem of identifying enfactored mapping may not be very simple or straightforward.
To find this common factor, we need to linearly combine two of the first row {{map| 6 5 -4 }} and negative three of the 2nd row {{map| 4 -4 1 }} to produce {{map| 0 22 -11 }}. So we can see here that its common factor is 11. But there is no clear relationship between the numbers 2 and 3 and the number 11. And so we can begin to see that the problem of identifying enfactored mapping may not be very simple or straightforward.


== Defactoring methods ==
== Defactoring methods ==