Minimum distance between sequence a and all permutations of another sequence b












2












$begingroup$


Let $a$ and $b$ be finite sequences of length $n$, i.e. $a=(a_1,a_2,...,a_n), b=(b_1,b_2,...,b_n)$. I want to calculate the minimum of the distances (in an Lp norm) between $a$ and all permutations of $b$. Let $Pi_n$ be the space of all permutations of $n$ numbers, then I am looking for



$d = text{min}_{piinPi_n} ||a - (b_{pi(1)},b_{pi(2)},...,b_{pi(n)})||_p$



Is there an efficient method or optimization algorithm (something better than trying out all $n!$ permutations of b) to calculate $d$ and find the corresponding permutation $pi$?










share|cite|improve this question









$endgroup$








  • 4




    $begingroup$
    You might find this question helpful! stackoverflow.com/questions/54041397/…
    $endgroup$
    – Calvin Godfrey
    Jan 4 at 19:55










  • $begingroup$
    Calvin's linked post answers your question for $p=2$. I suspect that for any $L_p$ norm, the answer will be the same.
    $endgroup$
    – Omnomnomnom
    Jan 4 at 20:03






  • 1




    $begingroup$
    @Omnomnomnom I strongly doubt that. They are clearly not identical for the $L_infty$ norm.
    $endgroup$
    – LinAlg
    Jan 4 at 20:04






  • 1




    $begingroup$
    @LinAlg I don't think I see what you mean. Is there an example of a list $b$ sorted in ascending order, and a list $a$ such that you can do better than putting $a$ in ascending order?
    $endgroup$
    – Omnomnomnom
    Jan 4 at 20:11










  • $begingroup$
    thanks - and it's funny that the same question got asked (almost) at the same time!
    $endgroup$
    – appletree
    Jan 5 at 12:26
















2












$begingroup$


Let $a$ and $b$ be finite sequences of length $n$, i.e. $a=(a_1,a_2,...,a_n), b=(b_1,b_2,...,b_n)$. I want to calculate the minimum of the distances (in an Lp norm) between $a$ and all permutations of $b$. Let $Pi_n$ be the space of all permutations of $n$ numbers, then I am looking for



$d = text{min}_{piinPi_n} ||a - (b_{pi(1)},b_{pi(2)},...,b_{pi(n)})||_p$



Is there an efficient method or optimization algorithm (something better than trying out all $n!$ permutations of b) to calculate $d$ and find the corresponding permutation $pi$?










share|cite|improve this question









$endgroup$








  • 4




    $begingroup$
    You might find this question helpful! stackoverflow.com/questions/54041397/…
    $endgroup$
    – Calvin Godfrey
    Jan 4 at 19:55










  • $begingroup$
    Calvin's linked post answers your question for $p=2$. I suspect that for any $L_p$ norm, the answer will be the same.
    $endgroup$
    – Omnomnomnom
    Jan 4 at 20:03






  • 1




    $begingroup$
    @Omnomnomnom I strongly doubt that. They are clearly not identical for the $L_infty$ norm.
    $endgroup$
    – LinAlg
    Jan 4 at 20:04






  • 1




    $begingroup$
    @LinAlg I don't think I see what you mean. Is there an example of a list $b$ sorted in ascending order, and a list $a$ such that you can do better than putting $a$ in ascending order?
    $endgroup$
    – Omnomnomnom
    Jan 4 at 20:11










  • $begingroup$
    thanks - and it's funny that the same question got asked (almost) at the same time!
    $endgroup$
    – appletree
    Jan 5 at 12:26














2












2








2


0



$begingroup$


Let $a$ and $b$ be finite sequences of length $n$, i.e. $a=(a_1,a_2,...,a_n), b=(b_1,b_2,...,b_n)$. I want to calculate the minimum of the distances (in an Lp norm) between $a$ and all permutations of $b$. Let $Pi_n$ be the space of all permutations of $n$ numbers, then I am looking for



$d = text{min}_{piinPi_n} ||a - (b_{pi(1)},b_{pi(2)},...,b_{pi(n)})||_p$



Is there an efficient method or optimization algorithm (something better than trying out all $n!$ permutations of b) to calculate $d$ and find the corresponding permutation $pi$?










share|cite|improve this question









$endgroup$




Let $a$ and $b$ be finite sequences of length $n$, i.e. $a=(a_1,a_2,...,a_n), b=(b_1,b_2,...,b_n)$. I want to calculate the minimum of the distances (in an Lp norm) between $a$ and all permutations of $b$. Let $Pi_n$ be the space of all permutations of $n$ numbers, then I am looking for



$d = text{min}_{piinPi_n} ||a - (b_{pi(1)},b_{pi(2)},...,b_{pi(n)})||_p$



Is there an efficient method or optimization algorithm (something better than trying out all $n!$ permutations of b) to calculate $d$ and find the corresponding permutation $pi$?







linear-algebra combinatorics optimization combinations discrete-optimization






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Jan 4 at 19:48









appletreeappletree

283




283








  • 4




    $begingroup$
    You might find this question helpful! stackoverflow.com/questions/54041397/…
    $endgroup$
    – Calvin Godfrey
    Jan 4 at 19:55










  • $begingroup$
    Calvin's linked post answers your question for $p=2$. I suspect that for any $L_p$ norm, the answer will be the same.
    $endgroup$
    – Omnomnomnom
    Jan 4 at 20:03






  • 1




    $begingroup$
    @Omnomnomnom I strongly doubt that. They are clearly not identical for the $L_infty$ norm.
    $endgroup$
    – LinAlg
    Jan 4 at 20:04






  • 1




    $begingroup$
    @LinAlg I don't think I see what you mean. Is there an example of a list $b$ sorted in ascending order, and a list $a$ such that you can do better than putting $a$ in ascending order?
    $endgroup$
    – Omnomnomnom
    Jan 4 at 20:11










  • $begingroup$
    thanks - and it's funny that the same question got asked (almost) at the same time!
    $endgroup$
    – appletree
    Jan 5 at 12:26














  • 4




    $begingroup$
    You might find this question helpful! stackoverflow.com/questions/54041397/…
    $endgroup$
    – Calvin Godfrey
    Jan 4 at 19:55










  • $begingroup$
    Calvin's linked post answers your question for $p=2$. I suspect that for any $L_p$ norm, the answer will be the same.
    $endgroup$
    – Omnomnomnom
    Jan 4 at 20:03






  • 1




    $begingroup$
    @Omnomnomnom I strongly doubt that. They are clearly not identical for the $L_infty$ norm.
    $endgroup$
    – LinAlg
    Jan 4 at 20:04






  • 1




    $begingroup$
    @LinAlg I don't think I see what you mean. Is there an example of a list $b$ sorted in ascending order, and a list $a$ such that you can do better than putting $a$ in ascending order?
    $endgroup$
    – Omnomnomnom
    Jan 4 at 20:11










  • $begingroup$
    thanks - and it's funny that the same question got asked (almost) at the same time!
    $endgroup$
    – appletree
    Jan 5 at 12:26








4




4




$begingroup$
You might find this question helpful! stackoverflow.com/questions/54041397/…
$endgroup$
– Calvin Godfrey
Jan 4 at 19:55




$begingroup$
You might find this question helpful! stackoverflow.com/questions/54041397/…
$endgroup$
– Calvin Godfrey
Jan 4 at 19:55












$begingroup$
Calvin's linked post answers your question for $p=2$. I suspect that for any $L_p$ norm, the answer will be the same.
$endgroup$
– Omnomnomnom
Jan 4 at 20:03




$begingroup$
Calvin's linked post answers your question for $p=2$. I suspect that for any $L_p$ norm, the answer will be the same.
$endgroup$
– Omnomnomnom
Jan 4 at 20:03




1




1




$begingroup$
@Omnomnomnom I strongly doubt that. They are clearly not identical for the $L_infty$ norm.
$endgroup$
– LinAlg
Jan 4 at 20:04




$begingroup$
@Omnomnomnom I strongly doubt that. They are clearly not identical for the $L_infty$ norm.
$endgroup$
– LinAlg
Jan 4 at 20:04




1




1




$begingroup$
@LinAlg I don't think I see what you mean. Is there an example of a list $b$ sorted in ascending order, and a list $a$ such that you can do better than putting $a$ in ascending order?
$endgroup$
– Omnomnomnom
Jan 4 at 20:11




$begingroup$
@LinAlg I don't think I see what you mean. Is there an example of a list $b$ sorted in ascending order, and a list $a$ such that you can do better than putting $a$ in ascending order?
$endgroup$
– Omnomnomnom
Jan 4 at 20:11












$begingroup$
thanks - and it's funny that the same question got asked (almost) at the same time!
$endgroup$
– appletree
Jan 5 at 12:26




$begingroup$
thanks - and it's funny that the same question got asked (almost) at the same time!
$endgroup$
– appletree
Jan 5 at 12:26










2 Answers
2






active

oldest

votes


















2












$begingroup$

If $pge 1$, then the minimum is attained by rearranging $b$ so that it is "order isomorphic" to $a$, meaning that $b_i-b_j$ has the same sign as $a_i-a_j$ for all $i,j$. To see this, suppose that $a_i<a_j$ and $b_i<b_j$. Using the convexity of the function $f(x)=|x|^p$, you can show that
$$
|a_i-b_i|^p+|a_j-b_j|^ple |a_i-b_j|^p+|a_j-b_i|^p
$$

Therefore, if $a_i$ is matched with $b_j$ and $a_j$ with $b_i$, it is more efficient to swap $b_i$ and $b_j$. This means if $b$ is optimal, it must have no such out-of-order matching.



When $p<1$, the function $|x^p|$ is no longer convex, so the same local swapping rule does not always hold. In fact, it is sometimes reversed. Here are some observations:




  • If $a_1<a_2<b_1<b_2$, then it is more efficient to match $a_1$ with $b_2$ and $a_2$ with $b_1$ (this is the opposite of the $pge 1$ case).


  • If $a_1<b_1<b_2<a_2$, then it is more efficient to match $a_1$ with $b_1$ and $a_2 $ with $b_2$ (this is the same as the $pge 1$ case).


  • If $a_1<b_1<a_2<b_2$, then the optimal matching depends on the values of $a_1,a_2,b_1$ and $b_2$. For example, when $a_2-b_1$ is very small, it is optimal to pair $a_1$ with $b_2$, but as $a_2-b_1$ increases to $infty$ while $b_1-a_1$ and $b_2-a_2$ remain constant, then eventually the opposite matching is better.



I am not sure if these observations translate into an algorithm.






share|cite|improve this answer









$endgroup$













  • $begingroup$
    These observations translate into the same algorithm given on the linked page for $p=2$ (from Ivo's answer)
    $endgroup$
    – Omnomnomnom
    Jan 5 at 20:03










  • $begingroup$
    That is, the algorithm works for $p in [1,infty]$
    $endgroup$
    – Omnomnomnom
    Jan 5 at 20:21



















1












$begingroup$

An attempt to prove the inequality from Mike's answer. Feel free to correct this proof or fill in any gaps; I suspect that it's flawed.






Claim: if $a_1<a_2$ and $b_1<b_2$ are positive reals and $f$ is a non-negative, increasing, convex function over $[0,infty)$, then
$$
f(|a_1 - b_1|) + f(|a_2 - b_2|) leq f(|a_1 - b_2|) + f(|a_2 - b_1|)
$$




Proof: We note that $g(x) = f(|x|)$ is convex over $Bbb R$. So, for any $k>0$ and $a,b in Bbb R$, we have
$$
f(a - k) + f(b+k) geq f(a) + f(b)
$$

(This step seems shaky. I think this holds if $aleq b$ but not in general, which means that perhaps the rest of the proof needs to be broken into several cases)



It follows that
$$
f(|a_1 - b_2|) + f(|a_2 - b_1|) = \
f(|(a_1 - b_1) - (b_2 - b_1)|) + f(|(a_2 - b_2) + (b_2 - b_1)|) =\
g((a_1 - b_1) - (b_2 - b_1)) + g((a_2 - b_2) + (b_2 - b_1)) geq\
g(a_1 - b_1) + g(a_2 - b_2) = \
f(|a_1 - b_1|) + f(|a_2 - b_2|)
$$

as desired.






share|cite|improve this answer











$endgroup$









  • 1




    $begingroup$
    It holds for $a le b$ indeed (for $a>b$ the opposite holds). Proof: $exists tin(0,1): t(a-k) + (1-t) (b+k) = a$. Multiply by -1, add (a-k) and (b+k) then for the same $t$ we have $(1-t)(a-k) + t(b+k)=b$. Then due to convexity, $f(a)le tf(a-k) + (1-t) f(b+k)$ and $f(b)le (1-t) f(a-k) + t f(b+k)$. Summing both inequalities gives your inequality.
    $endgroup$
    – appletree
    Jan 5 at 23:21













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',
autoActivateHeartbeat: false,
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%2f3062029%2fminimum-distance-between-sequence-a-and-all-permutations-of-another-sequence-b%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









2












$begingroup$

If $pge 1$, then the minimum is attained by rearranging $b$ so that it is "order isomorphic" to $a$, meaning that $b_i-b_j$ has the same sign as $a_i-a_j$ for all $i,j$. To see this, suppose that $a_i<a_j$ and $b_i<b_j$. Using the convexity of the function $f(x)=|x|^p$, you can show that
$$
|a_i-b_i|^p+|a_j-b_j|^ple |a_i-b_j|^p+|a_j-b_i|^p
$$

Therefore, if $a_i$ is matched with $b_j$ and $a_j$ with $b_i$, it is more efficient to swap $b_i$ and $b_j$. This means if $b$ is optimal, it must have no such out-of-order matching.



When $p<1$, the function $|x^p|$ is no longer convex, so the same local swapping rule does not always hold. In fact, it is sometimes reversed. Here are some observations:




  • If $a_1<a_2<b_1<b_2$, then it is more efficient to match $a_1$ with $b_2$ and $a_2$ with $b_1$ (this is the opposite of the $pge 1$ case).


  • If $a_1<b_1<b_2<a_2$, then it is more efficient to match $a_1$ with $b_1$ and $a_2 $ with $b_2$ (this is the same as the $pge 1$ case).


  • If $a_1<b_1<a_2<b_2$, then the optimal matching depends on the values of $a_1,a_2,b_1$ and $b_2$. For example, when $a_2-b_1$ is very small, it is optimal to pair $a_1$ with $b_2$, but as $a_2-b_1$ increases to $infty$ while $b_1-a_1$ and $b_2-a_2$ remain constant, then eventually the opposite matching is better.



I am not sure if these observations translate into an algorithm.






share|cite|improve this answer









$endgroup$













  • $begingroup$
    These observations translate into the same algorithm given on the linked page for $p=2$ (from Ivo's answer)
    $endgroup$
    – Omnomnomnom
    Jan 5 at 20:03










  • $begingroup$
    That is, the algorithm works for $p in [1,infty]$
    $endgroup$
    – Omnomnomnom
    Jan 5 at 20:21
















2












$begingroup$

If $pge 1$, then the minimum is attained by rearranging $b$ so that it is "order isomorphic" to $a$, meaning that $b_i-b_j$ has the same sign as $a_i-a_j$ for all $i,j$. To see this, suppose that $a_i<a_j$ and $b_i<b_j$. Using the convexity of the function $f(x)=|x|^p$, you can show that
$$
|a_i-b_i|^p+|a_j-b_j|^ple |a_i-b_j|^p+|a_j-b_i|^p
$$

Therefore, if $a_i$ is matched with $b_j$ and $a_j$ with $b_i$, it is more efficient to swap $b_i$ and $b_j$. This means if $b$ is optimal, it must have no such out-of-order matching.



When $p<1$, the function $|x^p|$ is no longer convex, so the same local swapping rule does not always hold. In fact, it is sometimes reversed. Here are some observations:




  • If $a_1<a_2<b_1<b_2$, then it is more efficient to match $a_1$ with $b_2$ and $a_2$ with $b_1$ (this is the opposite of the $pge 1$ case).


  • If $a_1<b_1<b_2<a_2$, then it is more efficient to match $a_1$ with $b_1$ and $a_2 $ with $b_2$ (this is the same as the $pge 1$ case).


  • If $a_1<b_1<a_2<b_2$, then the optimal matching depends on the values of $a_1,a_2,b_1$ and $b_2$. For example, when $a_2-b_1$ is very small, it is optimal to pair $a_1$ with $b_2$, but as $a_2-b_1$ increases to $infty$ while $b_1-a_1$ and $b_2-a_2$ remain constant, then eventually the opposite matching is better.



I am not sure if these observations translate into an algorithm.






share|cite|improve this answer









$endgroup$













  • $begingroup$
    These observations translate into the same algorithm given on the linked page for $p=2$ (from Ivo's answer)
    $endgroup$
    – Omnomnomnom
    Jan 5 at 20:03










  • $begingroup$
    That is, the algorithm works for $p in [1,infty]$
    $endgroup$
    – Omnomnomnom
    Jan 5 at 20:21














2












2








2





$begingroup$

If $pge 1$, then the minimum is attained by rearranging $b$ so that it is "order isomorphic" to $a$, meaning that $b_i-b_j$ has the same sign as $a_i-a_j$ for all $i,j$. To see this, suppose that $a_i<a_j$ and $b_i<b_j$. Using the convexity of the function $f(x)=|x|^p$, you can show that
$$
|a_i-b_i|^p+|a_j-b_j|^ple |a_i-b_j|^p+|a_j-b_i|^p
$$

Therefore, if $a_i$ is matched with $b_j$ and $a_j$ with $b_i$, it is more efficient to swap $b_i$ and $b_j$. This means if $b$ is optimal, it must have no such out-of-order matching.



When $p<1$, the function $|x^p|$ is no longer convex, so the same local swapping rule does not always hold. In fact, it is sometimes reversed. Here are some observations:




  • If $a_1<a_2<b_1<b_2$, then it is more efficient to match $a_1$ with $b_2$ and $a_2$ with $b_1$ (this is the opposite of the $pge 1$ case).


  • If $a_1<b_1<b_2<a_2$, then it is more efficient to match $a_1$ with $b_1$ and $a_2 $ with $b_2$ (this is the same as the $pge 1$ case).


  • If $a_1<b_1<a_2<b_2$, then the optimal matching depends on the values of $a_1,a_2,b_1$ and $b_2$. For example, when $a_2-b_1$ is very small, it is optimal to pair $a_1$ with $b_2$, but as $a_2-b_1$ increases to $infty$ while $b_1-a_1$ and $b_2-a_2$ remain constant, then eventually the opposite matching is better.



I am not sure if these observations translate into an algorithm.






share|cite|improve this answer









$endgroup$



If $pge 1$, then the minimum is attained by rearranging $b$ so that it is "order isomorphic" to $a$, meaning that $b_i-b_j$ has the same sign as $a_i-a_j$ for all $i,j$. To see this, suppose that $a_i<a_j$ and $b_i<b_j$. Using the convexity of the function $f(x)=|x|^p$, you can show that
$$
|a_i-b_i|^p+|a_j-b_j|^ple |a_i-b_j|^p+|a_j-b_i|^p
$$

Therefore, if $a_i$ is matched with $b_j$ and $a_j$ with $b_i$, it is more efficient to swap $b_i$ and $b_j$. This means if $b$ is optimal, it must have no such out-of-order matching.



When $p<1$, the function $|x^p|$ is no longer convex, so the same local swapping rule does not always hold. In fact, it is sometimes reversed. Here are some observations:




  • If $a_1<a_2<b_1<b_2$, then it is more efficient to match $a_1$ with $b_2$ and $a_2$ with $b_1$ (this is the opposite of the $pge 1$ case).


  • If $a_1<b_1<b_2<a_2$, then it is more efficient to match $a_1$ with $b_1$ and $a_2 $ with $b_2$ (this is the same as the $pge 1$ case).


  • If $a_1<b_1<a_2<b_2$, then the optimal matching depends on the values of $a_1,a_2,b_1$ and $b_2$. For example, when $a_2-b_1$ is very small, it is optimal to pair $a_1$ with $b_2$, but as $a_2-b_1$ increases to $infty$ while $b_1-a_1$ and $b_2-a_2$ remain constant, then eventually the opposite matching is better.



I am not sure if these observations translate into an algorithm.







share|cite|improve this answer












share|cite|improve this answer



share|cite|improve this answer










answered Jan 5 at 17:48









Mike EarnestMike Earnest

24k22151




24k22151












  • $begingroup$
    These observations translate into the same algorithm given on the linked page for $p=2$ (from Ivo's answer)
    $endgroup$
    – Omnomnomnom
    Jan 5 at 20:03










  • $begingroup$
    That is, the algorithm works for $p in [1,infty]$
    $endgroup$
    – Omnomnomnom
    Jan 5 at 20:21


















  • $begingroup$
    These observations translate into the same algorithm given on the linked page for $p=2$ (from Ivo's answer)
    $endgroup$
    – Omnomnomnom
    Jan 5 at 20:03










  • $begingroup$
    That is, the algorithm works for $p in [1,infty]$
    $endgroup$
    – Omnomnomnom
    Jan 5 at 20:21
















$begingroup$
These observations translate into the same algorithm given on the linked page for $p=2$ (from Ivo's answer)
$endgroup$
– Omnomnomnom
Jan 5 at 20:03




$begingroup$
These observations translate into the same algorithm given on the linked page for $p=2$ (from Ivo's answer)
$endgroup$
– Omnomnomnom
Jan 5 at 20:03












$begingroup$
That is, the algorithm works for $p in [1,infty]$
$endgroup$
– Omnomnomnom
Jan 5 at 20:21




$begingroup$
That is, the algorithm works for $p in [1,infty]$
$endgroup$
– Omnomnomnom
Jan 5 at 20:21











1












$begingroup$

An attempt to prove the inequality from Mike's answer. Feel free to correct this proof or fill in any gaps; I suspect that it's flawed.






Claim: if $a_1<a_2$ and $b_1<b_2$ are positive reals and $f$ is a non-negative, increasing, convex function over $[0,infty)$, then
$$
f(|a_1 - b_1|) + f(|a_2 - b_2|) leq f(|a_1 - b_2|) + f(|a_2 - b_1|)
$$




Proof: We note that $g(x) = f(|x|)$ is convex over $Bbb R$. So, for any $k>0$ and $a,b in Bbb R$, we have
$$
f(a - k) + f(b+k) geq f(a) + f(b)
$$

(This step seems shaky. I think this holds if $aleq b$ but not in general, which means that perhaps the rest of the proof needs to be broken into several cases)



It follows that
$$
f(|a_1 - b_2|) + f(|a_2 - b_1|) = \
f(|(a_1 - b_1) - (b_2 - b_1)|) + f(|(a_2 - b_2) + (b_2 - b_1)|) =\
g((a_1 - b_1) - (b_2 - b_1)) + g((a_2 - b_2) + (b_2 - b_1)) geq\
g(a_1 - b_1) + g(a_2 - b_2) = \
f(|a_1 - b_1|) + f(|a_2 - b_2|)
$$

as desired.






share|cite|improve this answer











$endgroup$









  • 1




    $begingroup$
    It holds for $a le b$ indeed (for $a>b$ the opposite holds). Proof: $exists tin(0,1): t(a-k) + (1-t) (b+k) = a$. Multiply by -1, add (a-k) and (b+k) then for the same $t$ we have $(1-t)(a-k) + t(b+k)=b$. Then due to convexity, $f(a)le tf(a-k) + (1-t) f(b+k)$ and $f(b)le (1-t) f(a-k) + t f(b+k)$. Summing both inequalities gives your inequality.
    $endgroup$
    – appletree
    Jan 5 at 23:21


















1












$begingroup$

An attempt to prove the inequality from Mike's answer. Feel free to correct this proof or fill in any gaps; I suspect that it's flawed.






Claim: if $a_1<a_2$ and $b_1<b_2$ are positive reals and $f$ is a non-negative, increasing, convex function over $[0,infty)$, then
$$
f(|a_1 - b_1|) + f(|a_2 - b_2|) leq f(|a_1 - b_2|) + f(|a_2 - b_1|)
$$




Proof: We note that $g(x) = f(|x|)$ is convex over $Bbb R$. So, for any $k>0$ and $a,b in Bbb R$, we have
$$
f(a - k) + f(b+k) geq f(a) + f(b)
$$

(This step seems shaky. I think this holds if $aleq b$ but not in general, which means that perhaps the rest of the proof needs to be broken into several cases)



It follows that
$$
f(|a_1 - b_2|) + f(|a_2 - b_1|) = \
f(|(a_1 - b_1) - (b_2 - b_1)|) + f(|(a_2 - b_2) + (b_2 - b_1)|) =\
g((a_1 - b_1) - (b_2 - b_1)) + g((a_2 - b_2) + (b_2 - b_1)) geq\
g(a_1 - b_1) + g(a_2 - b_2) = \
f(|a_1 - b_1|) + f(|a_2 - b_2|)
$$

as desired.






share|cite|improve this answer











$endgroup$









  • 1




    $begingroup$
    It holds for $a le b$ indeed (for $a>b$ the opposite holds). Proof: $exists tin(0,1): t(a-k) + (1-t) (b+k) = a$. Multiply by -1, add (a-k) and (b+k) then for the same $t$ we have $(1-t)(a-k) + t(b+k)=b$. Then due to convexity, $f(a)le tf(a-k) + (1-t) f(b+k)$ and $f(b)le (1-t) f(a-k) + t f(b+k)$. Summing both inequalities gives your inequality.
    $endgroup$
    – appletree
    Jan 5 at 23:21
















1












1








1





$begingroup$

An attempt to prove the inequality from Mike's answer. Feel free to correct this proof or fill in any gaps; I suspect that it's flawed.






Claim: if $a_1<a_2$ and $b_1<b_2$ are positive reals and $f$ is a non-negative, increasing, convex function over $[0,infty)$, then
$$
f(|a_1 - b_1|) + f(|a_2 - b_2|) leq f(|a_1 - b_2|) + f(|a_2 - b_1|)
$$




Proof: We note that $g(x) = f(|x|)$ is convex over $Bbb R$. So, for any $k>0$ and $a,b in Bbb R$, we have
$$
f(a - k) + f(b+k) geq f(a) + f(b)
$$

(This step seems shaky. I think this holds if $aleq b$ but not in general, which means that perhaps the rest of the proof needs to be broken into several cases)



It follows that
$$
f(|a_1 - b_2|) + f(|a_2 - b_1|) = \
f(|(a_1 - b_1) - (b_2 - b_1)|) + f(|(a_2 - b_2) + (b_2 - b_1)|) =\
g((a_1 - b_1) - (b_2 - b_1)) + g((a_2 - b_2) + (b_2 - b_1)) geq\
g(a_1 - b_1) + g(a_2 - b_2) = \
f(|a_1 - b_1|) + f(|a_2 - b_2|)
$$

as desired.






share|cite|improve this answer











$endgroup$



An attempt to prove the inequality from Mike's answer. Feel free to correct this proof or fill in any gaps; I suspect that it's flawed.






Claim: if $a_1<a_2$ and $b_1<b_2$ are positive reals and $f$ is a non-negative, increasing, convex function over $[0,infty)$, then
$$
f(|a_1 - b_1|) + f(|a_2 - b_2|) leq f(|a_1 - b_2|) + f(|a_2 - b_1|)
$$




Proof: We note that $g(x) = f(|x|)$ is convex over $Bbb R$. So, for any $k>0$ and $a,b in Bbb R$, we have
$$
f(a - k) + f(b+k) geq f(a) + f(b)
$$

(This step seems shaky. I think this holds if $aleq b$ but not in general, which means that perhaps the rest of the proof needs to be broken into several cases)



It follows that
$$
f(|a_1 - b_2|) + f(|a_2 - b_1|) = \
f(|(a_1 - b_1) - (b_2 - b_1)|) + f(|(a_2 - b_2) + (b_2 - b_1)|) =\
g((a_1 - b_1) - (b_2 - b_1)) + g((a_2 - b_2) + (b_2 - b_1)) geq\
g(a_1 - b_1) + g(a_2 - b_2) = \
f(|a_1 - b_1|) + f(|a_2 - b_2|)
$$

as desired.







share|cite|improve this answer














share|cite|improve this answer



share|cite|improve this answer








answered Jan 5 at 20:33


























community wiki





Omnomnomnom









  • 1




    $begingroup$
    It holds for $a le b$ indeed (for $a>b$ the opposite holds). Proof: $exists tin(0,1): t(a-k) + (1-t) (b+k) = a$. Multiply by -1, add (a-k) and (b+k) then for the same $t$ we have $(1-t)(a-k) + t(b+k)=b$. Then due to convexity, $f(a)le tf(a-k) + (1-t) f(b+k)$ and $f(b)le (1-t) f(a-k) + t f(b+k)$. Summing both inequalities gives your inequality.
    $endgroup$
    – appletree
    Jan 5 at 23:21
















  • 1




    $begingroup$
    It holds for $a le b$ indeed (for $a>b$ the opposite holds). Proof: $exists tin(0,1): t(a-k) + (1-t) (b+k) = a$. Multiply by -1, add (a-k) and (b+k) then for the same $t$ we have $(1-t)(a-k) + t(b+k)=b$. Then due to convexity, $f(a)le tf(a-k) + (1-t) f(b+k)$ and $f(b)le (1-t) f(a-k) + t f(b+k)$. Summing both inequalities gives your inequality.
    $endgroup$
    – appletree
    Jan 5 at 23:21










1




1




$begingroup$
It holds for $a le b$ indeed (for $a>b$ the opposite holds). Proof: $exists tin(0,1): t(a-k) + (1-t) (b+k) = a$. Multiply by -1, add (a-k) and (b+k) then for the same $t$ we have $(1-t)(a-k) + t(b+k)=b$. Then due to convexity, $f(a)le tf(a-k) + (1-t) f(b+k)$ and $f(b)le (1-t) f(a-k) + t f(b+k)$. Summing both inequalities gives your inequality.
$endgroup$
– appletree
Jan 5 at 23:21






$begingroup$
It holds for $a le b$ indeed (for $a>b$ the opposite holds). Proof: $exists tin(0,1): t(a-k) + (1-t) (b+k) = a$. Multiply by -1, add (a-k) and (b+k) then for the same $t$ we have $(1-t)(a-k) + t(b+k)=b$. Then due to convexity, $f(a)le tf(a-k) + (1-t) f(b+k)$ and $f(b)le (1-t) f(a-k) + t f(b+k)$. Summing both inequalities gives your inequality.
$endgroup$
– appletree
Jan 5 at 23:21




















draft saved

draft discarded




















































Thanks for contributing an answer to Mathematics Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


Use MathJax to format equations. MathJax reference.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3062029%2fminimum-distance-between-sequence-a-and-all-permutations-of-another-sequence-b%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

Quarter-circle Tiles

build a pushdown automaton that recognizes the reverse language of a given pushdown automaton?

Mont Emei