Is it possible to place one queen and at least 29 knights in a 8x8 chess board such that no 2 pieces attack each other? Is it possible to place one queen and at least 29 knights in a 8$\times$8 chess board such that no 2 pieces attack each other?
I thought to try to use the bound $\lceil \frac{mn}{2} \rceil $ for the number of knights in a $m \times n$ chessboard such that they don't attack each other, but that requires $m,n >2$, and for some queen positions, that doesn't apply.
I also thought that if we had a queen, there are at most 7 rows to place the knights, so then there have to be 5 knights in one row. I'm not sure what use that could be though.
 A: First of all, here is the proof that you can put no more than $32$ non-attacking knights on a chessboard. You can pair up the squares of the board into $32$ pairs, where each pair is a knight's move apart, as shown below.
Since you can place at most one knight in each pair, you can place at most $32$ knights.
Now, imagine placing a queen on some square in this same diagram, and then placing an X on every square attacked by the queen, as well as an X on the squares a knight's move away from the queen. No matter where you place the queen, at least $4$ of these pairs will have both of their squares X'ed out. Therefore, the number of knights you can place is reduced by at least four, so you cannot place more than $28$ knights.
For example, when the queen is placed at $\mathrm A1$, the lower left corner, then the pairs $\mathrm {A1-C2, A2-C1,B2-D1}$, and $\mathrm{A4-C3}$ are all X'ed out (the letter is the column, and the number is the row). It is not too hard to verify case by case that the queen always X's out at least $4$ of these pairs. In fact, as the queen moves closer to the center, she X's out more pairs.

A: Via integer linear programming I have found that if you force at least one queen, you can place at most $22$ knights, and here is one such solution:
$$
\begin{matrix}&.&N&.&N&.&N&.&.\\&N&.&N&.&N&.&N&.\\&.&N&.&N&.&N&.&.\\&N&.&N&.&N&.&N&.\\&.&N&.&N&.&N
&.&.\\&N&.&N&.&N&.&.&.\\&.&N&.&N&.&.&.&.\\&.&.&.&.&.&.&.&Q\\\end{matrix}
$$

As in this problem where the queen is replaced with a rook, for each of the $10$ essentially different placements of the queen, linear programming duality provides a certificate of optimality.  For example, if the queen is placed in the bottom right corner, the following partition of the remaining unattacked squares into $22$ sets shows that at most $22$ knights can be placed:
$$\begin{matrix}
    . &19 &1 &20 &2 &3 &4 &. \\
    1 &. &2 &5 &4 &6 &21 &.  \\
    7 &8 &. &9 &10 &5 &3 &. \\
    11 &12 &7 &. &13 &9 &6 &. \\
    8 &14 &15 &12 &. &10 &16 &. \\
    17 &11 &18 &13 &16 &. &. &. \\
    14 &15 &17 &22 &18 &. &. &. \\
    . &. &. &. &. &. &. &. \\
\end{matrix}
$$
This is a refinement of the approach shown by @Mike Earnest, and it yields similar certificates for the other $9$ cases.
