A balanced ternary string of length n is a function f : [n] → {−1, 0, 1}. The weight of such a string is the sum f(1) +
Posted: Wed May 04, 2022 1:47 pm
A balanced ternary string of length n is a function f : [n] → {−1, 0, 1}. The weight of such a string is the sum f(1) + ƒ(2) + + f(n). Show that the number of balanced ternary strings with weight 0 is 2k ak k where ak = (21) if 2k ≤n, and 0 otherwise. 2k k>0