On Tuesday, October 23, 2012 5:02:47 PM UTC-4, PT wrote:SPOILER
> g(n) is a function of any integer n, positive or negative, which
> produces an integer value, with conditions:
> a) g(g(n)) = n
> b) g(g(n + 2) + 2) = n
> c) g(0) = 1
> 1. Determine g(n)
> 2. Prove your solution is unique.
> Paul T.
The function is g(n) = 1 - n
It satisfy all three requirements by inspection.
Proof of uniqueness by induction:
Since g(0) = 1, g(g(0)) = g(1) = 0 (from a and c).
Assuming that g(n) = 1 - n for n = 1, 0, ..., m where m is a negative integer:
g(g(m + 1) + 2) = m - 1 (from b)
This proves that g(n) = 1 - n for any negative n.
For positive n >= 2 g(1 - n) = 1 - ( 1 - n ) = n since 1 - n is negative.
Please reply to ilan dot mayer at hotmail dot com
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.