does this function fail to be a metric because the triangle inequality does not hold?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
2
down vote

favorite












given the function



$d:0,1^Bbb N times 0,1^Bbb N rightarrow Bbb R_0^+ $



$d(a,b):= beginBmatrix 0 &if&a=b\frac1mina_kneq b_k & if & ane b endBmatrix$



Now we are given in the definition of d that d(a,b)=0 iff a=b and we also know that $frac1mina_k neq b_k >0$. So condition one is satisfied.



next if a=b then d(a,b)=0=d(b,a)



and if $aneq b$ then $d(a,b)=frac1min a_k neq b_k=frac1min b_k neq a_k=d(b,a)$



But finally I don't think it satisfies the triangle inequality, because



$d(a,c)leq d(a,b)+d(b,c)$ implies that $frac1minkin Bbb N leqfrac1minqin Bbb N + frac1minpin Bbb N $



but if the minimum k was 1 , and the minimum p and q were say 4 then we would have $1 leq 0.5$ which is not true ....is this correct ?







share|cite|improve this question



















  • The minimum $p$ and $q$ cannot both be 4 when the minimum $k$ is 1. Do you see why? If not, try to give explicit examples of $a, b, c$ to see where your idea goes wrong.
    – Mees de Vries
    Aug 6 at 14:09











  • @MeesdeVries we could say that a=n , b=1/n and c=1+n , then k =1 ,q= 2 and p=1. so then $d(a,c)leq d(a,b)+d(b,c)$ I'm confused however as to how to show this generally ?
    – exodius
    Aug 6 at 14:18














up vote
2
down vote

favorite












given the function



$d:0,1^Bbb N times 0,1^Bbb N rightarrow Bbb R_0^+ $



$d(a,b):= beginBmatrix 0 &if&a=b\frac1mina_kneq b_k & if & ane b endBmatrix$



Now we are given in the definition of d that d(a,b)=0 iff a=b and we also know that $frac1mina_k neq b_k >0$. So condition one is satisfied.



next if a=b then d(a,b)=0=d(b,a)



and if $aneq b$ then $d(a,b)=frac1min a_k neq b_k=frac1min b_k neq a_k=d(b,a)$



But finally I don't think it satisfies the triangle inequality, because



$d(a,c)leq d(a,b)+d(b,c)$ implies that $frac1minkin Bbb N leqfrac1minqin Bbb N + frac1minpin Bbb N $



but if the minimum k was 1 , and the minimum p and q were say 4 then we would have $1 leq 0.5$ which is not true ....is this correct ?







share|cite|improve this question



















  • The minimum $p$ and $q$ cannot both be 4 when the minimum $k$ is 1. Do you see why? If not, try to give explicit examples of $a, b, c$ to see where your idea goes wrong.
    – Mees de Vries
    Aug 6 at 14:09











  • @MeesdeVries we could say that a=n , b=1/n and c=1+n , then k =1 ,q= 2 and p=1. so then $d(a,c)leq d(a,b)+d(b,c)$ I'm confused however as to how to show this generally ?
    – exodius
    Aug 6 at 14:18












up vote
2
down vote

favorite









up vote
2
down vote

favorite











given the function



$d:0,1^Bbb N times 0,1^Bbb N rightarrow Bbb R_0^+ $



$d(a,b):= beginBmatrix 0 &if&a=b\frac1mina_kneq b_k & if & ane b endBmatrix$



Now we are given in the definition of d that d(a,b)=0 iff a=b and we also know that $frac1mina_k neq b_k >0$. So condition one is satisfied.



next if a=b then d(a,b)=0=d(b,a)



and if $aneq b$ then $d(a,b)=frac1min a_k neq b_k=frac1min b_k neq a_k=d(b,a)$



But finally I don't think it satisfies the triangle inequality, because



$d(a,c)leq d(a,b)+d(b,c)$ implies that $frac1minkin Bbb N leqfrac1minqin Bbb N + frac1minpin Bbb N $



but if the minimum k was 1 , and the minimum p and q were say 4 then we would have $1 leq 0.5$ which is not true ....is this correct ?







share|cite|improve this question











given the function



$d:0,1^Bbb N times 0,1^Bbb N rightarrow Bbb R_0^+ $



$d(a,b):= beginBmatrix 0 &if&a=b\frac1mina_kneq b_k & if & ane b endBmatrix$



Now we are given in the definition of d that d(a,b)=0 iff a=b and we also know that $frac1mina_k neq b_k >0$. So condition one is satisfied.



next if a=b then d(a,b)=0=d(b,a)



and if $aneq b$ then $d(a,b)=frac1min a_k neq b_k=frac1min b_k neq a_k=d(b,a)$



But finally I don't think it satisfies the triangle inequality, because



$d(a,c)leq d(a,b)+d(b,c)$ implies that $frac1minkin Bbb N leqfrac1minqin Bbb N + frac1minpin Bbb N $



but if the minimum k was 1 , and the minimum p and q were say 4 then we would have $1 leq 0.5$ which is not true ....is this correct ?









share|cite|improve this question










share|cite|improve this question




share|cite|improve this question









asked Aug 6 at 14:03









exodius

772315




772315











  • The minimum $p$ and $q$ cannot both be 4 when the minimum $k$ is 1. Do you see why? If not, try to give explicit examples of $a, b, c$ to see where your idea goes wrong.
    – Mees de Vries
    Aug 6 at 14:09











  • @MeesdeVries we could say that a=n , b=1/n and c=1+n , then k =1 ,q= 2 and p=1. so then $d(a,c)leq d(a,b)+d(b,c)$ I'm confused however as to how to show this generally ?
    – exodius
    Aug 6 at 14:18
















  • The minimum $p$ and $q$ cannot both be 4 when the minimum $k$ is 1. Do you see why? If not, try to give explicit examples of $a, b, c$ to see where your idea goes wrong.
    – Mees de Vries
    Aug 6 at 14:09











  • @MeesdeVries we could say that a=n , b=1/n and c=1+n , then k =1 ,q= 2 and p=1. so then $d(a,c)leq d(a,b)+d(b,c)$ I'm confused however as to how to show this generally ?
    – exodius
    Aug 6 at 14:18















The minimum $p$ and $q$ cannot both be 4 when the minimum $k$ is 1. Do you see why? If not, try to give explicit examples of $a, b, c$ to see where your idea goes wrong.
– Mees de Vries
Aug 6 at 14:09





The minimum $p$ and $q$ cannot both be 4 when the minimum $k$ is 1. Do you see why? If not, try to give explicit examples of $a, b, c$ to see where your idea goes wrong.
– Mees de Vries
Aug 6 at 14:09













@MeesdeVries we could say that a=n , b=1/n and c=1+n , then k =1 ,q= 2 and p=1. so then $d(a,c)leq d(a,b)+d(b,c)$ I'm confused however as to how to show this generally ?
– exodius
Aug 6 at 14:18




@MeesdeVries we could say that a=n , b=1/n and c=1+n , then k =1 ,q= 2 and p=1. so then $d(a,c)leq d(a,b)+d(b,c)$ I'm confused however as to how to show this generally ?
– exodius
Aug 6 at 14:18










2 Answers
2






active

oldest

votes

















up vote
3
down vote



accepted










Let me prove the triangle inequality just in the special case that $a,b,c$ are all different from each other (the case where two of them are equal, or where all three are equal, is easy).



First let's evaluate the left hand side of the triangle inequality: let $K = mink in mathbb N mid a_k ne c_k$, so $d(a,c)=frac1K$.



Notice that $a_K ne c_K$. As a consequence of this, it is not possible that both of the equations $a_K = b_K$ and $b_K = c_K$ are true: at least one of those two equations must be an inequality, $a_K ne b_K$ or $b_K ne c_K$. Therefore, at least one of the two numbers $Q = minq in mathbb N mid a_q ne b_q$ or $P = minp in mathbb N mid b_p = c_p$ must be less than or equal to $K$.



It follows that $d(a,c)=frac1K$ is less than or equal to at least one of the two numbers $frac1Q$ or $frac1P$, so $d(a,c)$ must be less than or equal to their sum $frac1Q + frac1P$, which proves that
$$d(a,c) le d(a,b) + d(b,c)
$$






share|cite|improve this answer




























    up vote
    0
    down vote













    Let $a,c in 0,1^mathbb N$. Suppose $a_i = c_i$ for all $i leq l-1$ and $a_l neq c_l$. Note that the inequality is obvious if $a=c$, since $d$ is non-negative.



    Now let $b$ be any other sequence in $0,1^mathbb N$. Then, since $a_l neq c_l$, we see that either $b_l neq a_l$ or $b_l neq c_l$ must happen. Consequently, $d(a,b) geq frac 1l$ or $d(a,c) geq frac 1l$ must happen. By the fact that $d$ is non-negative, we get $d(a,b)+ d(b,c) geq frac 1l = d(a,c)$.






    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: false,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      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%2f2873898%2fdoes-this-function-fail-to-be-a-metric-because-the-triangle-inequality-does-not%23new-answer', 'question_page');

      );

      Post as a guest






























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      3
      down vote



      accepted










      Let me prove the triangle inequality just in the special case that $a,b,c$ are all different from each other (the case where two of them are equal, or where all three are equal, is easy).



      First let's evaluate the left hand side of the triangle inequality: let $K = mink in mathbb N mid a_k ne c_k$, so $d(a,c)=frac1K$.



      Notice that $a_K ne c_K$. As a consequence of this, it is not possible that both of the equations $a_K = b_K$ and $b_K = c_K$ are true: at least one of those two equations must be an inequality, $a_K ne b_K$ or $b_K ne c_K$. Therefore, at least one of the two numbers $Q = minq in mathbb N mid a_q ne b_q$ or $P = minp in mathbb N mid b_p = c_p$ must be less than or equal to $K$.



      It follows that $d(a,c)=frac1K$ is less than or equal to at least one of the two numbers $frac1Q$ or $frac1P$, so $d(a,c)$ must be less than or equal to their sum $frac1Q + frac1P$, which proves that
      $$d(a,c) le d(a,b) + d(b,c)
      $$






      share|cite|improve this answer

























        up vote
        3
        down vote



        accepted










        Let me prove the triangle inequality just in the special case that $a,b,c$ are all different from each other (the case where two of them are equal, or where all three are equal, is easy).



        First let's evaluate the left hand side of the triangle inequality: let $K = mink in mathbb N mid a_k ne c_k$, so $d(a,c)=frac1K$.



        Notice that $a_K ne c_K$. As a consequence of this, it is not possible that both of the equations $a_K = b_K$ and $b_K = c_K$ are true: at least one of those two equations must be an inequality, $a_K ne b_K$ or $b_K ne c_K$. Therefore, at least one of the two numbers $Q = minq in mathbb N mid a_q ne b_q$ or $P = minp in mathbb N mid b_p = c_p$ must be less than or equal to $K$.



        It follows that $d(a,c)=frac1K$ is less than or equal to at least one of the two numbers $frac1Q$ or $frac1P$, so $d(a,c)$ must be less than or equal to their sum $frac1Q + frac1P$, which proves that
        $$d(a,c) le d(a,b) + d(b,c)
        $$






        share|cite|improve this answer























          up vote
          3
          down vote



          accepted







          up vote
          3
          down vote



          accepted






          Let me prove the triangle inequality just in the special case that $a,b,c$ are all different from each other (the case where two of them are equal, or where all three are equal, is easy).



          First let's evaluate the left hand side of the triangle inequality: let $K = mink in mathbb N mid a_k ne c_k$, so $d(a,c)=frac1K$.



          Notice that $a_K ne c_K$. As a consequence of this, it is not possible that both of the equations $a_K = b_K$ and $b_K = c_K$ are true: at least one of those two equations must be an inequality, $a_K ne b_K$ or $b_K ne c_K$. Therefore, at least one of the two numbers $Q = minq in mathbb N mid a_q ne b_q$ or $P = minp in mathbb N mid b_p = c_p$ must be less than or equal to $K$.



          It follows that $d(a,c)=frac1K$ is less than or equal to at least one of the two numbers $frac1Q$ or $frac1P$, so $d(a,c)$ must be less than or equal to their sum $frac1Q + frac1P$, which proves that
          $$d(a,c) le d(a,b) + d(b,c)
          $$






          share|cite|improve this answer













          Let me prove the triangle inequality just in the special case that $a,b,c$ are all different from each other (the case where two of them are equal, or where all three are equal, is easy).



          First let's evaluate the left hand side of the triangle inequality: let $K = mink in mathbb N mid a_k ne c_k$, so $d(a,c)=frac1K$.



          Notice that $a_K ne c_K$. As a consequence of this, it is not possible that both of the equations $a_K = b_K$ and $b_K = c_K$ are true: at least one of those two equations must be an inequality, $a_K ne b_K$ or $b_K ne c_K$. Therefore, at least one of the two numbers $Q = minq in mathbb N mid a_q ne b_q$ or $P = minp in mathbb N mid b_p = c_p$ must be less than or equal to $K$.



          It follows that $d(a,c)=frac1K$ is less than or equal to at least one of the two numbers $frac1Q$ or $frac1P$, so $d(a,c)$ must be less than or equal to their sum $frac1Q + frac1P$, which proves that
          $$d(a,c) le d(a,b) + d(b,c)
          $$







          share|cite|improve this answer













          share|cite|improve this answer



          share|cite|improve this answer











          answered Aug 6 at 14:37









          Lee Mosher

          45.7k33478




          45.7k33478




















              up vote
              0
              down vote













              Let $a,c in 0,1^mathbb N$. Suppose $a_i = c_i$ for all $i leq l-1$ and $a_l neq c_l$. Note that the inequality is obvious if $a=c$, since $d$ is non-negative.



              Now let $b$ be any other sequence in $0,1^mathbb N$. Then, since $a_l neq c_l$, we see that either $b_l neq a_l$ or $b_l neq c_l$ must happen. Consequently, $d(a,b) geq frac 1l$ or $d(a,c) geq frac 1l$ must happen. By the fact that $d$ is non-negative, we get $d(a,b)+ d(b,c) geq frac 1l = d(a,c)$.






              share|cite|improve this answer

























                up vote
                0
                down vote













                Let $a,c in 0,1^mathbb N$. Suppose $a_i = c_i$ for all $i leq l-1$ and $a_l neq c_l$. Note that the inequality is obvious if $a=c$, since $d$ is non-negative.



                Now let $b$ be any other sequence in $0,1^mathbb N$. Then, since $a_l neq c_l$, we see that either $b_l neq a_l$ or $b_l neq c_l$ must happen. Consequently, $d(a,b) geq frac 1l$ or $d(a,c) geq frac 1l$ must happen. By the fact that $d$ is non-negative, we get $d(a,b)+ d(b,c) geq frac 1l = d(a,c)$.






                share|cite|improve this answer























                  up vote
                  0
                  down vote










                  up vote
                  0
                  down vote









                  Let $a,c in 0,1^mathbb N$. Suppose $a_i = c_i$ for all $i leq l-1$ and $a_l neq c_l$. Note that the inequality is obvious if $a=c$, since $d$ is non-negative.



                  Now let $b$ be any other sequence in $0,1^mathbb N$. Then, since $a_l neq c_l$, we see that either $b_l neq a_l$ or $b_l neq c_l$ must happen. Consequently, $d(a,b) geq frac 1l$ or $d(a,c) geq frac 1l$ must happen. By the fact that $d$ is non-negative, we get $d(a,b)+ d(b,c) geq frac 1l = d(a,c)$.






                  share|cite|improve this answer













                  Let $a,c in 0,1^mathbb N$. Suppose $a_i = c_i$ for all $i leq l-1$ and $a_l neq c_l$. Note that the inequality is obvious if $a=c$, since $d$ is non-negative.



                  Now let $b$ be any other sequence in $0,1^mathbb N$. Then, since $a_l neq c_l$, we see that either $b_l neq a_l$ or $b_l neq c_l$ must happen. Consequently, $d(a,b) geq frac 1l$ or $d(a,c) geq frac 1l$ must happen. By the fact that $d$ is non-negative, we get $d(a,b)+ d(b,c) geq frac 1l = d(a,c)$.







                  share|cite|improve this answer













                  share|cite|improve this answer



                  share|cite|improve this answer











                  answered Aug 6 at 14:43









                  астон вілла олоф мэллбэрг

                  32k22463




                  32k22463






















                       

                      draft saved


                      draft discarded


























                       


                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2873898%2fdoes-this-function-fail-to-be-a-metric-because-the-triangle-inequality-does-not%23new-answer', 'question_page');

                      );

                      Post as a guest













































































                      Comments

                      Popular posts from this blog

                      What is the equation of a 3D cone with generalised tilt?

                      Color the edges and diagonals of a regular polygon

                      Relationship between determinant of matrix and determinant of adjoint?