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?
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?
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???
not close..
25252 = 1250
use X.
local X = math.random(1,2)
if X == 1 then
--black dots
end
if X == 2 then
--red dots
end
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.
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
This site is for questions related to Lua in Roblox. Use the discord to ask math instead.