Coloured partitions












2












$begingroup$


I have $2n$ elements, $n$ of which are blue and the other $n$ are orange. Other than sharing a colour, they are distinct, i.e. each of those $2n$ objects is different and recognizable from any other.



How many partitions are there such that in each subset there’s at least one blue element and there are at least two elements total?



So, for example, a good partition would be {blue_1, blue_2} or {blue_1, orange_1} or {blue_5, orange_1, orange_3, orange_7} and a bad (i.e. the one I don’t want counted) one {blue_1} (because there’s only one element), or {orange_3, orange_11} (because there’s no blue one).





I tried to approach this first by starting with Bell number and subtracting, but that lead me nowhere. Then I started anew, trying to get a recurrence relation.



Obviously, $X_2 = 1$, because the only partition one can get is {blue_1, orange_1}.



Then, if I already had $X_{2n - 2}$ partitioned, I could:




  1. Keep things as-is and add a new pair as another subset—one option for each previous partition.

  2. Add {blue_n, orange_n}, as a pair, to any pre-existing subset—the number of subsets for each partition; but I don’t know how many those are.

  3. Add {blue_n} to one subset and {orange_n} to another—and again, while I know it’s $binom{x}{2}$ for each partition with $x$ subset, I don’t know how to write that in a useful way.

  4. Some other solutions, created by taking blue_n and adding pre-existing oranges to it (because now it can create a valid partition)—but here I am not even sure how much that would be, maybe somewhere around $B_{2n - 2}$?




I have created a small Python script to calculate a few first values. It shows $X_2 = 1, X_4 = 3, X_6 = 28, X_8 = 433, X_5 = 9461$. Unfortunatelly, there’s no such sequence on OEIS.










share|cite|improve this question











$endgroup$

















    2












    $begingroup$


    I have $2n$ elements, $n$ of which are blue and the other $n$ are orange. Other than sharing a colour, they are distinct, i.e. each of those $2n$ objects is different and recognizable from any other.



    How many partitions are there such that in each subset there’s at least one blue element and there are at least two elements total?



    So, for example, a good partition would be {blue_1, blue_2} or {blue_1, orange_1} or {blue_5, orange_1, orange_3, orange_7} and a bad (i.e. the one I don’t want counted) one {blue_1} (because there’s only one element), or {orange_3, orange_11} (because there’s no blue one).





    I tried to approach this first by starting with Bell number and subtracting, but that lead me nowhere. Then I started anew, trying to get a recurrence relation.



    Obviously, $X_2 = 1$, because the only partition one can get is {blue_1, orange_1}.



    Then, if I already had $X_{2n - 2}$ partitioned, I could:




    1. Keep things as-is and add a new pair as another subset—one option for each previous partition.

    2. Add {blue_n, orange_n}, as a pair, to any pre-existing subset—the number of subsets for each partition; but I don’t know how many those are.

    3. Add {blue_n} to one subset and {orange_n} to another—and again, while I know it’s $binom{x}{2}$ for each partition with $x$ subset, I don’t know how to write that in a useful way.

    4. Some other solutions, created by taking blue_n and adding pre-existing oranges to it (because now it can create a valid partition)—but here I am not even sure how much that would be, maybe somewhere around $B_{2n - 2}$?




    I have created a small Python script to calculate a few first values. It shows $X_2 = 1, X_4 = 3, X_6 = 28, X_8 = 433, X_5 = 9461$. Unfortunatelly, there’s no such sequence on OEIS.










    share|cite|improve this question











    $endgroup$















      2












      2








      2





      $begingroup$


      I have $2n$ elements, $n$ of which are blue and the other $n$ are orange. Other than sharing a colour, they are distinct, i.e. each of those $2n$ objects is different and recognizable from any other.



      How many partitions are there such that in each subset there’s at least one blue element and there are at least two elements total?



      So, for example, a good partition would be {blue_1, blue_2} or {blue_1, orange_1} or {blue_5, orange_1, orange_3, orange_7} and a bad (i.e. the one I don’t want counted) one {blue_1} (because there’s only one element), or {orange_3, orange_11} (because there’s no blue one).





      I tried to approach this first by starting with Bell number and subtracting, but that lead me nowhere. Then I started anew, trying to get a recurrence relation.



      Obviously, $X_2 = 1$, because the only partition one can get is {blue_1, orange_1}.



      Then, if I already had $X_{2n - 2}$ partitioned, I could:




      1. Keep things as-is and add a new pair as another subset—one option for each previous partition.

      2. Add {blue_n, orange_n}, as a pair, to any pre-existing subset—the number of subsets for each partition; but I don’t know how many those are.

      3. Add {blue_n} to one subset and {orange_n} to another—and again, while I know it’s $binom{x}{2}$ for each partition with $x$ subset, I don’t know how to write that in a useful way.

      4. Some other solutions, created by taking blue_n and adding pre-existing oranges to it (because now it can create a valid partition)—but here I am not even sure how much that would be, maybe somewhere around $B_{2n - 2}$?




      I have created a small Python script to calculate a few first values. It shows $X_2 = 1, X_4 = 3, X_6 = 28, X_8 = 433, X_5 = 9461$. Unfortunatelly, there’s no such sequence on OEIS.










      share|cite|improve this question











      $endgroup$




      I have $2n$ elements, $n$ of which are blue and the other $n$ are orange. Other than sharing a colour, they are distinct, i.e. each of those $2n$ objects is different and recognizable from any other.



      How many partitions are there such that in each subset there’s at least one blue element and there are at least two elements total?



      So, for example, a good partition would be {blue_1, blue_2} or {blue_1, orange_1} or {blue_5, orange_1, orange_3, orange_7} and a bad (i.e. the one I don’t want counted) one {blue_1} (because there’s only one element), or {orange_3, orange_11} (because there’s no blue one).





      I tried to approach this first by starting with Bell number and subtracting, but that lead me nowhere. Then I started anew, trying to get a recurrence relation.



      Obviously, $X_2 = 1$, because the only partition one can get is {blue_1, orange_1}.



      Then, if I already had $X_{2n - 2}$ partitioned, I could:




      1. Keep things as-is and add a new pair as another subset—one option for each previous partition.

      2. Add {blue_n, orange_n}, as a pair, to any pre-existing subset—the number of subsets for each partition; but I don’t know how many those are.

      3. Add {blue_n} to one subset and {orange_n} to another—and again, while I know it’s $binom{x}{2}$ for each partition with $x$ subset, I don’t know how to write that in a useful way.

      4. Some other solutions, created by taking blue_n and adding pre-existing oranges to it (because now it can create a valid partition)—but here I am not even sure how much that would be, maybe somewhere around $B_{2n - 2}$?




      I have created a small Python script to calculate a few first values. It shows $X_2 = 1, X_4 = 3, X_6 = 28, X_8 = 433, X_5 = 9461$. Unfortunatelly, there’s no such sequence on OEIS.







      combinatorics discrete-mathematics recreational-mathematics problem-solving set-partition






      share|cite|improve this question















      share|cite|improve this question













      share|cite|improve this question




      share|cite|improve this question








      edited Dec 16 '18 at 14:10







      Althorion

















      asked Dec 14 '18 at 19:23









      AlthorionAlthorion

      114




      114






















          1 Answer
          1






          active

          oldest

          votes


















          0












          $begingroup$

          The recurrence relation you describe won't quite work, for the reasons you describe above -- you don't know the size of each case. Instead you can consider the following cases: One set has exactly one blue element, and each set has at least 2 blue elements. To make it easy, first we'll say that the sets of the partition are distinguishable, then divide by 2 at the end (this way was more intuitive for me, but the direct counting works as well; you just have to be careful in the third step below). Call the sets Set $A$ and Set $B$.



          If set $A$ has exactly one blue element, there are $2^n - 1$ ways to choose orange elements for set $A$ (we can choose any nonempty subset). There are $n$ ways to choose the blue element, for a total of $n(2^n-1)$ instances in this case. Note that set $B$ is determined by the contents of set $A$.



          Similarly, there are $n(2^n-1)$ ways for set $B$ to have exactly one blue element.



          In the other case, each set has at least $2$ blue elements. We need to choose somewhere between $2$ and $n-2$ blue elements to go in set $A$. There are $2^n - 2 - 2n$ such subsets (we can choose any subset, except for the empty set, the entire set, any singleton set, or any set of size $n-1$). Then we can choose any subset of the orange elements in $2^n$ ways, for a total of $2^n(2^n - 2 - 2n)$ ways.



          Summing these, we have $2n(2^n - 1) + 2^n(2^n - 2 - 2n)$ such partitions; we need to divide by $2$ to account for ordering the sets $A$ and $B$ to get: $n(2^n-1) + 2^n(2^{n-1} - 1 - n) = 2^{2n-1} - 2^n - n$.






          share|cite|improve this answer









          $endgroup$













          • $begingroup$
            If I’m not wrong, that assumes bi-partition of a set (i.e. partition into exactly two sets), but that’s not the only partitions I care for. For example, for $n=3$, I consider ${{B1, O1}, {B2, O3}, {B3, O2}}$ (and other five similar tri-partitions) to be as valid as ${{B1, B2, O1}, {B3, O2, O3}}$ etc.
            $endgroup$
            – Althorion
            Dec 16 '18 at 12:57










          • $begingroup$
            Ah, I misread the question. I’m not sure I have a good approach for your actual problem.
            $endgroup$
            – platty
            Dec 16 '18 at 18:58











          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%2f3039802%2fcoloured-partitions%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









          0












          $begingroup$

          The recurrence relation you describe won't quite work, for the reasons you describe above -- you don't know the size of each case. Instead you can consider the following cases: One set has exactly one blue element, and each set has at least 2 blue elements. To make it easy, first we'll say that the sets of the partition are distinguishable, then divide by 2 at the end (this way was more intuitive for me, but the direct counting works as well; you just have to be careful in the third step below). Call the sets Set $A$ and Set $B$.



          If set $A$ has exactly one blue element, there are $2^n - 1$ ways to choose orange elements for set $A$ (we can choose any nonempty subset). There are $n$ ways to choose the blue element, for a total of $n(2^n-1)$ instances in this case. Note that set $B$ is determined by the contents of set $A$.



          Similarly, there are $n(2^n-1)$ ways for set $B$ to have exactly one blue element.



          In the other case, each set has at least $2$ blue elements. We need to choose somewhere between $2$ and $n-2$ blue elements to go in set $A$. There are $2^n - 2 - 2n$ such subsets (we can choose any subset, except for the empty set, the entire set, any singleton set, or any set of size $n-1$). Then we can choose any subset of the orange elements in $2^n$ ways, for a total of $2^n(2^n - 2 - 2n)$ ways.



          Summing these, we have $2n(2^n - 1) + 2^n(2^n - 2 - 2n)$ such partitions; we need to divide by $2$ to account for ordering the sets $A$ and $B$ to get: $n(2^n-1) + 2^n(2^{n-1} - 1 - n) = 2^{2n-1} - 2^n - n$.






          share|cite|improve this answer









          $endgroup$













          • $begingroup$
            If I’m not wrong, that assumes bi-partition of a set (i.e. partition into exactly two sets), but that’s not the only partitions I care for. For example, for $n=3$, I consider ${{B1, O1}, {B2, O3}, {B3, O2}}$ (and other five similar tri-partitions) to be as valid as ${{B1, B2, O1}, {B3, O2, O3}}$ etc.
            $endgroup$
            – Althorion
            Dec 16 '18 at 12:57










          • $begingroup$
            Ah, I misread the question. I’m not sure I have a good approach for your actual problem.
            $endgroup$
            – platty
            Dec 16 '18 at 18:58
















          0












          $begingroup$

          The recurrence relation you describe won't quite work, for the reasons you describe above -- you don't know the size of each case. Instead you can consider the following cases: One set has exactly one blue element, and each set has at least 2 blue elements. To make it easy, first we'll say that the sets of the partition are distinguishable, then divide by 2 at the end (this way was more intuitive for me, but the direct counting works as well; you just have to be careful in the third step below). Call the sets Set $A$ and Set $B$.



          If set $A$ has exactly one blue element, there are $2^n - 1$ ways to choose orange elements for set $A$ (we can choose any nonempty subset). There are $n$ ways to choose the blue element, for a total of $n(2^n-1)$ instances in this case. Note that set $B$ is determined by the contents of set $A$.



          Similarly, there are $n(2^n-1)$ ways for set $B$ to have exactly one blue element.



          In the other case, each set has at least $2$ blue elements. We need to choose somewhere between $2$ and $n-2$ blue elements to go in set $A$. There are $2^n - 2 - 2n$ such subsets (we can choose any subset, except for the empty set, the entire set, any singleton set, or any set of size $n-1$). Then we can choose any subset of the orange elements in $2^n$ ways, for a total of $2^n(2^n - 2 - 2n)$ ways.



          Summing these, we have $2n(2^n - 1) + 2^n(2^n - 2 - 2n)$ such partitions; we need to divide by $2$ to account for ordering the sets $A$ and $B$ to get: $n(2^n-1) + 2^n(2^{n-1} - 1 - n) = 2^{2n-1} - 2^n - n$.






          share|cite|improve this answer









          $endgroup$













          • $begingroup$
            If I’m not wrong, that assumes bi-partition of a set (i.e. partition into exactly two sets), but that’s not the only partitions I care for. For example, for $n=3$, I consider ${{B1, O1}, {B2, O3}, {B3, O2}}$ (and other five similar tri-partitions) to be as valid as ${{B1, B2, O1}, {B3, O2, O3}}$ etc.
            $endgroup$
            – Althorion
            Dec 16 '18 at 12:57










          • $begingroup$
            Ah, I misread the question. I’m not sure I have a good approach for your actual problem.
            $endgroup$
            – platty
            Dec 16 '18 at 18:58














          0












          0








          0





          $begingroup$

          The recurrence relation you describe won't quite work, for the reasons you describe above -- you don't know the size of each case. Instead you can consider the following cases: One set has exactly one blue element, and each set has at least 2 blue elements. To make it easy, first we'll say that the sets of the partition are distinguishable, then divide by 2 at the end (this way was more intuitive for me, but the direct counting works as well; you just have to be careful in the third step below). Call the sets Set $A$ and Set $B$.



          If set $A$ has exactly one blue element, there are $2^n - 1$ ways to choose orange elements for set $A$ (we can choose any nonempty subset). There are $n$ ways to choose the blue element, for a total of $n(2^n-1)$ instances in this case. Note that set $B$ is determined by the contents of set $A$.



          Similarly, there are $n(2^n-1)$ ways for set $B$ to have exactly one blue element.



          In the other case, each set has at least $2$ blue elements. We need to choose somewhere between $2$ and $n-2$ blue elements to go in set $A$. There are $2^n - 2 - 2n$ such subsets (we can choose any subset, except for the empty set, the entire set, any singleton set, or any set of size $n-1$). Then we can choose any subset of the orange elements in $2^n$ ways, for a total of $2^n(2^n - 2 - 2n)$ ways.



          Summing these, we have $2n(2^n - 1) + 2^n(2^n - 2 - 2n)$ such partitions; we need to divide by $2$ to account for ordering the sets $A$ and $B$ to get: $n(2^n-1) + 2^n(2^{n-1} - 1 - n) = 2^{2n-1} - 2^n - n$.






          share|cite|improve this answer









          $endgroup$



          The recurrence relation you describe won't quite work, for the reasons you describe above -- you don't know the size of each case. Instead you can consider the following cases: One set has exactly one blue element, and each set has at least 2 blue elements. To make it easy, first we'll say that the sets of the partition are distinguishable, then divide by 2 at the end (this way was more intuitive for me, but the direct counting works as well; you just have to be careful in the third step below). Call the sets Set $A$ and Set $B$.



          If set $A$ has exactly one blue element, there are $2^n - 1$ ways to choose orange elements for set $A$ (we can choose any nonempty subset). There are $n$ ways to choose the blue element, for a total of $n(2^n-1)$ instances in this case. Note that set $B$ is determined by the contents of set $A$.



          Similarly, there are $n(2^n-1)$ ways for set $B$ to have exactly one blue element.



          In the other case, each set has at least $2$ blue elements. We need to choose somewhere between $2$ and $n-2$ blue elements to go in set $A$. There are $2^n - 2 - 2n$ such subsets (we can choose any subset, except for the empty set, the entire set, any singleton set, or any set of size $n-1$). Then we can choose any subset of the orange elements in $2^n$ ways, for a total of $2^n(2^n - 2 - 2n)$ ways.



          Summing these, we have $2n(2^n - 1) + 2^n(2^n - 2 - 2n)$ such partitions; we need to divide by $2$ to account for ordering the sets $A$ and $B$ to get: $n(2^n-1) + 2^n(2^{n-1} - 1 - n) = 2^{2n-1} - 2^n - n$.







          share|cite|improve this answer












          share|cite|improve this answer



          share|cite|improve this answer










          answered Dec 15 '18 at 23:33









          plattyplatty

          3,370320




          3,370320












          • $begingroup$
            If I’m not wrong, that assumes bi-partition of a set (i.e. partition into exactly two sets), but that’s not the only partitions I care for. For example, for $n=3$, I consider ${{B1, O1}, {B2, O3}, {B3, O2}}$ (and other five similar tri-partitions) to be as valid as ${{B1, B2, O1}, {B3, O2, O3}}$ etc.
            $endgroup$
            – Althorion
            Dec 16 '18 at 12:57










          • $begingroup$
            Ah, I misread the question. I’m not sure I have a good approach for your actual problem.
            $endgroup$
            – platty
            Dec 16 '18 at 18:58


















          • $begingroup$
            If I’m not wrong, that assumes bi-partition of a set (i.e. partition into exactly two sets), but that’s not the only partitions I care for. For example, for $n=3$, I consider ${{B1, O1}, {B2, O3}, {B3, O2}}$ (and other five similar tri-partitions) to be as valid as ${{B1, B2, O1}, {B3, O2, O3}}$ etc.
            $endgroup$
            – Althorion
            Dec 16 '18 at 12:57










          • $begingroup$
            Ah, I misread the question. I’m not sure I have a good approach for your actual problem.
            $endgroup$
            – platty
            Dec 16 '18 at 18:58
















          $begingroup$
          If I’m not wrong, that assumes bi-partition of a set (i.e. partition into exactly two sets), but that’s not the only partitions I care for. For example, for $n=3$, I consider ${{B1, O1}, {B2, O3}, {B3, O2}}$ (and other five similar tri-partitions) to be as valid as ${{B1, B2, O1}, {B3, O2, O3}}$ etc.
          $endgroup$
          – Althorion
          Dec 16 '18 at 12:57




          $begingroup$
          If I’m not wrong, that assumes bi-partition of a set (i.e. partition into exactly two sets), but that’s not the only partitions I care for. For example, for $n=3$, I consider ${{B1, O1}, {B2, O3}, {B3, O2}}$ (and other five similar tri-partitions) to be as valid as ${{B1, B2, O1}, {B3, O2, O3}}$ etc.
          $endgroup$
          – Althorion
          Dec 16 '18 at 12:57












          $begingroup$
          Ah, I misread the question. I’m not sure I have a good approach for your actual problem.
          $endgroup$
          – platty
          Dec 16 '18 at 18:58




          $begingroup$
          Ah, I misread the question. I’m not sure I have a good approach for your actual problem.
          $endgroup$
          – platty
          Dec 16 '18 at 18:58


















          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%2f3039802%2fcoloured-partitions%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

          Wiesbaden

          Marschland

          Dieringhausen