# Not sure which NPc problem to use for NPc reduction problem,

I'm attempting to prove a problem is NPc, but I'm not sure which one would be optimal to use,

The problem is:

There are $n$ boars to be caged, and $m$ cages which each cage being able to hold $k$ boars.

Any boar can be put in in any cage, but certain pairs of boars can't be put together in the same cage.

I'm thinking of SAT or Knapsack to reduce to this problem, but not sure which. If anyone can lead me to the right direction or get me started I'd really appreciate it, thanks

• What have you tried? Where did you get stuck? We do not want to just hand you the solution; we want you to gain understanding. However, as it is we do not know what your underlying problem is, so we can not begin to help. See here for tips on asking questions about exercise problems. If you are uncertain how to improve your question, why not ask around in Computer Science Chat? – Raphael Sep 16 '17 at 7:01
• Our reference question may help. – Raphael Sep 16 '17 at 7:01

You don't need a reduction. You have a set of objects and you need to assign a number from $\{1, \dots, k\}$ to each object such that certain pairs of objects don't get the same number. There's already a well-known NP-complete problem that fits exactly this description. You're probably most familiar with the case $k=3$, but it's NP-complete for all fixed $k>2$ and also when $k$ is part of the input.
Think about each boar as a node, and connect those boars that may not be put in the same cage with an edge. You will get a graph. Then try to color nodes with $m$ different colors, providing no adjacent nodes have same colors. Those boars with the same color are in the same cage. You should be familiar with $NP$ complete graph coloring problem.