So I have this problem and I need to figure out what kind of algorithm can solve it.
Given a group of people, and given who doesn't like whom within this group, arrange a seating for all people at a round table so that no one sits next to someone they do not like (if possible).
I just can't figure out how to approach it. Basically I drew it as a directed graph with nodes representing a person and edges going from people who doesn't like someone to the one they don't like. Then, you want to arrange the nodes in a circle so that no edge is between two nodes next to each other. I couldn't find an algorithm that solves this kind of problem however.
To make your statement a bit easier, assume that you "invert" your graph such that you have edges between two guests if and only if they can be seated next to each other.
Now, what you are looking for is a cycle (closed walk) that contains each vertex at exactly once. This is called a Hamiltonian cycle. It's NP-hard in general (so is your problem as any instance of Hamiltonian cycle can be reduced to your problem), but under certain conditions, it's easier.
Genetic algorithms (like JasonC mentioned) could solve the problem most times, Integer Linear programming would be an option, Constraint programming, too.