actually there are infinite number of sequences that match it
for example if the absolute differences are 3 2 5 1
one possible sequence is 6 3 5 0 1 one other is 7 4 6 1 2 or 8 5 7 2 3
and you can add any integer value to all elements and the result will still
be valid
actually you can start with
If for a number n digits long, the absolute difference between
adjacent digits is given, how to find out the number of different
numbers with these absolute differences ?
for eg,
if n=5
and the absolute differences are
3 2 5 1
then 1 possible number is
6 3 5 0 1(because |6-3|=3,|3-5|=2 and so
I have been trying this problem for quite some time now...but havent
found anything concrete...can anyone solve this?
http://acm.zju.edu.cn/show_problem.php?pid=2642
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups