2

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

Arturo Magidin
  • 398,050
  • 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). – Isaac Feb 14 '11 at 19:20
  • An edit like that makes my question silly,hence the rollback. –  Feb 14 '11 at 19:45
  • @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]. – Arturo Magidin Feb 14 '11 at 19:52
  • @ 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? –  Feb 14 '11 at 19:56
  • @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. – Arturo Magidin Feb 14 '11 at 19:59
  • 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? – Quixotic Feb 14 '11 at 20:37
  • @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. – Arturo Magidin Feb 14 '11 at 20:44
  • @Arturo Magidin:Aha,I get it! Just the whole thing in a single line makes it a bit messy.Thanks. – Quixotic Feb 14 '11 at 20:48

2 Answers2

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$

Ross Millikan
  • 374,822
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$).

Arturo Magidin
  • 398,050
  • 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.$$ – Quixotic Feb 14 '11 at 20:32