Forum — Daily Challenge
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Login

    When do we use stars and bars

    Day 8
    2
    2
    6
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      authenticcrane M2 M3
      last edited by

      Hello,

      I am not sure when we can use stars and bars and when we can't. For example, in this question:

      How many ways are there to put 5 balls in 3 boxes if the balls are not distinguishable and neither are the boxes?

      Is the answer 7 choose 2?

      If, for example, the balls become distinguishable, how does that change the stars and bars formation? What if both become distinguishable (i.e. the balls and boxes?)

      Thanks,

      mathnerd_101M 1 Reply Last reply Reply Quote 0
      • mathnerd_101M
        mathnerd_101 M0 M3 @authenticcrane
        last edited by

        @authenticcrane If I recall correctly, stars and bars is for both indistinguishable items. Thus your reasoning as to why it is 7 choose 2 is correct. Unfortunately, I do not think you can manipulate stars and bars for items that are distinguishable.

        If you see the text messages between two programmers, here are some common acronyms to know:
        imo: iteration may overload
        brb: bad recursion brb
        rofl: right-oriented frame layout

        1 Reply Last reply Reply Quote 0

        • 1 / 1
        • First post
          Last post
        Daily Challenge | Terms | COPPA