So, here's the gist:
I want to rearrange the seating in my classes. Following procedure: Each pupil gets to write a wish list with three names - his/her own name, one other pupil he/she would like to have as a neighbour and one pupil he/she does not want to have as a neighbour. They can also say whether they want to sit in front or not. Those wishes are not binding.
I myself want to have a list for some pupils which should not be seated next to each other under any circumstances. These entries are binding.
Then there are the seats themselves to consider - in some rooms they're arranged by 2x4 seats in a row, other rooms have the seats arranged along a U.
So, those are the requirements. Then I though about implementation - finding a nice way of solving this would probably amount to solving the travelling salesman problem. Thus, bruteforce. Also, from what I've read and heard, functional languages like Haskell or F# should be better suited for a task like this.
May approach would be to create all possible combinations of pupils through a recursive function, assign a numeric value to each combination (based on the number of fulfilled criteria) and then pick the combination(s) with the highest values.
My questions now would be, if I'm deluding myself and this can't be done, or if this is even worthwhile or if someone else here has any experience with functional languages and could give me some pointers or point out pitfalls.