I was pretty bored in the lockdown so I thought up a mathematics puzzle, which I haven's solved yet, so the community can solve together.
Let $n>1$ be a positive integer. There is a square castle with $n^2$ rooms, $n$ columns and $n$ rows. Each room lives a knight or a knave. Knights always tell the truth and knaves always lie. You are required to choose a room, then specify a non-empty proper subset $S$ of $\{0,1,2,...,n\}$, choose an integer $1\le i\le n$, then ask the person living in the room,
“Is the number of knights in row/column $i$ an element of $S$?"
Find the optimal number of questions to be asked to determine all the knights and knaves in the castle in the worst case.
I will also work on this question, and sometimes give progress. You can use a computer. Hope this problem can be solved in a month!
PS: Wow, this is solved in one day! Originally I thought this should need a week.