Thus said Shane Hathaway on Thu, 02 Nov 2006 15:30:02 MST:
> Eh? I'm not sure you understand the problem correctly.
I didn't at first, which is why I posted my first message. By the time I
posted my second message I thought I understood it, but I could still be
wrong. My question was about which sequence though.
> The problem is just asking whether successive elements vary more than
> a certain amount, where the maximum variance is one less than the
> number of elements in the sequence.
Here is the original question again:
We are looking for sequences of n > 0 integers where the absolute values
of the differences of successive elements are included in the set of
numbers 1 through n - 1.
Doesn't this say to check the absolute value of the difference between
two numbers in a sequence against a set of numbers 1, ... n-1? I suppose
one could infer that this is a test for the maximum variance of any two
integers in the sequence against one less than the number of elements in
the sequence and 1, but then why bother calling it a set of numbers 1
through n-1? Why not:
We are looking for sequences with n > 0 elements where the absolute
values of the differences of successive elements are all less than n
elements - 1 and greater than 1?
Thus, in his original example:
4 1 2 3
Tests would be made for 3, 1 and finally 1 against the set { 1 2 3 },
right?
Andy
--
[-----------[system uptime]--------------------------------------------]
4:21pm up 4 days, 6:07, 1 user, load average: 1.00, 1.00, 1.00
/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/