Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

If I convert 47°F to Celsius, rounding to the nearest integer, I get 8°C. If I then convert back to Fahrenheit, again rounding, I get 46°F. Back to Celsius, 8°C. Now of course if I continue this process it will remain stable, going back and forth between 8°C and 46°F. Will it always stabilize, for any given starting value?

More generally, suppose I have an arbitrary linear function, $f(x) = ax + b$, with inverse $f^{-1}(x) = \frac {x - b} a$. Using the rounding function $r(x) = \lfloor x + \frac 1 2 \rfloor$, define the round-trip function $g = r \circ f^{-1} \circ r \circ f$. Then the question is, does $g = g \circ g$? If not, is there always some $n$ for which $g^n = g^{n+1}$?

Empirically, it seems that $g$ is idempotent, but the proof has defied my meagre abilities.

Also, are there any more general things we can say? For instance if $f$ isn't necessarily linear, but strictly monotone, does the process of repeatedly applying, rounding, inverting, and rounding again always converge?

PS: Please feel free to add meaningful tags to this... I'm not sure what would be appropriate for this question.

Edit

Vlad has found a counterexample, so let me amend the definition of rounding to be that if the fractional part is exactly .5, it yields the adjacent even number...

share|improve this question
add comment

1 Answer

Consider the case of $f(x) = x + \frac12$.

You get $$ n\mathrel{\mathop{\longmapsto}^f} \left(n+\frac12\right)\mathrel{\mathop{\longmapsto}^{rounding}}(n+1)\mathrel{\mathop{\longmapsto}^{f^{-1}}}\left(n+\frac12\right)\mathrel{\mathop{\longmapsto}^{rounding}} (n+1)$$ for $n\in\mathbb Z$. So for this $f$ the sequence wouldn't stabilize, because $g(n) = n + 1$.

share|improve this answer
    
Nice counterexample! What if I changed the definition of rounding to say that if the fractional part is exactly .5, it yields the adjacent even number? –  pelotom Aug 18 '11 at 9:31
    
@pelotom You will have the same problem potentially with $f(x)=x+1/4$ –  Olivier Bégassat Aug 18 '11 at 9:38
    
@Olivier - Hm, I don't see how? For what initial value(s) would that be a problem? –  pelotom Aug 18 '11 at 9:46
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.