Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How do i determine how many possibilities there are here? [closed]

Asked by
Plieax 66
5 years ago

i have this: https://imgur.com/a/N5sIfgD

i need to figure out how many combinations there are if the black dots have a 1/2 chance of being red and a 1/2 chance of being black, how would I solve this?

0
This site is for questions related to Lua in Roblox. Use the discord to ask math instead. hiimgoodpack 2009 — 5y

Closed as off-topic by hiimgoodpack and User#5423

This question has been closed by our community as being off-topic from ROBLOX Lua Scripting.

Why was this question closed?

3 answers

Log in to vote
0
Answered by 5 years ago

Take how many dots there are, in this case 25 (5 * 5,) multiply that by 2, which gives you 50 possible combinations.

I think I did that right???

0
not close.. Plieax 66 — 5y
0
25*25*2 = 1250 Plieax 66 — 5y
Ad
Log in to vote
0
Answered by 5 years ago

use X.

local X = math.random(1,2)
if X == 1 then
    --black dots
end
if X == 2 then
    --red dots
end
Log in to vote
0
Answered by 5 years ago

This is a Permutation with repetition and its fairly simple to calculate. the equation is n^r where n is the possible choices or outcomes and r is how many times n can be chosen. r in this case is 2 and n is 25 so 2^25 which is a shocking 33,554,432 possible outcomes. you can find out more about this at: Math Is Fun that explains this very well.