clay@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. > > > > > > > > --- > > > > 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.I don't think you proved that your solution was unique. There are other functions that fit the solution. For instance, cos(2*pi*n)-n -jim> > Clay
today's puzzle
Started by ●October 23, 2012
Reply by ●October 30, 20122012-10-30
Reply by ●October 30, 20122012-10-30
On Tuesday, October 30, 2012 8:56:08 AM UTC-5, jim wrote:> I don't think you proved that your solution was unique. > > There are other functions that fit the solution. > > For instance, cos(2*pi*n)-nSince cos(2*pi*n) = 1 for all integers n, I don't see how this function differs from 1-n or from (-1)^2n - n or any other formula that reduces to 1-n. Or is it a requirement that there be a unique **formula** for the function? Dilip Sarwate
Reply by ●October 30, 20122012-10-30
dvsarwate wrote:> > On Tuesday, October 30, 2012 8:56:08 AM UTC-5, jim wrote: > > > I don't think you proved that your solution was unique. > > > > There are other functions that fit the solution. > > > > For instance, cos(2*pi*n)-n > > Since cos(2*pi*n) = 1 for all integers n, I don't > see how this function differs from 1-n or fromAs a function of real numbers it is quite different. It does produce the same result if you sample this function at integers. There was no requirement that the function be straight line between samples.> (-1)^2n - n or any other formula that reduces > to 1-n. Or is it a requirement that there be > a unique **formula** for the function?It satisfies the problem statement to find a function that satisfies the given conditions for integer input. -jim> > Dilip Sarwate
Reply by ●October 30, 20122012-10-30
jim <"sjedgingN0Sp"@m@mwt.net> writes:> dvsarwate wrote: >> >> On Tuesday, October 30, 2012 8:56:08 AM UTC-5, jim wrote: >> >> > I don't think you proved that your solution was unique. >> > >> > There are other functions that fit the solution. >> > >> > For instance, cos(2*pi*n)-n >> >> Since cos(2*pi*n) = 1 for all integers n, I don't >> see how this function differs from 1-n or from > > As a function of real numbers it is quite different. > It does produce the same result if you sample this > function at integers. There was no requirement that > the function be straight line between samples. > > > >> (-1)^2n - n or any other formula that reduces >> to 1-n. Or is it a requirement that there be >> a unique **formula** for the function? > > It satisfies the problem statement to find > a function that satisfies the given conditions > for integer input.Then the function is NOT unique - it can do anything between the integers. -- Randy Yates Digital Signal Labs http://www.digitalsignallabs.com
Reply by ●October 30, 20122012-10-30
jim <"sjedgingN0Sp"@m@mwt.net> writes:> clay@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. >> > >> > >> > >> > --- >> > >> > 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.Paul: You didn't quote me here, but my guess is that you were responding to my "changing the problem". All I did was change the values of g(0) and g(1), which didn't affect your analysis. Your analysis would then give the wrong answer.> I don't think you proved that your solution was unique. > There are other functions that fit the solution. > > For instance, cos(2*pi*n)-nThat's right, there are other continuous functions that solve the initial problem. Unfortunately, this one is not its own inverse. I can fix your example by taking the cosine and rotating it in the x-y plane: Let f(t) = (cos(sqrt(2)*pi*t)-1) / (sqrt(2)*pi) Then the function is defined parametrically: x = t/sqrt(2) + f(t)/sqrt(2) y = f(t)/sqrt(2) - t/sqrt(2) + 1 It can be plotted in Mathematica with this code: f[t_] := (Cos[Sqrt[2] Pi t] - 1)/(Sqrt[2] Pi); x = t/Sqrt[2] + f[t]/Sqrt[2]; y = f[t]/Sqrt[2] - t/Sqrt[2] + 1; ParametricPlot[{x, y}, {t, -10, 10}, AspectRatio -> Automatic]; Scott -- Scott Hemphill hemphill@alumni.caltech.edu "This isn't flying. This is falling, with style." -- Buzz Lightyear
Reply by ●October 30, 20122012-10-30
Randy Yates wrote:> > jim <"sjedgingN0Sp"@m@mwt.net> writes: > > > dvsarwate wrote: > >> > >> On Tuesday, October 30, 2012 8:56:08 AM UTC-5, jim wrote: > >> > >> > I don't think you proved that your solution was unique. > >> > > >> > There are other functions that fit the solution. > >> > > >> > For instance, cos(2*pi*n)-n > >> > >> Since cos(2*pi*n) = 1 for all integers n, I don't > >> see how this function differs from 1-n or from > > > > As a function of real numbers it is quite different. > > It does produce the same result if you sample this > > function at integers. There was no requirement that > > the function be straight line between samples. > > > > > > > >> (-1)^2n - n or any other formula that reduces > >> to 1-n. Or is it a requirement that there be > >> a unique **formula** for the function? > > > > It satisfies the problem statement to find > > a function that satisfies the given conditions > > for integer input. > > Then the function is NOT unique - it can do anything > between the integers.1. Determine g(n) 2. Prove your solution is unique. There seem to be many functions that satisfy the problem conditions, but my solution is unique because no one else proposed it :^) -jim> -- > Randy Yates > Digital Signal Labs > http://www.digitalsignallabs.com
Reply by ●October 30, 20122012-10-30
On Tuesday, October 30, 2012 9:54:19 AM UTC-7, jim wrote:> Randy Yates wrote: > > jim <"sjedgingN0Sp"@m@mwt.net> writes: > > > dvsarwate wrote: > >> > >> On Tuesday, October 30, 2012 8:56:08 AM UTC-5, jim wrote: > >> > >> > I don't think you proved that your solution was unique. > >> > > >> > There are other functions that fit the solution. > >> > > >> > For instance, cos(2*pi*n)-n > >> > >> Since cos(2*pi*n) = 1 for all integers n, I don't > >> see how this function differs from 1-n or from > > > > As a function of real numbers it is quite different. > > It does produce the same result if you sample this > > function at integers. There was no requirement that > > the function be straight line between samples. > > > > > > > >> (-1)^2n - n or any other formula that reduces > >> to 1-n. Or is it a requirement that there be > >> a unique **formula** for the function? > > > > It satisfies the problem statement to find > > a function that satisfies the given conditions > > for integer input. > > Then the function is NOT unique - it can do anything > between the integers. 1. Determine g(n) 2. Prove your solution is unique. There seem to be many functions that satisfy the problem conditions, but my solution is unique because no one else proposed it :^) -jim > -- > Randy Yates > Digital Signal Labs > http://www.digitalsignallabs.comI think the most unique solution is that the OP discovered how to get an answer for a homework question on comp.dsp: pretend it's a puzzle and sit back as everyone argues :)
Reply by ●October 30, 20122012-10-30
On Tuesday, October 30, 2012 10:25:10 AM UTC-5, jim wrote:> As a function of real numbers it is quite different. > > It does produce the same result if you sample this > > function at integers. There was no requirement that > > the function be straight line between samples.Sheer and utter nonsense! The function in question maps integers to integers, and among all functions that map integers to integers, the function that maps n to 1-n uniquely meets the requirements laid down by the OP. If you wish to extend the DOMAIN and RANGE of this function to the real numbers R, and ask "What function R --> R meets the requirements a) g(g(n)) = n, b) g(g(n+2)+2) = n, c) g(0) = 1 for integer arguments, and is the answer unique?" you are talking of a different problem entirely.
Reply by ●October 31, 20122012-10-31
PT <ptanenbaum@consultant.com> writes:> g(n) is a function of any integer n, positive or negative, which > produces an integer value, with conditions: > [...]This is in response to the recent domain/range discussion (including my errant conclusion recently in this thread). Dilip is right: read the problem carefully. g: Z --> Z (in the notation of Marsden and Tromba). -- Randy Yates Digital Signal Labs http://www.digitalsignallabs.com
Reply by ●October 31, 20122012-10-31
dvsarwate wrote:> > On Tuesday, October 30, 2012 10:25:10 AM UTC-5, jim wrote: > > > As a function of real numbers it is quite different. > > > > It does produce the same result if you sample this > > > > function at integers. There was no requirement that > > > > the function be straight line between samples. > > Sheer and utter nonsense! The function in > question maps integers to integers, and > among all functions that map integers to > integers, the function that maps n to 1-n > uniquely meets the requirements laid down > by the OP. If you wish to extend the DOMAIN > and RANGE of this function to the real numbers > R, and ask "What function R --> R meets the > requirements > > a) g(g(n)) = n, > b) g(g(n+2)+2) = n, > c) g(0) = 1 > > for integer arguments, and is the answer > unique?" you are talking of a different > problem entirely.Not entirely different - pretty much the same problem, but a bit more sensible. As the question was posed you have to ask yourself what is the point of inserting this statement into the problem: "g(n) is a function of any integer n, positive or negative, which produces an integer value," If 1-n is the only permissible function then the above statement is totally irrelevant.






