looking for a formula

• Oct 10th 2012, 05:48 AM
starfsmenn
looking for a formula
hi guys

i'm interested in math but not so well inclined..

just looking for a formula to complete this question i've got in my head. trying to make my day easier and needing some assistance!

i need to divide a certain number of things into groups.
each group can be either 2 or 3 objects..
total number of groups has to be divisible by 4

is there a formula i can wrap up all this info in neatly? i'm looking to solve it myself of course.

thanks a bunch =)
• Oct 10th 2012, 08:10 PM
chiro
Re: looking for a formula
Hey starfsmenn.

Xi = {2,3} so as a function you could say X(0) = 2, X(1) = 3 and f(x) = X(x) where x is either 0 or 1.

Now you have S total things but the number of groups needs to be divisible by four.

Let N be the number of groups: then N % 4 = 0 and the % is the modulus which gives the remainder of N/4 just like you learned in primary school and early high school.

You also have S = Sum of X_i from i = 1 to N.

Because there are many possible combinations for the actual groups, there is no one formula to get all the X_i's.

You can however look at the different combinations of the different configurations of groups and eliminate the ones that don't have N be a multiple of 4.

So in short you have

N = number of groups
S = Total number of things
X_i = number of objects in group i where i is a whole number from 1 to N and
S = Sum X_i i = 1 to N
N % 4 = 0.
X(a) = 2 if a = 0 or X(a) = 3 if a = 1 and a can only equal 0 or 1.