Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 292999
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T06:13:53+00:00 2026-05-12T06:13:53+00:00

Assume a game in which one rolls 20, 8-sided die, for a total number

  • 0

Assume a game in which one rolls 20, 8-sided die, for a total number of 8^20 possible outcomes. To calculate the probability of a particular event occurring, we divide the number of ways that event can occur by 8^20.

One can calculate the number of ways to get exactly 5 dice of the value 3. (20 choose 5) gives us the number of orders of 3. 7^15 gives us the number of ways we can not get the value 3 for 15 rolls.

number of ways to get exactly 5, 3's = (20 choose 5)*7^15.

The answer can also be viewed as how many ways can I rearrange the string 3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 (20 choose 5) times the total number of values we the zero’s (assuming 7 legal values) 7^15 (is this correct).

  • Question 1: How can I calculate the number of ways to get exactly 5 dice of the same value(That is, for all die values).
    Note: if I just naively use my first answer above and multiply bt 8, I get an enormous amount of double counting?

    I understand that I could solve for each of the cases (5 1’s), (5, 2’s), (5, 3’s), … (5’s, 8) sum them (more simply 8*(5 1’s) ). Then subtract the sum of number of overlaps (5 1’s) and (5 2’s), (5 1’s) and (5 3’s)… (5 1’s) and (5, 2’s) and … and (5, 8’s) but this seems exceedingly messy. I would a generalization of this in a way that scales up to large numbers of samples and large numbers of classes.

  • How can I calculate the number of ways to get at least 5 dice of the same value?

    So 111110000000000000000 or 11110100000000000002 or 11111100000001110000 or 11011211222222223333, but not 00001111222233334444 or 000511512252363347744.

I’m looking for answers which either explain the math or point to a library which supports this (esp python modules). Extra points for detail and examples.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T06:13:54+00:00Added an answer on May 12, 2026 at 6:13 am

    Double counting can be solved by use of the Inclusion/Exclusion Principle

    I suspect it comes out to:

    Choose(8,1)*P(one set of 5 Xs) 
    - Choose(8,2)*P(a set of 5 Xs and a set of 5 Ys) 
    + Choose(8,3)*P(5 Xs, 5 Ys, 5 Zs) 
    - Choose(8,4)*P(5 Xs, 5 Ys, 5 Zs, 5 As)
    
    P(set of 5 Xs) = 20 Choose 5 * 7^15 / 8^20
    P(5 Xs, 5 Ys) = 20 Choose 5,5 * 6^10 / 8^20
    

    And so on. This doesn’t solve the problem directly of ‘more then 5 of the same’, as if you simply summed the results of this applied to 5,6,7..20; you would over count the cases where you have, say, 10 1’s and 5 8’s.

    You could probably apply inclusion exclusion again to come up with that second answer; so, P(of at least 5)=P(one set of 20)+ … + (P(one set of 15) – 7*P(set of 5 from 5 dice)) + ((P(one set of 14) – 7*P(one set of 5 from 6) – 7*P(one set of 6 from 6)). Coming up with the source code for that is proving itself more difficult.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's assume I'm developing a AJAX, PHP chess game. During the game, one movement
I'm facing a problem which is probably extremely common in game-design. Let's assume that
Let's assume I am in charge of developing a Scrabble game, being that one
Let's assume public abstract class Game { // Base } public class Poker :
I have three tables in MSSQL for a game which are structured as follows:
Background I'm making a canvas game which assumes the user to be using a
I'm making a game which involves placing objects in a room. The room stores
I'm working on a real-time space strategy game clone which at its time did
I have an IRC bot which hosts game servers given a few arguments. The
i'm developing a simple game, in which there are bricks , ball and a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.