Metric $d(sigma,tau)$ in $S_{n}$











up vote
5
down vote

favorite
3












Let $S_{n}$ denote the set of permutations of the sequence from $(1,2,dots,n)$.
Let us define a metric on $S_{n}$ for any $sigma, tauin S_{n}$, such that $$d(sigma,tau)=sum_{i=1}^{n}vertsigma(i)-tau(i)vert$$. What are the values of $d(sigma,tau)$ can be?



Any ideas from which point should I start?










share|cite|improve this question


















  • 3




    I would start with $sigma$ a cycle and $tau$ the identity.
    – Steve D
    Oct 12 '17 at 16:04










  • Can it ever be negative? Can it ever be non-integer? How large can it be for a fixed $n$? The best way to get a grip on this is to do a few calculations yourself.
    – Teddy38
    Oct 12 '17 at 16:06






  • 1




    First, observe that $dleft(sigma, tauright) = dleft(1, tau circ sigma^{-1}right)$, where $1$ denotes $operatorname{id}$. Thus, it suffices to understand $dleft(1, piright)$ for all permutations $pi$. But $dleft(1, piright)$ is the total displacement of $pi$, and equals twice the depth of $pi$, studied in arXiv:1202.4765v3. From Proposition 3.2 in that paper, you can conclude that $dleft(sigma, tauright)$ is an even integer between $0$ and $2leftlfloor n^2/4rightrfloor$. Suspecting that all such integers are actually reached.
    – darij grinberg
    Nov 15 at 0:29

















up vote
5
down vote

favorite
3












Let $S_{n}$ denote the set of permutations of the sequence from $(1,2,dots,n)$.
Let us define a metric on $S_{n}$ for any $sigma, tauin S_{n}$, such that $$d(sigma,tau)=sum_{i=1}^{n}vertsigma(i)-tau(i)vert$$. What are the values of $d(sigma,tau)$ can be?



Any ideas from which point should I start?










share|cite|improve this question


















  • 3




    I would start with $sigma$ a cycle and $tau$ the identity.
    – Steve D
    Oct 12 '17 at 16:04










  • Can it ever be negative? Can it ever be non-integer? How large can it be for a fixed $n$? The best way to get a grip on this is to do a few calculations yourself.
    – Teddy38
    Oct 12 '17 at 16:06






  • 1




    First, observe that $dleft(sigma, tauright) = dleft(1, tau circ sigma^{-1}right)$, where $1$ denotes $operatorname{id}$. Thus, it suffices to understand $dleft(1, piright)$ for all permutations $pi$. But $dleft(1, piright)$ is the total displacement of $pi$, and equals twice the depth of $pi$, studied in arXiv:1202.4765v3. From Proposition 3.2 in that paper, you can conclude that $dleft(sigma, tauright)$ is an even integer between $0$ and $2leftlfloor n^2/4rightrfloor$. Suspecting that all such integers are actually reached.
    – darij grinberg
    Nov 15 at 0:29















up vote
5
down vote

favorite
3









up vote
5
down vote

favorite
3






3





Let $S_{n}$ denote the set of permutations of the sequence from $(1,2,dots,n)$.
Let us define a metric on $S_{n}$ for any $sigma, tauin S_{n}$, such that $$d(sigma,tau)=sum_{i=1}^{n}vertsigma(i)-tau(i)vert$$. What are the values of $d(sigma,tau)$ can be?



Any ideas from which point should I start?










share|cite|improve this question













Let $S_{n}$ denote the set of permutations of the sequence from $(1,2,dots,n)$.
Let us define a metric on $S_{n}$ for any $sigma, tauin S_{n}$, such that $$d(sigma,tau)=sum_{i=1}^{n}vertsigma(i)-tau(i)vert$$. What are the values of $d(sigma,tau)$ can be?



Any ideas from which point should I start?







combinatorics metric-spaces permutations






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Oct 12 '17 at 15:23









Bakhytbek

4711




4711








  • 3




    I would start with $sigma$ a cycle and $tau$ the identity.
    – Steve D
    Oct 12 '17 at 16:04










  • Can it ever be negative? Can it ever be non-integer? How large can it be for a fixed $n$? The best way to get a grip on this is to do a few calculations yourself.
    – Teddy38
    Oct 12 '17 at 16:06






  • 1




    First, observe that $dleft(sigma, tauright) = dleft(1, tau circ sigma^{-1}right)$, where $1$ denotes $operatorname{id}$. Thus, it suffices to understand $dleft(1, piright)$ for all permutations $pi$. But $dleft(1, piright)$ is the total displacement of $pi$, and equals twice the depth of $pi$, studied in arXiv:1202.4765v3. From Proposition 3.2 in that paper, you can conclude that $dleft(sigma, tauright)$ is an even integer between $0$ and $2leftlfloor n^2/4rightrfloor$. Suspecting that all such integers are actually reached.
    – darij grinberg
    Nov 15 at 0:29
















  • 3




    I would start with $sigma$ a cycle and $tau$ the identity.
    – Steve D
    Oct 12 '17 at 16:04










  • Can it ever be negative? Can it ever be non-integer? How large can it be for a fixed $n$? The best way to get a grip on this is to do a few calculations yourself.
    – Teddy38
    Oct 12 '17 at 16:06






  • 1




    First, observe that $dleft(sigma, tauright) = dleft(1, tau circ sigma^{-1}right)$, where $1$ denotes $operatorname{id}$. Thus, it suffices to understand $dleft(1, piright)$ for all permutations $pi$. But $dleft(1, piright)$ is the total displacement of $pi$, and equals twice the depth of $pi$, studied in arXiv:1202.4765v3. From Proposition 3.2 in that paper, you can conclude that $dleft(sigma, tauright)$ is an even integer between $0$ and $2leftlfloor n^2/4rightrfloor$. Suspecting that all such integers are actually reached.
    – darij grinberg
    Nov 15 at 0:29










3




3




I would start with $sigma$ a cycle and $tau$ the identity.
– Steve D
Oct 12 '17 at 16:04




I would start with $sigma$ a cycle and $tau$ the identity.
– Steve D
Oct 12 '17 at 16:04












Can it ever be negative? Can it ever be non-integer? How large can it be for a fixed $n$? The best way to get a grip on this is to do a few calculations yourself.
– Teddy38
Oct 12 '17 at 16:06




Can it ever be negative? Can it ever be non-integer? How large can it be for a fixed $n$? The best way to get a grip on this is to do a few calculations yourself.
– Teddy38
Oct 12 '17 at 16:06




1




1




First, observe that $dleft(sigma, tauright) = dleft(1, tau circ sigma^{-1}right)$, where $1$ denotes $operatorname{id}$. Thus, it suffices to understand $dleft(1, piright)$ for all permutations $pi$. But $dleft(1, piright)$ is the total displacement of $pi$, and equals twice the depth of $pi$, studied in arXiv:1202.4765v3. From Proposition 3.2 in that paper, you can conclude that $dleft(sigma, tauright)$ is an even integer between $0$ and $2leftlfloor n^2/4rightrfloor$. Suspecting that all such integers are actually reached.
– darij grinberg
Nov 15 at 0:29






First, observe that $dleft(sigma, tauright) = dleft(1, tau circ sigma^{-1}right)$, where $1$ denotes $operatorname{id}$. Thus, it suffices to understand $dleft(1, piright)$ for all permutations $pi$. But $dleft(1, piright)$ is the total displacement of $pi$, and equals twice the depth of $pi$, studied in arXiv:1202.4765v3. From Proposition 3.2 in that paper, you can conclude that $dleft(sigma, tauright)$ is an even integer between $0$ and $2leftlfloor n^2/4rightrfloor$. Suspecting that all such integers are actually reached.
– darij grinberg
Nov 15 at 0:29












2 Answers
2






active

oldest

votes

















up vote
2
down vote



+25










This is not an answer but too long for a comment:



Let $D_n$ be the range of $d$ under $S_n$. A quick and dirty implementation in python



import itertools
n = 4
domain = range(1, n+1)
perm = list(itertools.permutations(domain))
values = set()

for i in perm:
for j in perm:
x = 0
for k in range (0, n):
x += abs(i[k] -j[k])
values.add(x)

return values


yields that
$$
begin{align*}
D_1 &= {0} \
D_2 &= {0,2 } \
D_3 &= {0,2,4 } \
D_4 &= {0,2,4, 6, 8} \
D_5 &= {0,2,4,6,8,10,12 } \
D_6 &= {0,2,4,6,8,10,12,14,16,18 } \
D_7 &= {0,2,4,6,8,10,12,14,16,18,20,22,24 }
end{align*}
$$



It's also easy to show that $D_n subseteq D_{n+1}$ and that ${0,2, ldots, 2 cdot (n-1) } subseteq D_{n+1}$ (for all $n$). However, I'm not sure where the extra values in the steps $3 mapsto 4$, $4 mapsto 5$, $5 mapsto 6$, $6 mapsto 7$ come from.






share|cite|improve this answer



















  • 1




    If you take the difference between the identity and "reverse" permutations you get a value of $2n^2 in D_{2n}$ and $2n(n+1) in D_{2n+1}$ which seems to match the maximum values you got.
    – Daniel Schepler
    Nov 15 at 0:13










  • The maximum value is OEIS A007590
    – Surb
    Nov 15 at 7:24




















up vote
1
down vote













The value of $d(sigma,tau)$ can be any even integer between $0$ and $leftlfloorfrac{1}{2}n^2rightrfloor$. In fact, given an even integer $k$ within these bounds, one can explicitly construct a permutation $sigma$ with $d(sigma,Id)=k$, where $Id$ denotes the identity permutation (we will abuse the notation slightly and use the same name for all identity permutations, regardless of the value of $n$).



We will prove this in an induction-like fashion:




  • If $nleq 2$, the problem is trivial. From now on, we'll assume $ngeq 3$.

  • If $k < 2(n-1)$, we can deduce that $kleq 2(n-1)-2$ (due to $k$ being an even integer) and a short calculation tells us that:
    $$begin{eqnarray}
    0 & leq & (n-3)^2 \
    0 & leq & (n-1)^2 - 4n + 8\
    2(n-1) - 2 & leq & frac{1}{2}(n-1)^2 \
    k & leq & leftlfloorfrac{1}{2}(n-1)^2rightrfloor \
    end{eqnarray}$$

    where the floor function could have been introduced thanks to the left-hand side of the inequality being an integer. The last inequality allows us to apply the induction hypothesis to obtain a permutation $sigma$ on $(n-1)$ elements having $d(sigma,Id)=k$ and extend it by setting $sigma(n)=n$ to obtain a permutation on $n$ elements with the desired property.

  • Finally, if $kgeq 2(n-1)$, we find a permutation $sigma'$ on $(n-2)$ elements with $d(sigma',Id)=k-2(n-1)$ by the induction hypothesis. This can be done because $$begin{eqnarray}
    k-2(n-1) & leq & leftlfloor frac{1}{2}n^2rightrfloor - 2(n-1)\
    & = & leftlfloor frac{1}{2}left(n^2 - 4n + 4right)rightrfloor\
    & = & leftlfloor frac{1}{2}left(n-2right)^2rightrfloor
    end{eqnarray}$$

    Now, we can define our permutation $sigma$ as $sigma(1)=n$, $sigma(n)=1$ and $sigma(i)=sigma'(i-1)+1$ for $1<i<n$. Doing so gives us $d(sigma,Id)=(n-1)+d(sigma',Id)+(n-1)=k$.


This completes the proof that any even value between $0$ and $leftlfloorfrac{1}{2}n^2rightrfloor$ is a distance between some pair of permutations.



Note that this chain of reasoning does not show that a value larger than $leftlfloorfrac{1}{2}n^2rightrfloor$ cannot be obtained by some permutation, nor that only even values are reachable; neither of which is too hard to prove.






share|cite|improve this answer





















    Your Answer





    StackExchange.ifUsing("editor", function () {
    return StackExchange.using("mathjaxEditing", function () {
    StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
    StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
    });
    });
    }, "mathjax-editing");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "69"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    noCode: true, onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














     

    draft saved


    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2469241%2fmetric-d-sigma-tau-in-s-n%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    2
    down vote



    +25










    This is not an answer but too long for a comment:



    Let $D_n$ be the range of $d$ under $S_n$. A quick and dirty implementation in python



    import itertools
    n = 4
    domain = range(1, n+1)
    perm = list(itertools.permutations(domain))
    values = set()

    for i in perm:
    for j in perm:
    x = 0
    for k in range (0, n):
    x += abs(i[k] -j[k])
    values.add(x)

    return values


    yields that
    $$
    begin{align*}
    D_1 &= {0} \
    D_2 &= {0,2 } \
    D_3 &= {0,2,4 } \
    D_4 &= {0,2,4, 6, 8} \
    D_5 &= {0,2,4,6,8,10,12 } \
    D_6 &= {0,2,4,6,8,10,12,14,16,18 } \
    D_7 &= {0,2,4,6,8,10,12,14,16,18,20,22,24 }
    end{align*}
    $$



    It's also easy to show that $D_n subseteq D_{n+1}$ and that ${0,2, ldots, 2 cdot (n-1) } subseteq D_{n+1}$ (for all $n$). However, I'm not sure where the extra values in the steps $3 mapsto 4$, $4 mapsto 5$, $5 mapsto 6$, $6 mapsto 7$ come from.






    share|cite|improve this answer



















    • 1




      If you take the difference between the identity and "reverse" permutations you get a value of $2n^2 in D_{2n}$ and $2n(n+1) in D_{2n+1}$ which seems to match the maximum values you got.
      – Daniel Schepler
      Nov 15 at 0:13










    • The maximum value is OEIS A007590
      – Surb
      Nov 15 at 7:24

















    up vote
    2
    down vote



    +25










    This is not an answer but too long for a comment:



    Let $D_n$ be the range of $d$ under $S_n$. A quick and dirty implementation in python



    import itertools
    n = 4
    domain = range(1, n+1)
    perm = list(itertools.permutations(domain))
    values = set()

    for i in perm:
    for j in perm:
    x = 0
    for k in range (0, n):
    x += abs(i[k] -j[k])
    values.add(x)

    return values


    yields that
    $$
    begin{align*}
    D_1 &= {0} \
    D_2 &= {0,2 } \
    D_3 &= {0,2,4 } \
    D_4 &= {0,2,4, 6, 8} \
    D_5 &= {0,2,4,6,8,10,12 } \
    D_6 &= {0,2,4,6,8,10,12,14,16,18 } \
    D_7 &= {0,2,4,6,8,10,12,14,16,18,20,22,24 }
    end{align*}
    $$



    It's also easy to show that $D_n subseteq D_{n+1}$ and that ${0,2, ldots, 2 cdot (n-1) } subseteq D_{n+1}$ (for all $n$). However, I'm not sure where the extra values in the steps $3 mapsto 4$, $4 mapsto 5$, $5 mapsto 6$, $6 mapsto 7$ come from.






    share|cite|improve this answer



















    • 1




      If you take the difference between the identity and "reverse" permutations you get a value of $2n^2 in D_{2n}$ and $2n(n+1) in D_{2n+1}$ which seems to match the maximum values you got.
      – Daniel Schepler
      Nov 15 at 0:13










    • The maximum value is OEIS A007590
      – Surb
      Nov 15 at 7:24















    up vote
    2
    down vote



    +25







    up vote
    2
    down vote



    +25




    +25




    This is not an answer but too long for a comment:



    Let $D_n$ be the range of $d$ under $S_n$. A quick and dirty implementation in python



    import itertools
    n = 4
    domain = range(1, n+1)
    perm = list(itertools.permutations(domain))
    values = set()

    for i in perm:
    for j in perm:
    x = 0
    for k in range (0, n):
    x += abs(i[k] -j[k])
    values.add(x)

    return values


    yields that
    $$
    begin{align*}
    D_1 &= {0} \
    D_2 &= {0,2 } \
    D_3 &= {0,2,4 } \
    D_4 &= {0,2,4, 6, 8} \
    D_5 &= {0,2,4,6,8,10,12 } \
    D_6 &= {0,2,4,6,8,10,12,14,16,18 } \
    D_7 &= {0,2,4,6,8,10,12,14,16,18,20,22,24 }
    end{align*}
    $$



    It's also easy to show that $D_n subseteq D_{n+1}$ and that ${0,2, ldots, 2 cdot (n-1) } subseteq D_{n+1}$ (for all $n$). However, I'm not sure where the extra values in the steps $3 mapsto 4$, $4 mapsto 5$, $5 mapsto 6$, $6 mapsto 7$ come from.






    share|cite|improve this answer














    This is not an answer but too long for a comment:



    Let $D_n$ be the range of $d$ under $S_n$. A quick and dirty implementation in python



    import itertools
    n = 4
    domain = range(1, n+1)
    perm = list(itertools.permutations(domain))
    values = set()

    for i in perm:
    for j in perm:
    x = 0
    for k in range (0, n):
    x += abs(i[k] -j[k])
    values.add(x)

    return values


    yields that
    $$
    begin{align*}
    D_1 &= {0} \
    D_2 &= {0,2 } \
    D_3 &= {0,2,4 } \
    D_4 &= {0,2,4, 6, 8} \
    D_5 &= {0,2,4,6,8,10,12 } \
    D_6 &= {0,2,4,6,8,10,12,14,16,18 } \
    D_7 &= {0,2,4,6,8,10,12,14,16,18,20,22,24 }
    end{align*}
    $$



    It's also easy to show that $D_n subseteq D_{n+1}$ and that ${0,2, ldots, 2 cdot (n-1) } subseteq D_{n+1}$ (for all $n$). However, I'm not sure where the extra values in the steps $3 mapsto 4$, $4 mapsto 5$, $5 mapsto 6$, $6 mapsto 7$ come from.







    share|cite|improve this answer














    share|cite|improve this answer



    share|cite|improve this answer








    edited Nov 14 at 23:57

























    answered Nov 14 at 23:52









    Stefan Mesken

    14.4k32046




    14.4k32046








    • 1




      If you take the difference between the identity and "reverse" permutations you get a value of $2n^2 in D_{2n}$ and $2n(n+1) in D_{2n+1}$ which seems to match the maximum values you got.
      – Daniel Schepler
      Nov 15 at 0:13










    • The maximum value is OEIS A007590
      – Surb
      Nov 15 at 7:24
















    • 1




      If you take the difference between the identity and "reverse" permutations you get a value of $2n^2 in D_{2n}$ and $2n(n+1) in D_{2n+1}$ which seems to match the maximum values you got.
      – Daniel Schepler
      Nov 15 at 0:13










    • The maximum value is OEIS A007590
      – Surb
      Nov 15 at 7:24










    1




    1




    If you take the difference between the identity and "reverse" permutations you get a value of $2n^2 in D_{2n}$ and $2n(n+1) in D_{2n+1}$ which seems to match the maximum values you got.
    – Daniel Schepler
    Nov 15 at 0:13




    If you take the difference between the identity and "reverse" permutations you get a value of $2n^2 in D_{2n}$ and $2n(n+1) in D_{2n+1}$ which seems to match the maximum values you got.
    – Daniel Schepler
    Nov 15 at 0:13












    The maximum value is OEIS A007590
    – Surb
    Nov 15 at 7:24






    The maximum value is OEIS A007590
    – Surb
    Nov 15 at 7:24












    up vote
    1
    down vote













    The value of $d(sigma,tau)$ can be any even integer between $0$ and $leftlfloorfrac{1}{2}n^2rightrfloor$. In fact, given an even integer $k$ within these bounds, one can explicitly construct a permutation $sigma$ with $d(sigma,Id)=k$, where $Id$ denotes the identity permutation (we will abuse the notation slightly and use the same name for all identity permutations, regardless of the value of $n$).



    We will prove this in an induction-like fashion:




    • If $nleq 2$, the problem is trivial. From now on, we'll assume $ngeq 3$.

    • If $k < 2(n-1)$, we can deduce that $kleq 2(n-1)-2$ (due to $k$ being an even integer) and a short calculation tells us that:
      $$begin{eqnarray}
      0 & leq & (n-3)^2 \
      0 & leq & (n-1)^2 - 4n + 8\
      2(n-1) - 2 & leq & frac{1}{2}(n-1)^2 \
      k & leq & leftlfloorfrac{1}{2}(n-1)^2rightrfloor \
      end{eqnarray}$$

      where the floor function could have been introduced thanks to the left-hand side of the inequality being an integer. The last inequality allows us to apply the induction hypothesis to obtain a permutation $sigma$ on $(n-1)$ elements having $d(sigma,Id)=k$ and extend it by setting $sigma(n)=n$ to obtain a permutation on $n$ elements with the desired property.

    • Finally, if $kgeq 2(n-1)$, we find a permutation $sigma'$ on $(n-2)$ elements with $d(sigma',Id)=k-2(n-1)$ by the induction hypothesis. This can be done because $$begin{eqnarray}
      k-2(n-1) & leq & leftlfloor frac{1}{2}n^2rightrfloor - 2(n-1)\
      & = & leftlfloor frac{1}{2}left(n^2 - 4n + 4right)rightrfloor\
      & = & leftlfloor frac{1}{2}left(n-2right)^2rightrfloor
      end{eqnarray}$$

      Now, we can define our permutation $sigma$ as $sigma(1)=n$, $sigma(n)=1$ and $sigma(i)=sigma'(i-1)+1$ for $1<i<n$. Doing so gives us $d(sigma,Id)=(n-1)+d(sigma',Id)+(n-1)=k$.


    This completes the proof that any even value between $0$ and $leftlfloorfrac{1}{2}n^2rightrfloor$ is a distance between some pair of permutations.



    Note that this chain of reasoning does not show that a value larger than $leftlfloorfrac{1}{2}n^2rightrfloor$ cannot be obtained by some permutation, nor that only even values are reachable; neither of which is too hard to prove.






    share|cite|improve this answer

























      up vote
      1
      down vote













      The value of $d(sigma,tau)$ can be any even integer between $0$ and $leftlfloorfrac{1}{2}n^2rightrfloor$. In fact, given an even integer $k$ within these bounds, one can explicitly construct a permutation $sigma$ with $d(sigma,Id)=k$, where $Id$ denotes the identity permutation (we will abuse the notation slightly and use the same name for all identity permutations, regardless of the value of $n$).



      We will prove this in an induction-like fashion:




      • If $nleq 2$, the problem is trivial. From now on, we'll assume $ngeq 3$.

      • If $k < 2(n-1)$, we can deduce that $kleq 2(n-1)-2$ (due to $k$ being an even integer) and a short calculation tells us that:
        $$begin{eqnarray}
        0 & leq & (n-3)^2 \
        0 & leq & (n-1)^2 - 4n + 8\
        2(n-1) - 2 & leq & frac{1}{2}(n-1)^2 \
        k & leq & leftlfloorfrac{1}{2}(n-1)^2rightrfloor \
        end{eqnarray}$$

        where the floor function could have been introduced thanks to the left-hand side of the inequality being an integer. The last inequality allows us to apply the induction hypothesis to obtain a permutation $sigma$ on $(n-1)$ elements having $d(sigma,Id)=k$ and extend it by setting $sigma(n)=n$ to obtain a permutation on $n$ elements with the desired property.

      • Finally, if $kgeq 2(n-1)$, we find a permutation $sigma'$ on $(n-2)$ elements with $d(sigma',Id)=k-2(n-1)$ by the induction hypothesis. This can be done because $$begin{eqnarray}
        k-2(n-1) & leq & leftlfloor frac{1}{2}n^2rightrfloor - 2(n-1)\
        & = & leftlfloor frac{1}{2}left(n^2 - 4n + 4right)rightrfloor\
        & = & leftlfloor frac{1}{2}left(n-2right)^2rightrfloor
        end{eqnarray}$$

        Now, we can define our permutation $sigma$ as $sigma(1)=n$, $sigma(n)=1$ and $sigma(i)=sigma'(i-1)+1$ for $1<i<n$. Doing so gives us $d(sigma,Id)=(n-1)+d(sigma',Id)+(n-1)=k$.


      This completes the proof that any even value between $0$ and $leftlfloorfrac{1}{2}n^2rightrfloor$ is a distance between some pair of permutations.



      Note that this chain of reasoning does not show that a value larger than $leftlfloorfrac{1}{2}n^2rightrfloor$ cannot be obtained by some permutation, nor that only even values are reachable; neither of which is too hard to prove.






      share|cite|improve this answer























        up vote
        1
        down vote










        up vote
        1
        down vote









        The value of $d(sigma,tau)$ can be any even integer between $0$ and $leftlfloorfrac{1}{2}n^2rightrfloor$. In fact, given an even integer $k$ within these bounds, one can explicitly construct a permutation $sigma$ with $d(sigma,Id)=k$, where $Id$ denotes the identity permutation (we will abuse the notation slightly and use the same name for all identity permutations, regardless of the value of $n$).



        We will prove this in an induction-like fashion:




        • If $nleq 2$, the problem is trivial. From now on, we'll assume $ngeq 3$.

        • If $k < 2(n-1)$, we can deduce that $kleq 2(n-1)-2$ (due to $k$ being an even integer) and a short calculation tells us that:
          $$begin{eqnarray}
          0 & leq & (n-3)^2 \
          0 & leq & (n-1)^2 - 4n + 8\
          2(n-1) - 2 & leq & frac{1}{2}(n-1)^2 \
          k & leq & leftlfloorfrac{1}{2}(n-1)^2rightrfloor \
          end{eqnarray}$$

          where the floor function could have been introduced thanks to the left-hand side of the inequality being an integer. The last inequality allows us to apply the induction hypothesis to obtain a permutation $sigma$ on $(n-1)$ elements having $d(sigma,Id)=k$ and extend it by setting $sigma(n)=n$ to obtain a permutation on $n$ elements with the desired property.

        • Finally, if $kgeq 2(n-1)$, we find a permutation $sigma'$ on $(n-2)$ elements with $d(sigma',Id)=k-2(n-1)$ by the induction hypothesis. This can be done because $$begin{eqnarray}
          k-2(n-1) & leq & leftlfloor frac{1}{2}n^2rightrfloor - 2(n-1)\
          & = & leftlfloor frac{1}{2}left(n^2 - 4n + 4right)rightrfloor\
          & = & leftlfloor frac{1}{2}left(n-2right)^2rightrfloor
          end{eqnarray}$$

          Now, we can define our permutation $sigma$ as $sigma(1)=n$, $sigma(n)=1$ and $sigma(i)=sigma'(i-1)+1$ for $1<i<n$. Doing so gives us $d(sigma,Id)=(n-1)+d(sigma',Id)+(n-1)=k$.


        This completes the proof that any even value between $0$ and $leftlfloorfrac{1}{2}n^2rightrfloor$ is a distance between some pair of permutations.



        Note that this chain of reasoning does not show that a value larger than $leftlfloorfrac{1}{2}n^2rightrfloor$ cannot be obtained by some permutation, nor that only even values are reachable; neither of which is too hard to prove.






        share|cite|improve this answer












        The value of $d(sigma,tau)$ can be any even integer between $0$ and $leftlfloorfrac{1}{2}n^2rightrfloor$. In fact, given an even integer $k$ within these bounds, one can explicitly construct a permutation $sigma$ with $d(sigma,Id)=k$, where $Id$ denotes the identity permutation (we will abuse the notation slightly and use the same name for all identity permutations, regardless of the value of $n$).



        We will prove this in an induction-like fashion:




        • If $nleq 2$, the problem is trivial. From now on, we'll assume $ngeq 3$.

        • If $k < 2(n-1)$, we can deduce that $kleq 2(n-1)-2$ (due to $k$ being an even integer) and a short calculation tells us that:
          $$begin{eqnarray}
          0 & leq & (n-3)^2 \
          0 & leq & (n-1)^2 - 4n + 8\
          2(n-1) - 2 & leq & frac{1}{2}(n-1)^2 \
          k & leq & leftlfloorfrac{1}{2}(n-1)^2rightrfloor \
          end{eqnarray}$$

          where the floor function could have been introduced thanks to the left-hand side of the inequality being an integer. The last inequality allows us to apply the induction hypothesis to obtain a permutation $sigma$ on $(n-1)$ elements having $d(sigma,Id)=k$ and extend it by setting $sigma(n)=n$ to obtain a permutation on $n$ elements with the desired property.

        • Finally, if $kgeq 2(n-1)$, we find a permutation $sigma'$ on $(n-2)$ elements with $d(sigma',Id)=k-2(n-1)$ by the induction hypothesis. This can be done because $$begin{eqnarray}
          k-2(n-1) & leq & leftlfloor frac{1}{2}n^2rightrfloor - 2(n-1)\
          & = & leftlfloor frac{1}{2}left(n^2 - 4n + 4right)rightrfloor\
          & = & leftlfloor frac{1}{2}left(n-2right)^2rightrfloor
          end{eqnarray}$$

          Now, we can define our permutation $sigma$ as $sigma(1)=n$, $sigma(n)=1$ and $sigma(i)=sigma'(i-1)+1$ for $1<i<n$. Doing so gives us $d(sigma,Id)=(n-1)+d(sigma',Id)+(n-1)=k$.


        This completes the proof that any even value between $0$ and $leftlfloorfrac{1}{2}n^2rightrfloor$ is a distance between some pair of permutations.



        Note that this chain of reasoning does not show that a value larger than $leftlfloorfrac{1}{2}n^2rightrfloor$ cannot be obtained by some permutation, nor that only even values are reachable; neither of which is too hard to prove.







        share|cite|improve this answer












        share|cite|improve this answer



        share|cite|improve this answer










        answered Nov 18 at 16:07









        Peter Košinár

        8,10111433




        8,10111433






























             

            draft saved


            draft discarded



















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2469241%2fmetric-d-sigma-tau-in-s-n%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Plaza Victoria

            In PowerPoint, is there a keyboard shortcut for bulleted / numbered list?

            How to put 3 figures in Latex with 2 figures side by side and 1 below these side by side images but in...