All 6-digit numbers consist of [6] which must contain 1,2,3












0












$begingroup$


I'm required to find all possible numbers which consist of {1,2,3,4,5,6}, and include each of {1,2,3} at least once. For example: 113124 is good, but not 464612 because it's missing 3.
My approach was to first calculate all the sequences which contain 1,2,3 once. Which would be: $6times5times4times3^3$. The reasoning is that you have 6 different places to place 3, then 5 for 2, and 4 for 1. Because I'm looking now for sequences which contain each digit only once I'd fill the 3 rest spots with {4,5,6} meaning $3^3$. Now for the case where you have a digit twice it would be: $3times{6choose2}times4times3times3^2$. Using the same reasoning but this time you have $6choose2$ ways to choose 2 positions for a number, then you are left with 4 places for the other number and so on. And you multiply by 3 for each number. So you carry on up to 4 times the same number, because if you would continue for 5 you don't have enough spots to fill in the other 2 numbers you must have, so the formula is:
$$ 6*5*4*3^3 + 3*{6choose2}*4*3*3^2+3*{6choose3}*3*2*3+3*{6choose4}*2$$



Yet the answer is incorret, it's a question a friend asked me to do so I'm not aware of the exact solution, from what I recall he said the answer is roughly 11,000.










share|cite|improve this question









$endgroup$








  • 1




    $begingroup$
    Inclusion-Exclusion
    $endgroup$
    – Haran
    Jan 14 at 10:48
















0












$begingroup$


I'm required to find all possible numbers which consist of {1,2,3,4,5,6}, and include each of {1,2,3} at least once. For example: 113124 is good, but not 464612 because it's missing 3.
My approach was to first calculate all the sequences which contain 1,2,3 once. Which would be: $6times5times4times3^3$. The reasoning is that you have 6 different places to place 3, then 5 for 2, and 4 for 1. Because I'm looking now for sequences which contain each digit only once I'd fill the 3 rest spots with {4,5,6} meaning $3^3$. Now for the case where you have a digit twice it would be: $3times{6choose2}times4times3times3^2$. Using the same reasoning but this time you have $6choose2$ ways to choose 2 positions for a number, then you are left with 4 places for the other number and so on. And you multiply by 3 for each number. So you carry on up to 4 times the same number, because if you would continue for 5 you don't have enough spots to fill in the other 2 numbers you must have, so the formula is:
$$ 6*5*4*3^3 + 3*{6choose2}*4*3*3^2+3*{6choose3}*3*2*3+3*{6choose4}*2$$



Yet the answer is incorret, it's a question a friend asked me to do so I'm not aware of the exact solution, from what I recall he said the answer is roughly 11,000.










share|cite|improve this question









$endgroup$








  • 1




    $begingroup$
    Inclusion-Exclusion
    $endgroup$
    – Haran
    Jan 14 at 10:48














0












0








0





$begingroup$


I'm required to find all possible numbers which consist of {1,2,3,4,5,6}, and include each of {1,2,3} at least once. For example: 113124 is good, but not 464612 because it's missing 3.
My approach was to first calculate all the sequences which contain 1,2,3 once. Which would be: $6times5times4times3^3$. The reasoning is that you have 6 different places to place 3, then 5 for 2, and 4 for 1. Because I'm looking now for sequences which contain each digit only once I'd fill the 3 rest spots with {4,5,6} meaning $3^3$. Now for the case where you have a digit twice it would be: $3times{6choose2}times4times3times3^2$. Using the same reasoning but this time you have $6choose2$ ways to choose 2 positions for a number, then you are left with 4 places for the other number and so on. And you multiply by 3 for each number. So you carry on up to 4 times the same number, because if you would continue for 5 you don't have enough spots to fill in the other 2 numbers you must have, so the formula is:
$$ 6*5*4*3^3 + 3*{6choose2}*4*3*3^2+3*{6choose3}*3*2*3+3*{6choose4}*2$$



Yet the answer is incorret, it's a question a friend asked me to do so I'm not aware of the exact solution, from what I recall he said the answer is roughly 11,000.










share|cite|improve this question









$endgroup$




I'm required to find all possible numbers which consist of {1,2,3,4,5,6}, and include each of {1,2,3} at least once. For example: 113124 is good, but not 464612 because it's missing 3.
My approach was to first calculate all the sequences which contain 1,2,3 once. Which would be: $6times5times4times3^3$. The reasoning is that you have 6 different places to place 3, then 5 for 2, and 4 for 1. Because I'm looking now for sequences which contain each digit only once I'd fill the 3 rest spots with {4,5,6} meaning $3^3$. Now for the case where you have a digit twice it would be: $3times{6choose2}times4times3times3^2$. Using the same reasoning but this time you have $6choose2$ ways to choose 2 positions for a number, then you are left with 4 places for the other number and so on. And you multiply by 3 for each number. So you carry on up to 4 times the same number, because if you would continue for 5 you don't have enough spots to fill in the other 2 numbers you must have, so the formula is:
$$ 6*5*4*3^3 + 3*{6choose2}*4*3*3^2+3*{6choose3}*3*2*3+3*{6choose4}*2$$



Yet the answer is incorret, it's a question a friend asked me to do so I'm not aware of the exact solution, from what I recall he said the answer is roughly 11,000.







combinatorics discrete-mathematics






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Jan 14 at 10:40









MosheMoshe

396




396








  • 1




    $begingroup$
    Inclusion-Exclusion
    $endgroup$
    – Haran
    Jan 14 at 10:48














  • 1




    $begingroup$
    Inclusion-Exclusion
    $endgroup$
    – Haran
    Jan 14 at 10:48








1




1




$begingroup$
Inclusion-Exclusion
$endgroup$
– Haran
Jan 14 at 10:48




$begingroup$
Inclusion-Exclusion
$endgroup$
– Haran
Jan 14 at 10:48










1 Answer
1






active

oldest

votes


















2












$begingroup$

Let $A$ denote the set of $6$-digit numbers with digits in ${1,2,3,4,5,6}$.



For $i=1,2,3,4,5,6$ let $A_i$ denote the set of elements of $A$ that do not contain $i$ as digid.



Then with inclusion/exclusion and symmetry we find:$$|A_1cup A_2cup A_3|=3|A_1|-3|A_1cap A_2|+|A_1cap A_2cap A_3|=3cdot5^6-3cdot4^6+3^6$$so that: $$|A|-|A_1cup A_2cup A_3|=6^6-3cdot5^6+3cdot4^6-3^6=11340$$






share|cite|improve this answer











$endgroup$














    Your Answer








    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%2f3073089%2fall-6-digit-numbers-consist-of-6-which-must-contain-1-2-3%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









    2












    $begingroup$

    Let $A$ denote the set of $6$-digit numbers with digits in ${1,2,3,4,5,6}$.



    For $i=1,2,3,4,5,6$ let $A_i$ denote the set of elements of $A$ that do not contain $i$ as digid.



    Then with inclusion/exclusion and symmetry we find:$$|A_1cup A_2cup A_3|=3|A_1|-3|A_1cap A_2|+|A_1cap A_2cap A_3|=3cdot5^6-3cdot4^6+3^6$$so that: $$|A|-|A_1cup A_2cup A_3|=6^6-3cdot5^6+3cdot4^6-3^6=11340$$






    share|cite|improve this answer











    $endgroup$


















      2












      $begingroup$

      Let $A$ denote the set of $6$-digit numbers with digits in ${1,2,3,4,5,6}$.



      For $i=1,2,3,4,5,6$ let $A_i$ denote the set of elements of $A$ that do not contain $i$ as digid.



      Then with inclusion/exclusion and symmetry we find:$$|A_1cup A_2cup A_3|=3|A_1|-3|A_1cap A_2|+|A_1cap A_2cap A_3|=3cdot5^6-3cdot4^6+3^6$$so that: $$|A|-|A_1cup A_2cup A_3|=6^6-3cdot5^6+3cdot4^6-3^6=11340$$






      share|cite|improve this answer











      $endgroup$
















        2












        2








        2





        $begingroup$

        Let $A$ denote the set of $6$-digit numbers with digits in ${1,2,3,4,5,6}$.



        For $i=1,2,3,4,5,6$ let $A_i$ denote the set of elements of $A$ that do not contain $i$ as digid.



        Then with inclusion/exclusion and symmetry we find:$$|A_1cup A_2cup A_3|=3|A_1|-3|A_1cap A_2|+|A_1cap A_2cap A_3|=3cdot5^6-3cdot4^6+3^6$$so that: $$|A|-|A_1cup A_2cup A_3|=6^6-3cdot5^6+3cdot4^6-3^6=11340$$






        share|cite|improve this answer











        $endgroup$



        Let $A$ denote the set of $6$-digit numbers with digits in ${1,2,3,4,5,6}$.



        For $i=1,2,3,4,5,6$ let $A_i$ denote the set of elements of $A$ that do not contain $i$ as digid.



        Then with inclusion/exclusion and symmetry we find:$$|A_1cup A_2cup A_3|=3|A_1|-3|A_1cap A_2|+|A_1cap A_2cap A_3|=3cdot5^6-3cdot4^6+3^6$$so that: $$|A|-|A_1cup A_2cup A_3|=6^6-3cdot5^6+3cdot4^6-3^6=11340$$







        share|cite|improve this answer














        share|cite|improve this answer



        share|cite|improve this answer








        edited Jan 14 at 11:15

























        answered Jan 14 at 11:00









        drhabdrhab

        104k545136




        104k545136






























            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%2f3073089%2fall-6-digit-numbers-consist-of-6-which-must-contain-1-2-3%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

            Bressuire

            Cabo Verde

            Gyllenstierna