Not a member?

Discussion Groups | Comp.DSP | today's puzzle

There are 23 messages in this thread.

You are currently looking at messages 1 to .

Is this discussion worth a thumbs up?

0

today's puzzle - PT - 2012-10-23 17:02:00

```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.
```
______________________________

Re: today's puzzle - 2012-10-23 18:05:00

```On Tuesday, October 23, 2012 5:02:48 PM UTC-4, PT wrote:
> 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.

g(n)= 1-n
```
______________________________

Re: today's puzzle - glen herrmannsfeldt - 2012-10-23 19:38:00

```c...@claysturner.com wrote:
> On Tuesday, October 23, 2012 5:02:48 PM UTC-4, PT wrote:
>> 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.

> g(n)= 1-n

I agree, but you forgot step 2.

-- glen
```
______________________________

Re: today's puzzle - Tim Wescott - 2012-10-23 19:57:00

```On Tue, 23 Oct 2012 23:38:16 +0000, glen herrmannsfeldt wrote:

> c...@claysturner.com wrote:
>> On Tuesday, October 23, 2012 5:02:48 PM UTC-4, PT wrote:
>>> 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.
>
>> g(n)= 1-n
>
> I agree, but you forgot step 2.
>
> -- glen

Proof of uniqueness:

The OP would be terrifically embarrassed if there were more than one
solution.

Therefore, the solution is unique.

--
Tim Wescott
Control system and signal processing consulting
www.wescottdesign.com
```
______________________________

Re: today's puzzle - Eric Jacobsen - 2012-10-23 20:19:00

```On Tue, 23 Oct 2012 23:38:16 +0000 (UTC), glen herrmannsfeldt
<g...@ugcs.caltech.edu> wrote:

>c...@claysturner.com wrote:
>> On Tuesday, October 23, 2012 5:02:48 PM UTC-4, PT wrote:
>>> 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.
>
>> g(n)= 1-n
>
>I agree, but you forgot step 2.
>
>-- glen

But step 3 = Profit!

Eric Jacobsen
Anchor Hill Communications
http://www.anchorhill.com
```
______________________________

Re: today's puzzle - 2012-10-23 22:57:00

```Le

On Tuesday, October 23, 2012 7:38:17 PM UTC-4, glen herrmannsfeldt wrote:
> clay wrote:
>
> > On Tuesday, October 23, 2012 5:02:48 PM UTC-4, PT wrote:
>
> >> 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.
>
>
>
> > g(n)= 1-n
>
>
>
> I agree, but you forgot step 2.
>
>
>
> -- glen

Glen, here's this

cond a ->  g(g(n) = n

do g^-1() of both sides and find

g(n) = g^-1(n)   self inverting

cond b ->  g(g(n+2)+2)=n

do g^-1() of both sides and find

g(n+2) = g(n)-2

Now rewrite as  ( g(n+2) - g(n) )/ ((n+2) - (n)) = -1 = slope for all n

cond c -> g(0) = 1 defines the intercept

Thus with a constant slope of -1 and an intercept of 1, we have a uniquely defined 1st order
polynomial. All higher order derivatives are equal to 0.

Clay

```
______________________________

Re: today's puzzle - William Elliot - 2012-10-23 23:38:00

```On Tue, 23 Oct 2012, PT wrote:

> 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

Let f(n) = 1 - n.

ff(n) = f(1 - n) = 1 - (1 - n) = n
f(f(n + 2) + 2) = f(1 - (n + 2) + 2) = f(1 - n) = n
f(0) = 1

> 1. Determine g(n)

g = f.

> 2. Prove your solution is unique.

```
______________________________

Re: today's puzzle - William Elliot - 2012-10-24 05:28:00

```On Tue, 23 Oct 2012, William Elliot wrote:
> On Tue, 23 Oct 2012, PT wrote:
>
> > 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

> Let f(n) = 1 - n.
>
> ff(n) = f(1 - n) = 1 - (1 - n) = n
> f(f(n + 2) + 2) = f(1 - (n + 2) + 2) = f(1 - n) = n
> f(0) = 1
>
> > 1. Determine g(n)
>
> g = f.
>
> > 2. Prove your solution is unique.
>
f(0) = 1 = g(0)
f(1) = 0 = gg(0) = g(1)

If f(n) = g(n), then

n = g(g(n + 2) + 2)
1 - n = f(n) = g(n) = g(n + 2) + 2
g(n + 2) = 1 - n - 2 = 1 - (n + 2) = f(n + 2)

By induction, for all n >= 0, f(n) = g(n).

g(-0) = 1 = f(-0)

g(g(-1 + 2) + 2) = -1
g(-1) = g(-1 + 2) + 2 = g(1) + 2 = 2 = f(-1)

If n >= 0 and f(-n) = g(-n), then
g(g(-(n+2) + 2) + 2) = -(n + 2)
g(-(n + 2)) = g(-n) + 2 = 1 + n + 2 = 1 - (-(n + 2)) = f(-(n + 2))

Again by induction, for all n >= 0, g(-n) = g(-n).  Done.
```
______________________________

Re: today's puzzle - Scott Hemphill - 2012-10-27 17:19:00

```c...@claysturner.com writes:

> Glen, here's this
>
>
> cond a ->  g(g(n) = n
>
>       do g^-1() of both sides and find
>
>       g(n) = g^-1(n)   self inverting
>
> cond b ->  g(g(n+2)+2)=n
>
>       do g^-1() of both sides and find
>
>       g(n+2) = g(n)-2
>
>       Now rewrite as  ( g(n+2) - g(n) )/ ((n+2) - (n)) = -1 = slope for all n

Slope?  If you're thinking of the slope of a line (or curve) there isn't
one.  The function is only defined on the integers.

> cond c -> g(0) = 1 defines the intercept
>
> Thus with a constant slope of -1 and an intercept of 1, we have a uniquely defined 1st
order polynomial. All higher order derivatives are equal to 0.

We don't necessarily have a polynomial, or derivatives.  Let me
illustrate by changing the problem slightly.

g(g(n)) = n, and g(n+2) = g(n)-2, as before.  But:

g(0) = 2

It turns out that this is sufficient only to define the values of g at
the even integers.  So we are also free to define:

g(1) = 11

And this defines g for the odd integers.  Now you have points on two
different lines.

Scott
--
Scott Hemphill	h...@alumni.caltech.edu
"This isn't flying.  This is falling, with style."  -- Buzz Lightyear
```
______________________________

Re: today's puzzle - 2012-10-29 21:35:00

```On Tuesday, October 23, 2012 5:02:48 PM UTC-4, PT wrote:
> 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.

If you change the problem then you change the answer. I just extented the problem to the reals
and found a solution consistant with the given constraints.

Clay
```
______________________________