Shortest length of wire required to connect points












1












$begingroup$




There are 2 sets , $A={a_1,a_2,a_3..... ,a_n} $ and $B={b_1,b_2,b_3.. b_n}$ . All elements of these sets are real numbers. Each point in set $A$ need to be connected to one and only one point in set $B$ . How must we connect to use shortest length of wire??





I know the answer is take the smallest element in $A$ and connect to smallest element in $B$ , then do so for second-smallest ones and so on.. I was trying to proof it . I tried using induction.. I also tried trying to decompose other possible connections to the one that is the solution.. but I failed.. miserably.










share|cite|improve this question











$endgroup$








  • 1




    $begingroup$
    How do you connect two real numbers "via lengths of wire?" Are you asking for some permutation $piin S_n$ such that the summation $sumlimits_{i=1}^n |a_i - b_{pi(i)}|$ is minimized?
    $endgroup$
    – JMoravitz
    Dec 14 '18 at 7:07










  • $begingroup$
    @ShubhamJohri: Notice that the sets have the same number of elements.
    $endgroup$
    – David G. Stork
    Dec 14 '18 at 7:56










  • $begingroup$
    @JMoravitz yes, exactly.. you are right. :)
    $endgroup$
    – Kavita Juneja
    Dec 14 '18 at 10:48






  • 1




    $begingroup$
    I'll assume $a_1$ and $b_1$ are the smallest elements of $A$ and $B$. If you have some wiring solution where they are not connected, then $a_1$ connects to $b_u$ and $a_v$ connects to $b_1$ for some $u$ and $v$. Show that if you swap the connections to $a_1-b_1$ and $a_v-b_u$ then the total length of wire cannot increase. So to get an optimal solution, you can assume without loss of generality that $a_1$ and $b_1$ are connected. Then induction takes care the rest, showing that the proposed solution is optimal. It is not always the only optimal solution, but is the only general solution.
    $endgroup$
    – Jaap Scherphuis
    Dec 14 '18 at 14:47












  • $begingroup$
    @JaapScherphuis thank you very mcuh
    $endgroup$
    – Kavita Juneja
    Dec 14 '18 at 15:25
















1












$begingroup$




There are 2 sets , $A={a_1,a_2,a_3..... ,a_n} $ and $B={b_1,b_2,b_3.. b_n}$ . All elements of these sets are real numbers. Each point in set $A$ need to be connected to one and only one point in set $B$ . How must we connect to use shortest length of wire??





I know the answer is take the smallest element in $A$ and connect to smallest element in $B$ , then do so for second-smallest ones and so on.. I was trying to proof it . I tried using induction.. I also tried trying to decompose other possible connections to the one that is the solution.. but I failed.. miserably.










share|cite|improve this question











$endgroup$








  • 1




    $begingroup$
    How do you connect two real numbers "via lengths of wire?" Are you asking for some permutation $piin S_n$ such that the summation $sumlimits_{i=1}^n |a_i - b_{pi(i)}|$ is minimized?
    $endgroup$
    – JMoravitz
    Dec 14 '18 at 7:07










  • $begingroup$
    @ShubhamJohri: Notice that the sets have the same number of elements.
    $endgroup$
    – David G. Stork
    Dec 14 '18 at 7:56










  • $begingroup$
    @JMoravitz yes, exactly.. you are right. :)
    $endgroup$
    – Kavita Juneja
    Dec 14 '18 at 10:48






  • 1




    $begingroup$
    I'll assume $a_1$ and $b_1$ are the smallest elements of $A$ and $B$. If you have some wiring solution where they are not connected, then $a_1$ connects to $b_u$ and $a_v$ connects to $b_1$ for some $u$ and $v$. Show that if you swap the connections to $a_1-b_1$ and $a_v-b_u$ then the total length of wire cannot increase. So to get an optimal solution, you can assume without loss of generality that $a_1$ and $b_1$ are connected. Then induction takes care the rest, showing that the proposed solution is optimal. It is not always the only optimal solution, but is the only general solution.
    $endgroup$
    – Jaap Scherphuis
    Dec 14 '18 at 14:47












  • $begingroup$
    @JaapScherphuis thank you very mcuh
    $endgroup$
    – Kavita Juneja
    Dec 14 '18 at 15:25














1












1








1





$begingroup$




There are 2 sets , $A={a_1,a_2,a_3..... ,a_n} $ and $B={b_1,b_2,b_3.. b_n}$ . All elements of these sets are real numbers. Each point in set $A$ need to be connected to one and only one point in set $B$ . How must we connect to use shortest length of wire??





I know the answer is take the smallest element in $A$ and connect to smallest element in $B$ , then do so for second-smallest ones and so on.. I was trying to proof it . I tried using induction.. I also tried trying to decompose other possible connections to the one that is the solution.. but I failed.. miserably.










share|cite|improve this question











$endgroup$






There are 2 sets , $A={a_1,a_2,a_3..... ,a_n} $ and $B={b_1,b_2,b_3.. b_n}$ . All elements of these sets are real numbers. Each point in set $A$ need to be connected to one and only one point in set $B$ . How must we connect to use shortest length of wire??





I know the answer is take the smallest element in $A$ and connect to smallest element in $B$ , then do so for second-smallest ones and so on.. I was trying to proof it . I tried using induction.. I also tried trying to decompose other possible connections to the one that is the solution.. but I failed.. miserably.







sequences-and-series fixedpoints






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Dec 14 '18 at 14:14







Kavita Juneja

















asked Dec 14 '18 at 7:03









Kavita JunejaKavita Juneja

1218




1218








  • 1




    $begingroup$
    How do you connect two real numbers "via lengths of wire?" Are you asking for some permutation $piin S_n$ such that the summation $sumlimits_{i=1}^n |a_i - b_{pi(i)}|$ is minimized?
    $endgroup$
    – JMoravitz
    Dec 14 '18 at 7:07










  • $begingroup$
    @ShubhamJohri: Notice that the sets have the same number of elements.
    $endgroup$
    – David G. Stork
    Dec 14 '18 at 7:56










  • $begingroup$
    @JMoravitz yes, exactly.. you are right. :)
    $endgroup$
    – Kavita Juneja
    Dec 14 '18 at 10:48






  • 1




    $begingroup$
    I'll assume $a_1$ and $b_1$ are the smallest elements of $A$ and $B$. If you have some wiring solution where they are not connected, then $a_1$ connects to $b_u$ and $a_v$ connects to $b_1$ for some $u$ and $v$. Show that if you swap the connections to $a_1-b_1$ and $a_v-b_u$ then the total length of wire cannot increase. So to get an optimal solution, you can assume without loss of generality that $a_1$ and $b_1$ are connected. Then induction takes care the rest, showing that the proposed solution is optimal. It is not always the only optimal solution, but is the only general solution.
    $endgroup$
    – Jaap Scherphuis
    Dec 14 '18 at 14:47












  • $begingroup$
    @JaapScherphuis thank you very mcuh
    $endgroup$
    – Kavita Juneja
    Dec 14 '18 at 15:25














  • 1




    $begingroup$
    How do you connect two real numbers "via lengths of wire?" Are you asking for some permutation $piin S_n$ such that the summation $sumlimits_{i=1}^n |a_i - b_{pi(i)}|$ is minimized?
    $endgroup$
    – JMoravitz
    Dec 14 '18 at 7:07










  • $begingroup$
    @ShubhamJohri: Notice that the sets have the same number of elements.
    $endgroup$
    – David G. Stork
    Dec 14 '18 at 7:56










  • $begingroup$
    @JMoravitz yes, exactly.. you are right. :)
    $endgroup$
    – Kavita Juneja
    Dec 14 '18 at 10:48






  • 1




    $begingroup$
    I'll assume $a_1$ and $b_1$ are the smallest elements of $A$ and $B$. If you have some wiring solution where they are not connected, then $a_1$ connects to $b_u$ and $a_v$ connects to $b_1$ for some $u$ and $v$. Show that if you swap the connections to $a_1-b_1$ and $a_v-b_u$ then the total length of wire cannot increase. So to get an optimal solution, you can assume without loss of generality that $a_1$ and $b_1$ are connected. Then induction takes care the rest, showing that the proposed solution is optimal. It is not always the only optimal solution, but is the only general solution.
    $endgroup$
    – Jaap Scherphuis
    Dec 14 '18 at 14:47












  • $begingroup$
    @JaapScherphuis thank you very mcuh
    $endgroup$
    – Kavita Juneja
    Dec 14 '18 at 15:25








1




1




$begingroup$
How do you connect two real numbers "via lengths of wire?" Are you asking for some permutation $piin S_n$ such that the summation $sumlimits_{i=1}^n |a_i - b_{pi(i)}|$ is minimized?
$endgroup$
– JMoravitz
Dec 14 '18 at 7:07




$begingroup$
How do you connect two real numbers "via lengths of wire?" Are you asking for some permutation $piin S_n$ such that the summation $sumlimits_{i=1}^n |a_i - b_{pi(i)}|$ is minimized?
$endgroup$
– JMoravitz
Dec 14 '18 at 7:07












$begingroup$
@ShubhamJohri: Notice that the sets have the same number of elements.
$endgroup$
– David G. Stork
Dec 14 '18 at 7:56




$begingroup$
@ShubhamJohri: Notice that the sets have the same number of elements.
$endgroup$
– David G. Stork
Dec 14 '18 at 7:56












$begingroup$
@JMoravitz yes, exactly.. you are right. :)
$endgroup$
– Kavita Juneja
Dec 14 '18 at 10:48




$begingroup$
@JMoravitz yes, exactly.. you are right. :)
$endgroup$
– Kavita Juneja
Dec 14 '18 at 10:48




1




1




$begingroup$
I'll assume $a_1$ and $b_1$ are the smallest elements of $A$ and $B$. If you have some wiring solution where they are not connected, then $a_1$ connects to $b_u$ and $a_v$ connects to $b_1$ for some $u$ and $v$. Show that if you swap the connections to $a_1-b_1$ and $a_v-b_u$ then the total length of wire cannot increase. So to get an optimal solution, you can assume without loss of generality that $a_1$ and $b_1$ are connected. Then induction takes care the rest, showing that the proposed solution is optimal. It is not always the only optimal solution, but is the only general solution.
$endgroup$
– Jaap Scherphuis
Dec 14 '18 at 14:47






$begingroup$
I'll assume $a_1$ and $b_1$ are the smallest elements of $A$ and $B$. If you have some wiring solution where they are not connected, then $a_1$ connects to $b_u$ and $a_v$ connects to $b_1$ for some $u$ and $v$. Show that if you swap the connections to $a_1-b_1$ and $a_v-b_u$ then the total length of wire cannot increase. So to get an optimal solution, you can assume without loss of generality that $a_1$ and $b_1$ are connected. Then induction takes care the rest, showing that the proposed solution is optimal. It is not always the only optimal solution, but is the only general solution.
$endgroup$
– Jaap Scherphuis
Dec 14 '18 at 14:47














$begingroup$
@JaapScherphuis thank you very mcuh
$endgroup$
– Kavita Juneja
Dec 14 '18 at 15:25




$begingroup$
@JaapScherphuis thank you very mcuh
$endgroup$
– Kavita Juneja
Dec 14 '18 at 15:25










0






active

oldest

votes











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%2f3039049%2fshortest-length-of-wire-required-to-connect-points%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















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%2f3039049%2fshortest-length-of-wire-required-to-connect-points%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

Index of /

Tribalistas

Listed building