Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Post History

#1: Initial revision by user avatar DNB‭ · 2021-07-09T05:28:13Z (over 3 years ago)
Are Stars and Bars in Combinatorics related to the Fence Post Error?
The bars in the lower picture look like fences. That's why Stars and Bars reminds me of [Fence Post Error](https://en.wikipedia.org/wiki/Off-by-one_error#Fencepost_error)?

>It is common to replace the balls with “stars”, and to call the separators “bars”, yielding the popular name of the technique. We have 5 stars, and 2 bars in our example:

>![](https://www.themathdoctors.org/wp-content/uploads/2018/12/Stars-n-bars-apple-1c.png)

Above's [Source](https://www.themathdoctors.org/stars-and-bars-counting-ways-to-distribute-items/). 

>![](https://i.imgur.com/X6In8o2.jpg)

Blitzstein. *Introduction to Probability* (2019 2 ed). p. 19.