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???
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.
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?