create account

Stars & Bars Method For Counting Problems [Math] by dkmathstats

View this thread on: hive.blogpeakd.comecency.com
· @dkmathstats ·
$1.14
Stars & Bars Method For Counting Problems [Math]
Hi there. In this math post I cover this Stars & Bars Method for counting and arrangement problems. This is something I came across while helping out a student. My permutations & combinations knowledge is okay but it is not my main specialty. I did manage to learn this fast to help out someone.

<center><img src="https://cdn.pixabay.com/photo/2024/02/21/13/49/ai-generated-8587765_960_720.jpg" /></center>
<center><a href="https://cdn.pixabay.com/photo/2024/02/21/13/49/ai-generated-8587765_960_720.jpg">Image Source</a></center>

&nbsp;

## Food Question
---

Here is the question I had from the student. **There are 3 oranges, 4 apples and 5 bananas available to choose from. You choose three fruits from the 12 available. How many combinations are possible from choosing three fruits?**

The scenario and the question seems simple. However getting the answer is not that easy. From the 3 fruits you can have all 3 fruits being oranges. That is one way. If you have one orange then you can have two apples `OAA` or one orange and two bananas `OBB`. There is also one orange, one apple and one banana.

Listing all the combinations is one way to do this. The thing is that it takes long. A more mathematical approach is faster and more preferred.


<center><img src="https://cdn.pixabay.com/photo/2020/06/01/18/47/math-5247958_960_720.jpg" /></center>
<center><a href="https://cdn.pixabay.com/photo/2020/06/01/18/47/math-5247958_960_720.jpg">Image Source</a></center>

&nbsp;

## Stars & Bars Method For Solution
---

There is this method called the Stars & Bars method when it comes to organized counting. In the fruits problem we have 3 types of fruits. With the stars and bars method we would have two bars. The setup would be `Oranges|Apples|Bananas`. The bars separate the fruit types.

As the question mentions choosing 3 fruits you would have 3 stars. If you have the case of all 3 fruits being oranges, the stars and bars representation would be:

<center>`***| |`</center>

The stars represent the fruits in the oranges section. In the middle it is blank as we did not choose any apples. The blank on the right represents no bananas chosen.

&nbsp;

For the case of one orange, one apple and one banana the representation would be

<center>`*|*|*`</center>

One star is in each group.

If you have one banana and two apples you have this representation.

<center>`|**|*`</center>

&nbsp;



**Connecting Stars & Bars With Choose Notation**

You can connect stars & bars with the choose notation. What I mean by choose is something like 3C2 or 3 Choose 2. 

<center>https://quicklatex.com/cache3/5c/ql_81e729568ac4f6f29411b4e12351345c_l3.png</center>

In the stars and bars method we have 2 bars and 3 stars. This is a total of 5. With choose here think of it as how many ways of placing 3 stars out of 5 spots. This is 5 choose 3 which is:

<center>https://quicklatex.com/cache3/57/ql_82b54fe5561207323385259c684e4f57_l3.png</center>

&nbsp;

Alternatively you can think of placing 2 bars out of 5 spots. This is 5 choose 2 which is also 10.

There are 10 ways of choose 3 fruits from a selection of 3 oranges, 4 apples and 5 bananas.

&nbsp;

[Reference](https://discrete.openmathbooks.org/dmoi2/sec_stars-and-bars.html)

<center><img src="https://cdn.pixabay.com/photo/2022/01/19/19/12/mathematics-6950767_960_720.jpg" /></center>
<center><a href="https://cdn.pixabay.com/photo/2022/01/19/19/12/mathematics-6950767_960_720.jpg">Image Source</a></center>

Math text rendered with LaTeX and Quicklatex.com

<center>Thank you for sharing.</center>
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
properties (23)
authordkmathstats
permlinkstars-and-bars-method-for-counting-problems-math
categoryhive-163521
json_metadata"{"app":"peakd/2024.10.10","format":"markdown","description":"Showcasing the stars and bars method for counting type problems in math.","tags":["math","mathematics","counting","combinatorics","problemsolving","combinations","stem","numbers"],"users":[],"image":["https://cdn.pixabay.com/photo/2024/02/21/13/49/ai-generated-8587765_960_720.jpg","https://cdn.pixabay.com/photo/2020/06/01/18/47/math-5247958_960_720.jpg","https://quicklatex.com/cache3/5c/ql_81e729568ac4f6f29411b4e12351345c_l3.png","https://quicklatex.com/cache3/57/ql_82b54fe5561207323385259c684e4f57_l3.png","https://cdn.pixabay.com/photo/2022/01/19/19/12/mathematics-6950767_960_720.jpg"]}"
created2024-11-05 16:40:15
last_update2024-11-05 16:40:15
depth0
children3
last_payout2024-11-12 16:40:15
cashout_time1969-12-31 23:59:59
total_payout_value0.572 HBD
curator_payout_value0.566 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length3,559
author_reputation151,162,175,039,043
root_title"Stars & Bars Method For Counting Problems [Math]"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id138,286,946
net_rshares3,905,115,043,727
author_curate_reward""
vote details (55)
@gwajnberg ·
Thanks for showing us how to use these methods to solve the problem!
👍  
properties (23)
authorgwajnberg
permlinkre-dkmathstats-smhzi2
categoryhive-163521
json_metadata{"tags":["hive-163521"],"app":"peakd/2024.10.10","image":[],"users":[]}
created2024-11-05 21:54:03
last_update2024-11-05 21:54:03
depth1
children1
last_payout2024-11-12 21:54:03
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length68
author_reputation371,967,914,853,726
root_title"Stars & Bars Method For Counting Problems [Math]"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id138,292,415
net_rshares16,711,992,566
author_curate_reward""
vote details (1)
@dkmathstats ·
No problem.
properties (22)
authordkmathstats
permlinksmigmc
categoryhive-163521
json_metadata{"app":"hiveblog/0.1"}
created2024-11-06 04:03:48
last_update2024-11-06 04:03:48
depth2
children0
last_payout2024-11-13 04:03:48
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length11
author_reputation151,162,175,039,043
root_title"Stars & Bars Method For Counting Problems [Math]"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id138,296,696
net_rshares0
@hivepakistan ·
<center>**Curious about HivePakistan? Join us on [Discord](https://discord.gg/3FzxCqFYyG)!**</center>

<center>Delegate your HP to the [Hivepakistan](https://peakd.com/@hivepakistan/wallet) account and earn 90% of curation rewards in liquid hive!<br><br><center><table><tr><td><center>[50 HP](https://hivesigner.com/sign/delegateVestingShares?&delegatee=hivepakistan&vesting_shares=50%20HP)</center></td><td><center>[100 HP](https://hivesigner.com/sign/delegateVestingShares?&delegatee=hivepakistan&vesting_shares=100%20HP)</center></td><td><center>[200 HP](https://hivesigner.com/sign/delegateVestingShares?&delegatee=hivepakistan&vesting_shares=200%20HP)</center></td><td><center>[500 HP (Supporter Badge)](https://hivesigner.com/sign/delegateVestingShares?&delegatee=hivepakistan&vesting_shares=500%20HP)</center></td><td><center>[1000 HP](https://hivesigner.com/sign/delegateVestingShares?&delegatee=hivepakistan&vesting_shares=1000%20HP)</center></td></tr></table></center>
<center>Follow our [Curation Trail](https://hive.vote/dash.php?i=1&trail=hivepakistan) and don't miss voting!</center>
___
<center>**Additional Perks: Delegate To @ [pakx](https://peakd.com/@pakx) For Earning $PAKX Investment Token**</center>

<center><img src="https://files.peakd.com/file/peakd-hive/dlmmqb/23tkn1F4Yd2BhWigkZ46jQdMmkDRKagirLr5Gh4iMq9TNBiS7anhAE71y9JqRuy1j77qS.png"></center><hr><center><b>Curated by <a href="/@gwajnberg">gwajnberg</a></b></center>
properties (22)
authorhivepakistan
permlinkre-dkmathstats-1730843556
categoryhive-163521
json_metadata"{"tags": ["hive-163521"], "app": "HiveDiscoMod"}"
created2024-11-05 21:52:36
last_update2024-11-05 21:52:36
depth1
children0
last_payout2024-11-12 21:52:36
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,446
author_reputation123,821,772,636,971
root_title"Stars & Bars Method For Counting Problems [Math]"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id138,292,385
net_rshares0