1
$\begingroup$

What is the meaning of the notation

$sign(k \mod 4)$

where $k$ is a positive integer? The notation can be found, for example in the paper "Minimum triangle-free graphs".

  • 2
    $k \mod 4$ is the remainder of $k$ divided by $4$. The $sign$ function is 1 for positive arguments, -1 for negative arguments, and 0 if the argument is 0. So, $sign(k\mod 4)$ will be 0 if $k$ is divisible by 4 and 1 otherwise.2011-11-25
  • 1
    This reminds me of [Iverson's bracket convention](http://en.wikipedia.org/wiki/Iverson_bracket)2011-11-25
  • 0
    @DavidMitra: please post that as an answer?2011-11-25

2 Answers 2

2

$k\bmod 4$ is the remainder obtained when $k$ is divided by $4$ (for example, $14\bmod 3$ is $2$).

The sign function ($sign$, as you have it) is $1$ for positive arguments, $-1$ for negative arguments, and $0$ if the argument is $0$. That is: $$ {\rm sign}\,(x)=\cases{\hphantom{-}1,& x>0\cr \hphantom{-}0,&x=0\cr -1,& x<0 }\ \ . $$

So, ${\rm sign}\,(k\bmod4)$ will be $0$ if $k$ is divisible by $4$ and $1$ otherwise.

  • 0
    Note that depending on the computing environment, $\mathrm{sign}(0)$ can either be $1$ or $0$. `SIGN(1,0)` in FORTRAN returns `1`, for instance.2011-11-25
  • 0
    Hi, Thanks for the answer. If the convention was that sign$(0) = 1$ then we'd have sign$(k \mod 4) = 1$ for all $k$, so I'm sure it's meant to be 0.2011-11-25
  • 0
    @Cye Beware that this answer implicitly assumes that the $\rm\:mod\:$ function employs *nonnegative* residue class representatives - which is not always true - see my answer.2012-01-11
1

As is often the case, one can easily deduce the meaning from its use. On p. 88 we find

enter image description here
Reading the proof we infer that for $\rm\ x\ =\ k\ mod\ 4\ $

$\rm\qquad\qquad\qquad x\ =\ 0\ \ \Rightarrow\ \ sign(x)\ =\ 0$

$\rm\qquad\qquad\qquad x\ \ne\ 0\ \ \Rightarrow\ \ sign(x)\ =\ 1$

So the author requires that, $\rm\ mod\ 4,\:$ the $\rm\:sign\:$ map fixes $0$ and maps all nonzero residues to $\rm\:1\:.\:$

Note that if the $\rm\:mod\ 4\:$ map uses a balanced residue system $\rm\:\{-1, 0, 1, 2\}\ $ then the $\rm\:sign\:$ map is not that given in David's answer, since it has $\rm\:sign(-1) = -1\:,\:$ but the author requires $\rm\:sign(-1) = 1\:.$