1

I have n different group, each group should contain 4 people(DB,UI,PF,Designer) and i have 4*n student, i want to place them into the group.

There is several constraint, such as one group can only have 1 female, the average gpa should meet 3.0 etc. Each constraint will have a score and i need to make sure all the group have the similiar score.

I use recusive to try all statement and calculate the score and variance.

However, my method works when there is not too much student. If there is 100 student, it will be 100! and it is hard to solve.

Is there any other idea that can imporve the algorithm?

Thanks so much!

1

1 Answer 1

1

This is a classical Constraint satisfaction problem (CSP https://en.wikipedia.org/wiki/Constraint_satisfaction_problem) .

This is a hard problem. There are a lot of professional systems out there and a lot of algorithms out there that try to eliminate impossible solutions fast to reduce the search-space.

But as far as I know there is no general approach to reduce the over all complexity. If you apply the constrains in a clever order you can in most cases significantly reduce the search space.

E.g. With the constrain "only 1 female" you can eliminate most combinations in an early state.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.