Number of ways to pick elements such mutual ordering remains maintained?












-1












$begingroup$


The number of ways to pick elements from two sets such that mutual ordering remains intact of both the sets.



For example:
Set 1:(a,b)
Set2:(c,d)
What I mean is a should come before b in any order you pick similarly c before d.
Number of ways is 6
{abcd,acdb,acbd,cabd,cadb,cdab}









share|cite|improve this question











$endgroup$












  • $begingroup$
    Hint: Stars_and_bars.
    $endgroup$
    – drhab
    Dec 30 '18 at 8:11










  • $begingroup$
    Got it!! Thanks!!
    $endgroup$
    – Sagar Sharma
    Dec 30 '18 at 8:20










  • $begingroup$
    @bof Suppose that the (ordered) sets have $n$ and $m$ elements. Then to be found is the number of sums $k_1+cdots+k_{n+1}=m$ where the $k_i$ are nonnegative integers. First place the elements of the set having $n$ elements on a row. Then place elements of the other set in the gaps and on LHS and RHS.
    $endgroup$
    – drhab
    Dec 30 '18 at 9:04












  • $begingroup$
    @bof I must agree it is more trouble :-). It was the first thing that came to mind and was projected immediately as a hint. Fortunately it was well-received by the OP.
    $endgroup$
    – drhab
    Dec 30 '18 at 9:15


















-1












$begingroup$


The number of ways to pick elements from two sets such that mutual ordering remains intact of both the sets.



For example:
Set 1:(a,b)
Set2:(c,d)
What I mean is a should come before b in any order you pick similarly c before d.
Number of ways is 6
{abcd,acdb,acbd,cabd,cadb,cdab}









share|cite|improve this question











$endgroup$












  • $begingroup$
    Hint: Stars_and_bars.
    $endgroup$
    – drhab
    Dec 30 '18 at 8:11










  • $begingroup$
    Got it!! Thanks!!
    $endgroup$
    – Sagar Sharma
    Dec 30 '18 at 8:20










  • $begingroup$
    @bof Suppose that the (ordered) sets have $n$ and $m$ elements. Then to be found is the number of sums $k_1+cdots+k_{n+1}=m$ where the $k_i$ are nonnegative integers. First place the elements of the set having $n$ elements on a row. Then place elements of the other set in the gaps and on LHS and RHS.
    $endgroup$
    – drhab
    Dec 30 '18 at 9:04












  • $begingroup$
    @bof I must agree it is more trouble :-). It was the first thing that came to mind and was projected immediately as a hint. Fortunately it was well-received by the OP.
    $endgroup$
    – drhab
    Dec 30 '18 at 9:15
















-1












-1








-1





$begingroup$


The number of ways to pick elements from two sets such that mutual ordering remains intact of both the sets.



For example:
Set 1:(a,b)
Set2:(c,d)
What I mean is a should come before b in any order you pick similarly c before d.
Number of ways is 6
{abcd,acdb,acbd,cabd,cadb,cdab}









share|cite|improve this question











$endgroup$




The number of ways to pick elements from two sets such that mutual ordering remains intact of both the sets.



For example:
Set 1:(a,b)
Set2:(c,d)
What I mean is a should come before b in any order you pick similarly c before d.
Number of ways is 6
{abcd,acdb,acbd,cabd,cadb,cdab}






combinatorics permutations






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Dec 30 '18 at 7:57









Asaf Karagila

307k33438769




307k33438769










asked Dec 30 '18 at 7:52









Sagar SharmaSagar Sharma

143




143












  • $begingroup$
    Hint: Stars_and_bars.
    $endgroup$
    – drhab
    Dec 30 '18 at 8:11










  • $begingroup$
    Got it!! Thanks!!
    $endgroup$
    – Sagar Sharma
    Dec 30 '18 at 8:20










  • $begingroup$
    @bof Suppose that the (ordered) sets have $n$ and $m$ elements. Then to be found is the number of sums $k_1+cdots+k_{n+1}=m$ where the $k_i$ are nonnegative integers. First place the elements of the set having $n$ elements on a row. Then place elements of the other set in the gaps and on LHS and RHS.
    $endgroup$
    – drhab
    Dec 30 '18 at 9:04












  • $begingroup$
    @bof I must agree it is more trouble :-). It was the first thing that came to mind and was projected immediately as a hint. Fortunately it was well-received by the OP.
    $endgroup$
    – drhab
    Dec 30 '18 at 9:15




















  • $begingroup$
    Hint: Stars_and_bars.
    $endgroup$
    – drhab
    Dec 30 '18 at 8:11










  • $begingroup$
    Got it!! Thanks!!
    $endgroup$
    – Sagar Sharma
    Dec 30 '18 at 8:20










  • $begingroup$
    @bof Suppose that the (ordered) sets have $n$ and $m$ elements. Then to be found is the number of sums $k_1+cdots+k_{n+1}=m$ where the $k_i$ are nonnegative integers. First place the elements of the set having $n$ elements on a row. Then place elements of the other set in the gaps and on LHS and RHS.
    $endgroup$
    – drhab
    Dec 30 '18 at 9:04












  • $begingroup$
    @bof I must agree it is more trouble :-). It was the first thing that came to mind and was projected immediately as a hint. Fortunately it was well-received by the OP.
    $endgroup$
    – drhab
    Dec 30 '18 at 9:15


















$begingroup$
Hint: Stars_and_bars.
$endgroup$
– drhab
Dec 30 '18 at 8:11




$begingroup$
Hint: Stars_and_bars.
$endgroup$
– drhab
Dec 30 '18 at 8:11












$begingroup$
Got it!! Thanks!!
$endgroup$
– Sagar Sharma
Dec 30 '18 at 8:20




$begingroup$
Got it!! Thanks!!
$endgroup$
– Sagar Sharma
Dec 30 '18 at 8:20












$begingroup$
@bof Suppose that the (ordered) sets have $n$ and $m$ elements. Then to be found is the number of sums $k_1+cdots+k_{n+1}=m$ where the $k_i$ are nonnegative integers. First place the elements of the set having $n$ elements on a row. Then place elements of the other set in the gaps and on LHS and RHS.
$endgroup$
– drhab
Dec 30 '18 at 9:04






$begingroup$
@bof Suppose that the (ordered) sets have $n$ and $m$ elements. Then to be found is the number of sums $k_1+cdots+k_{n+1}=m$ where the $k_i$ are nonnegative integers. First place the elements of the set having $n$ elements on a row. Then place elements of the other set in the gaps and on LHS and RHS.
$endgroup$
– drhab
Dec 30 '18 at 9:04














$begingroup$
@bof I must agree it is more trouble :-). It was the first thing that came to mind and was projected immediately as a hint. Fortunately it was well-received by the OP.
$endgroup$
– drhab
Dec 30 '18 at 9:15






$begingroup$
@bof I must agree it is more trouble :-). It was the first thing that came to mind and was projected immediately as a hint. Fortunately it was well-received by the OP.
$endgroup$
– drhab
Dec 30 '18 at 9:15












1 Answer
1






active

oldest

votes


















1












$begingroup$

In general, if the first ordered set has $m$ elements and the second $n$, then every such order is found by having $n+m$ places reserved and picking the $m$ places where the elements of the first set are going to go (in order). The remaining places get the second set elements (also in order).



Picking $m$ places from $n+m$ can be done in $binom{n+m}{m}$ ways. Note that we could also pick the places for set $2$ first too, but this gives the same result as $binom{n+m}{n} = binom{n+m}{m}$.



In your case $n=m=2$ and indeed $binom{4}{2} = frac{4!}{2! 2!} = frac{24}{4}=6$.






share|cite|improve this answer











$endgroup$













    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%2f3056594%2fnumber-of-ways-to-pick-elements-such-mutual-ordering-remains-maintained%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1












    $begingroup$

    In general, if the first ordered set has $m$ elements and the second $n$, then every such order is found by having $n+m$ places reserved and picking the $m$ places where the elements of the first set are going to go (in order). The remaining places get the second set elements (also in order).



    Picking $m$ places from $n+m$ can be done in $binom{n+m}{m}$ ways. Note that we could also pick the places for set $2$ first too, but this gives the same result as $binom{n+m}{n} = binom{n+m}{m}$.



    In your case $n=m=2$ and indeed $binom{4}{2} = frac{4!}{2! 2!} = frac{24}{4}=6$.






    share|cite|improve this answer











    $endgroup$


















      1












      $begingroup$

      In general, if the first ordered set has $m$ elements and the second $n$, then every such order is found by having $n+m$ places reserved and picking the $m$ places where the elements of the first set are going to go (in order). The remaining places get the second set elements (also in order).



      Picking $m$ places from $n+m$ can be done in $binom{n+m}{m}$ ways. Note that we could also pick the places for set $2$ first too, but this gives the same result as $binom{n+m}{n} = binom{n+m}{m}$.



      In your case $n=m=2$ and indeed $binom{4}{2} = frac{4!}{2! 2!} = frac{24}{4}=6$.






      share|cite|improve this answer











      $endgroup$
















        1












        1








        1





        $begingroup$

        In general, if the first ordered set has $m$ elements and the second $n$, then every such order is found by having $n+m$ places reserved and picking the $m$ places where the elements of the first set are going to go (in order). The remaining places get the second set elements (also in order).



        Picking $m$ places from $n+m$ can be done in $binom{n+m}{m}$ ways. Note that we could also pick the places for set $2$ first too, but this gives the same result as $binom{n+m}{n} = binom{n+m}{m}$.



        In your case $n=m=2$ and indeed $binom{4}{2} = frac{4!}{2! 2!} = frac{24}{4}=6$.






        share|cite|improve this answer











        $endgroup$



        In general, if the first ordered set has $m$ elements and the second $n$, then every such order is found by having $n+m$ places reserved and picking the $m$ places where the elements of the first set are going to go (in order). The remaining places get the second set elements (also in order).



        Picking $m$ places from $n+m$ can be done in $binom{n+m}{m}$ ways. Note that we could also pick the places for set $2$ first too, but this gives the same result as $binom{n+m}{n} = binom{n+m}{m}$.



        In your case $n=m=2$ and indeed $binom{4}{2} = frac{4!}{2! 2!} = frac{24}{4}=6$.







        share|cite|improve this answer














        share|cite|improve this answer



        share|cite|improve this answer








        edited Dec 30 '18 at 9:30

























        answered Dec 30 '18 at 9:19









        Henno BrandsmaHenno Brandsma

        113k348123




        113k348123






























            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%2f3056594%2fnumber-of-ways-to-pick-elements-such-mutual-ordering-remains-maintained%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

            To store a contact into the json file from server.js file using a class in NodeJS

            Redirect URL with Chrome Remote Debugging Android Devices

            Dieringhausen