Structure metric: Difference between revisions

ArrowHead294 (talk | contribs)
Definition: Formatting
ArrowHead294 (talk | contribs)
Line 5: Line 5:
The ''structure metric'' is a {{w|metric (mathematics)|distance function}} on the notes of a [[periodic scale]] within a single period, which give to it the property of being a {{w|metric space|finite metric space}}. If '''s''' is a periodic scale with quasiperiod '''P''', and if ''c'' is an interval {{nowrap|'''s'''[''i'' + ''j''] − '''s'''[''i'']}} with {{nowrap|0 &le; ''i'' &lt; '''P'''}}, then we may define the specific interval set S(''c'',&nbsp;''j'') to be {{nowrap|{i {{!}} '''s'''[''i'' + ''j''] − '''s'''[''i''] {{=}} ''c''}<nowiki/>}} with {{nowrap|0 &le; ''i'' &lt; '''P'''}}, that is, indicies for the set of intervals with specific, chromatic size ''c'' and generic, scalar interval ''j''. If #S(''c'',&nbsp;''j'') is the cardinality of S(''c'',&nbsp;''j''), then we set d('''s'''[''a''],&nbsp;'''s'''[''b'']), which we will abbreviate as d(''a'',&nbsp;''b''), to be {{nowrap|'''P''' − #S({{abs|'''s'''[''a''] − '''s'''[''b'']}}, {{abs|''a'' − ''b''}})}}.
The ''structure metric'' is a {{w|metric (mathematics)|distance function}} on the notes of a [[periodic scale]] within a single period, which give to it the property of being a {{w|metric space|finite metric space}}. If '''s''' is a periodic scale with quasiperiod '''P''', and if ''c'' is an interval {{nowrap|'''s'''[''i'' + ''j''] − '''s'''[''i'']}} with {{nowrap|0 &le; ''i'' &lt; '''P'''}}, then we may define the specific interval set S(''c'',&nbsp;''j'') to be {{nowrap|{i {{!}} '''s'''[''i'' + ''j''] − '''s'''[''i''] {{=}} ''c''}<nowiki/>}} with {{nowrap|0 &le; ''i'' &lt; '''P'''}}, that is, indicies for the set of intervals with specific, chromatic size ''c'' and generic, scalar interval ''j''. If #S(''c'',&nbsp;''j'') is the cardinality of S(''c'',&nbsp;''j''), then we set d('''s'''[''a''],&nbsp;'''s'''[''b'']), which we will abbreviate as d(''a'',&nbsp;''b''), to be {{nowrap|'''P''' − #S({{abs|'''s'''[''a''] − '''s'''[''b'']}}, {{abs|''a'' − ''b''}})}}.


=Properties=
== Properties ==
The structure metric has the following properties:
The structure metric has the following properties:


1. d(a, a) = 0
1. {{nowrap|d(''a'', ''a'') {{=}} 0}}


#S(|'''s'''[a] - '''s'''[a]|, |a - a|) = #S(0, 0) = '''P'''.
{{nowrap|#S({{abs|'''s'''[''a''] '''s'''[''a'']}}, {{abs|''a'' − ''a''}}) {{=}} #S(0, 0)}} =&nbsp;'''P'''.


2. d(a, b) 0
2. {{nowrap|d(''a'', ''b'') &ge; 0}}


The cardinality of #S(c, j) cannot exceed '''P''', since 0≤i&lt;'''P'''.
The cardinality of #S(''c'',&nbsp;''j'') cannot exceed '''P''', since {{nowrap|0 &le; i &lt; '''P'''}}.


3. d(a, b) = 0 implies a equals b.
3. {{nowrap|d(''a'', ''b'') {{=}} 0}} implies {{nowrap|''a'' {{=}} ''b''}}.


If a b and d(a, b) = 0 then #S(|'''s'''[a] - '''s'''[b]|, |a - b|)) = '''P''', so |a - b| is a period, and |'''s'''[a] - '''s'''[b]| is an interval of repetition. However, '''P''' is the smallest period, contradiction.  
If {{nowrap|a &ne; b}} and {{nowrap|d(''a'', ''b'') {{=}} 0}} then {{nowrap|#S({{abs|'''s'''[''a''] '''s'''[''b'']}}, {{abs|''a'' − ''b''|}}) {{=}} '''P'''}}, so {{abs|''a'' − ''b''}} is a period, and {{nowrap|{{abs|'''s'''[''a''] '''s'''[''b'']}}}} is an interval of repetition. However, '''P''' is the smallest period, leading to a contradiction.  


4. d(a, b) = d(b, a)
4. {{nowrap|d(''a'', ''b'') {{=}} d(''b'', ''a'')}}


d(a, b) equals '''P''' - #S(|'''s'''[a] - '''s'''[b]|, |a - b|) equals  '''P''' - #S(|'''s'''[b] - '''s'''[a]|, |b - a|) equals d(b, a).
{{nowrap|d(''a'', ''b'') {{=}} '''P''' #S({{abs|'''s'''[''a''] '''s'''[''b'']}}, {{abs|''a'' − ''b''}})}} {{nowrap|{{=}} '''P''' #S({{abs|'''s'''[''b''] '''s'''[''a'']}}, {{abs|''b'' − ''a''}})}} {{nowrap|{{=}} d(''b'', ''a'')}}.


5. d(a, c) d(a, b) + d(b, c)
5. {{nowrap|d(''a'', ''c'') &le; d(''a'', ''b'') + d(''b'', ''c'')}}


Suppose X is the [https://en.wikipedia.org/wiki/Indicator_function indicator function] (characteristic function) for the set S(|'''s'''[a] - '''s'''[b]|, |a - b|), Y for the set S(|'''s'''[b] - '''s'''[c]|, |b - c|), and Z for the set S(|'''s'''[a] - '''s'''[c]|, |a - c|), which we may regard as vectors in ℝ^'''P'''. Let J be the '''P'''-dimensional vector [1, 1, ..., 1] of all 1s. Then what we wish to prove may be rewritten '''P''' - Z.J ≤ ('''P''' - X.J) + ('''P''' - Y.J). This may be rewritten again as Z.(X + Y - J).J. Every index contributing to X.Y counts as one of Z, and hence Z.J X.Y. The vector X + Y - J is 1 at an index where both X and Y are 1, is -1 when neither is 1, and 0 otherwise. Hence (X + Y - J).J is X.Y - (J - X).(J - Y), and so is less than or equal to X.Y, and hence less than or equal to Z.J.
Suppose ''X'' is the {{w|indicator function}} (characteristic function) for the set {{nowrap|S({{abs|'''s'''[''a''] '''s'''[''b'']}}, {{abs|''a'' − ''b''}})}}, ''Y'' for the set {{nowrap|S({{abs|'''s'''[''b''] '''s'''[''c'']}}, {{abs|''b'' − ''c''}})}}, and ''Z'' for the set {{nowrap|S({{abs|'''s'''[''a''] '''s'''[''c'']}}, {{abs|''a'' - ''c''}})}}, which we may regard as vectors in {{nowrap|<sup>'''P'''</sup>}}. Let ''J'' be the '''P'''-dimensional vector {{nowrap|[1, 1, ..., 1]}} of all 1s. Then what we wish to prove may be rewritten {{nowrap|'''P''' − ''Z'' · ''J'' ≤ ('''P''' − ''X'' · ''J'') + ('''P''' − ''Y'' · ''J'')}}. This may be rewritten again as {{nowrap|''Z'' · ''J'' &ge; (''X'' + ''Y'' − ''J'') · ''J''}}. Every index contributing to {{nowrap|''X'' · ''Y''}} counts as one of ''Z'', and hence {{nowrap|''Z'' ⋅ ''J'' &ge; ''X'' ⋅ ''Y''}}. The vector {{nowrap|''X'' + ''Y'' − ''J''}} is 1 at an index where both ''X'' and ''Y'' are 1, is −1 when neither is 1, and 0 otherwise. Hence {{nowrap|(''X'' + ''Y'' − ''J'') · ''J'' {{=}} ''X'' · ''Y'' − (''J'' − ''X'') · (''J'' − ''Y'')}}, and so is less than or equal to {{nowrap|''X'' · ''Y''}}, and hence less than or equal to {{nowrap|''Z'' · ''J''}}.


These properties mean that the structure metric defines a ''finite metric space''. This is a structure which has gained a certain amount of attention, particularly in terms of applications in fields requiring data analysis with an eye to similarities and differences.
These properties mean that the structure metric defines a ''finite metric space''. This is a structure which has gained a certain amount of attention, particularly in terms of applications in fields requiring data analysis with an eye to similarities and differences.