Defactoring: Difference between revisions
Cmloegcmluin (talk | contribs) |
Cmloegcmluin (talk | contribs) add performance experiment information for smith vs column hermite defactoring |
||
Line 43: | Line 43: | ||
In accordance with this research and reasoning, this article henceforth will eschew the terms saturation and contorsion in favor of defactored and enfactored. | In accordance with this research and reasoning, this article henceforth will eschew the terms saturation and contorsion in favor of defactored and enfactored. | ||
=== deeper dive on concerns re: contorsion concept === | |||
### contain the diagrams for contorsion and torsion? like a section called "enfactored lattices" or "enfactorization illustrated with lattices" or something | |||
== identifying enfactored mappings == | == identifying enfactored mappings == | ||
Line 83: | Line 87: | ||
This article prefers column Hermite defactoring to Smith defactoring because it is: | This article prefers column Hermite defactoring to Smith defactoring because it is: | ||
* Cheaper computationally, wasting less resources computing things irrelevant to the result, | * Cheaper computationally, wasting less resources computing things irrelevant to the result<ref> | ||
Using the following code in Wolfram Language:<br> | |||
<span style="font-family: monospace; font-size: 10px;">hermiteUnimodular[m_]:=Transpose[First[HermiteDecomposition[Transpose[m]]]]<br> | |||
columnEchelonDefactor[m_]:=Take[Inverse[hermiteUnimodular[m]],MatrixRank[m]]<br> | |||
<br> | |||
rightReducingMatrix[m_] := Last[SmithDecomposition[m]]<br> | |||
smithDefactor[m_] := Take[Inverse[rightReducingMatrix[m]], MatrixRank[m]]<br> | |||
<br> | |||
ms = {};<br> | |||
Do[<br> | |||
d = RandomInteger[{2,6}];<br> | |||
r = RandomInteger[{1,d}];<br> | |||
m = RandomInteger[{-99,99},{r,d}];<br> | |||
ms = Join[ms, {m}],<br> | |||
1000<br> | |||
]<br> | |||
<br> | |||
AbsoluteTiming[Do[smithDefactor[m],{m,ms}]]<br></span><br> | |||
The first several results for Smith defactoring took (in ms) 3.55919, 3.45199, 3.58493, 3.63464, 3.80917, 3.77151, while the first several results for column Hermite defactoring took 3.30063, 3.39137, 3.33808, 3.21195, 3.16469, 3.20419. So this suggests a slight edge for column Hermite defactoring. | |||
</ref>, | |||
* Is easy to understand how it works, and can be worked out by hand (as we will demonstrate below), | * Is easy to understand how it works, and can be worked out by hand (as we will demonstrate below), | ||
* If interested, you can see what the common factor is, if there was any. | * If interested, you can see what the common factor is, if there was any. | ||
Line 138: | Line 161: | ||
In an effort to demystify the effects of column Hermite defactoring, we will here walk though an example manually. It's a silly example, but suppose we have the mapping {{vector|{{map|6 5 4}} {{map|4 -4 1}}}}. Spoiler alert: it is 11-enfactored. | In an effort to demystify the effects of column Hermite defactoring, we will here walk though an example manually. It's a silly example, but suppose we have the mapping {{vector|{{map|6 5 4}} {{map|4 -4 1}}}}. Spoiler alert: it is 11-enfactored. | ||
### include the L-shape work-through example | ### include the L-shape work-through example | ||
Line 148: | Line 172: | ||
* '''full-rank''': removes rank deficiencies, or in other words, rows that are all zeros | * '''full-rank''': removes rank deficiencies, or in other words, rows that are all zeros | ||
* '''preserves genuine unit-fraction-of-an-prime periods''': at first glance, when a pivot is not equal to 1, it might trigger you to think that the mapping is enfactored. But temperaments can legitimately have generators that divide primes evenly, such as 5-limit Blackwood, {{vector|{{map|5 8 0}} {{map|0 0 1}}}}, which divides the octave into 5 parts.<ref>Any form that enforces pivots all be 1's would fail this criteria.</ref> | * '''preserves genuine unit-fraction-of-an-prime periods''': at first glance, when a pivot is not equal to 1, it might trigger you to think that the mapping is enfactored. But temperaments can legitimately have generators that divide primes evenly, such as 5-limit Blackwood, {{vector|{{map|5 8 0}} {{map|0 0 1}}}}, which divides the octave into 5 parts.<ref>Any form that enforces pivots all be 1's would fail this criteria.</ref> | ||
=== sum-and-difference defactoring === | |||
### explain our failed attempt at the sum-and-difference (SAD) defactoring... I think I can nab it mostly out of that message to Joe | |||
=== illustrative examples === | === illustrative examples === |