Bruce Varley

2011-05-21 13:17:16 UTC

This is an outcome of an industrial problem that's been solved with some

brute force computer work, this posting is just a result of my curiosity.

We had the task of checking an array of integers for duplicates, due to the

hardware involved the traditional approaches weren't suitable. One of our

people came up with an algo that works for the cases that we encounter in

the field, I'm wondering whether the result holds for all n.

There is an array of n integers between 1 and n, with no repeated members,

in any order. Let P be the product of all the entries, and S be the sum.

The postulate is that no other set of n integers, all between 1 and n

(obviously containing repeats) will have the same values for both P and S.

brute force computer work, this posting is just a result of my curiosity.

We had the task of checking an array of integers for duplicates, due to the

hardware involved the traditional approaches weren't suitable. One of our

people came up with an algo that works for the cases that we encounter in

the field, I'm wondering whether the result holds for all n.

There is an array of n integers between 1 and n, with no repeated members,

in any order. Let P be the product of all the entries, and S be the sum.

The postulate is that no other set of n integers, all between 1 and n

(obviously containing repeats) will have the same values for both P and S.