MathDB
Find functions: The dist. betw.a & b of X is defined by.

Source: OBM 2000 - Brazil

August 23, 2004
functionalgebra unsolvedalgebra

Problem Statement

Let X X the set of all sequences {a1,a2,,a2000} \{a_1, a_2,\ldots , a_{2000}\}, such that each of the first 1000 terms is 0, 1 or 2, and each of the remaining terms is 0 or 1. The distance between two members a a and b b of X X is defined as the number of i i for which ai a_i and bi b_i are different. Find the number of functions f:XX f : X \to X which preserve the distance.