2
$\begingroup$

What exactly does this notation mean when using it to define a function?

$$f(x) = f(\text{ sum of the digits of }x) \{ \mathrm{if}( x \ge 10) \} = x \{ \mathrm{if}( x \lt 10) \} $$

Thanks

  • 1
    It's a pretty good bet that this function is intended to be defined only for $x\in\mathbb{N}$ (for $\mathbb{N}$ including or excluding 0—that is, the nonnegative integers or the positive integers).2011-02-14
  • 0
    An edit like that makes my question silly,hence the rollback.2011-02-14
  • 0
    @Damir: The edit does not make it silly, the edit makes it clear. The notation you use is not standard for describing functions by cases. If your problem is with the notation, then please say so explicitly in the body and using the tag [notation], rather than [function].2011-02-14
  • 0
    @ Arturo Magidin:Yes my problem is precisely with notations,since if it had been stated like this then it's won't be difficult for me figure it out,however could you please tell from where I could learn about those notations?2011-02-14
  • 0
    @Damir: Then clarify that the issue is the *notation*, not the *function*. Your use of tags completely misdirected the reader. And your use of "function definition" instead of explicitly saying the problem is the **notation** is also highly misleading as to what your issue is.2011-02-14
  • 0
    I understand the notations for this functions only from the answers,however I have not idea about what this notations are.Any body like to comment on that?2011-02-14
  • 0
    @Debanjan: I don't think I've ever seen it before, but it seemed pretty straightforward; it is probably derived from some programming language/computer algebra system interface or other.2011-02-14
  • 0
    @Arturo Magidin:Aha,I get it! Just the whole thing in a single line makes it a bit messy.Thanks.2011-02-14

2 Answers 2

5

It means that which formula applies depends on which condition holds. Explicilty, it is equivalent to $$f(x) = \left\{\begin{array}{ll} f(\mbox{sum of the digits of $x$}) &\mbox{if $x\geq 10$}\\ x &\mbox{if $x\lt 10$.} \end{array}\right.$$ which recursively defines the function for every positive integer.

For example, if $x=481754$, then $x\geq 10$, so \begin{align*} f(x) &= f(481754) = f(4+8+1+7+5+4)\\ &= f(29) = f(2+9)\\ &= f(11) = f(1+1)\\ &= f(2) = 2. \end{align*}

This is the function that reduces an integer to its residue class modulo $9$ ("casting out nines"), using $9$ as the representative for the multiples of $9$ (instead of $0$).

  • 1
    Adding to Arturo's answer one can compute $f(x)$ as :$$ f(x) = \left\{\begin{array}{ll} 9 &\mbox{if $9|x$}\\ Mod[x,9] &\mbox{ otherwise } \end{array}\right.$$2011-02-14
5

If $x\lt 10$, $f(x)=x$

If $x \ge 10$, to get $f(x)$ add up the digits of x, presumably in base 10, then repeat until you get below 10.

So for example, $f(6)=6, f(18)=9, f(987)=f(24)=6, f(1234)=f(10)=1$

  • 1
    Not quite; there is an extra $f$ in the definition. This is the "casting out nines" function. It got lost in the editing.2011-02-14
  • 0
    @Arturo: missed it while PEV was editing to make it clear. I'll update2011-02-14
  • 0
    Just to be clear: it wasn't a criticism, it was just a heads up. (-:2011-02-14
  • 0
    @Arturo: no problem2011-02-14