Properly defining a subset of $\mathbb{Z}^k$

132 Views Asked by At

I need to provide a good definition of the subset of $\{\{0,1,\ldots,n-1\} \times \{0,1,\ldots,n-1\} \times \cdots \times \{0,1,\ldots,n-1\}\} \subset \mathbb{Z}^k$ given by all the vertices of the aforementioned set that can be reached in a single move (or less) by a $k$-dimensional chess rook, $R$, that starts from the vertex $\{(x_1,x_2,\ldots,x_k)\}$ (i.e., $x_1,x_2,\ldots,x_k \in \{0,1,\ldots,n-1\}$), where the generalized rook move rule is shown below. Rook move rule for <span class=$n=4, k=3, x_1=1, x_2=0, x_3=0$" />

Now, I think that my definition $$\{x_1,x_2,\ldots,x_k\} \cup \{(x_1+c_1,x_2+c_2,\dots,x_k+c_k) : \exists \tilde{j} \in \{1,2,\dots,k\} : \\ ((c_{j \neq \tilde{j}}=0 \wedge |c_{j=\tilde{j}}|=c \wedge (|\{\tilde{j}\}|<|\{j\}|) \wedge (x_j+c_j) \in \{0,1,\dots,n-1\}) \quad \forall c \in \{1,2,\ldots,n-1\}), j=1,2,\ldots,k \}$$ is pretty ugly... is there a better way to indicate the described subset, working for any $n \in \mathbb{N}-\{0\}$ and $k \in \mathbb{N}-\{0,1\}$?

Thanks in advance for your help.

2

There are 2 best solutions below

5
On BEST ANSWER

If I understand correctly, your set can be described as $$ \bigcup_{1 \leqslant j \leqslant k} \bigl\{ (x_1, \ldots, x_{j-1}, c, x_{j+1}, \ldots, x_k) \mid c \in \{0, \ldots, n-1\} \bigr\} $$ EDIT. New attempt, following the OP comments. $$ \bigcup_{I \subsetneq \{1, \ldots, k\}} \bigcup_{c \in \{0, \ldots, n-1\}} \Biggl\{ (z_1, \ldots, z_k) \mid z_i = \begin{cases} c &\text{if $i \in I$}\\ x_i &\text{otherwise} \end{cases} \Biggr\} $$

3
On

Nobody will want to read a paragraph of set-builder notation. Words can be just as rigorous as symbols, and writing something that's easy to understand makes it more likely that there is no subtle mistake hidden in there.

I would write, for example:

A $k$-dimensional rook can move from a square $(x_1, x_2, \dots, x_k)$ to a square $(y_1, y_2,\dots,y_k)$ in a single move if there is some constant $c \in \mathbb Z$ such that $|x_i - y_i| \in \{0,c\}$ for each $i=1, 2, \dots, k$; additionally, there must be at least one coordinate $i$ such that $x_i = y_i$.

Or perhaps you want to lay the groundwork for other, similar definitions by giving a more general definition as a preliminary step.

We define a $d$-dimensional linear move of length $c$ to be a move from a square $(x_1, x_2, \dots, x_k)$ to another square $(y_1, y_2, \dots, y_k)$ such that:

  • For $d$ of the indices $i \in \{1,\dots,k\}$, we have $|x_i - y_i| = c$;
  • For all other indices $i \in \{1,\dots,k\}$, we have $x_i = y_i$.

A $k$-dimensional rook can make a $d$-dimensional linear move of any positive length, for all $d$ such that $1 \le d \le k-1$. A $k$-dimensional queen, on the other hand, can...

(Or maybe, "there is a set $I \subseteq \{1,\dots,k\}$ with $|I|=d$ such that for all indices $i \in I$, we have $|x_i - y_i|=c$, and for $i \notin I$, we have $x_i = y_i$".)

If you want to refer to the subset of squares where a rook can move to, then you can follow up with introducing notation for that subset, such as:

We define $R(x_1, x_2, \dots, x_k) \subseteq \{0,1,\dots,n-1\}^k$ to be the set of all squares that a $k$-dimensional rook can reach in one move from the square $(x_1, x_2, \dots, x_k)$.