Let $\mathcal{F}:=\{f\_a\}\_{a\in\mathbb{Z}}$ be a set of symbols indexed by the integers and satisfying the rules:
$$f\_a=f\_{-a} \qquad \text{and} \qquad f\_af\_b=f\_{a+b}+f\_{a-b}.$$
Define a linear operator $\mathcal{L}$ on $\mathcal{F}$ according to
$$\mathcal{L}f\_a=\begin{cases} 1 \qquad \text{if $a=0$} \\ 0 \qquad \text{otherwise}. \end{cases}$$



> 
> **Question 1.** If $a\_i\in\mathbb{Z}$, then is there a nice formula or an efficient algorithm to compute
>  $$\mathcal{L}(f\_{a\_1}f\_{a\_2}\cdots f\_{a\_k}) \,\,?$$
> 
> 
> 


For example, $\mathcal{L}f\_af\_b=\mathcal{L}f\_{a+b}+\mathcal{L}f\_{a-b}$.



> 
> **Question 2.** Fix $k\geq1$. What is the range of values for $\mathcal{L}(f\_{a\_1}f\_{a\_2}\cdots f\_{a\_k})$ if $(a\_1,\dots,a\_k)\in\mathbb{Z}^k$ runs through all possible $k$-tuples?
> 
> 
> 


For example, when $k=1$ the answer is $\{0,1\}$; when $k=2$ the answer is $\{0,1,2,4\}$.



valuation from $\mathbb{Z}^n$ into $\mathbb{Z}$. Easy way?
Suppose we have a knapsack of size $K = 10$, and items of size
$x\_1=4; x\_2 = 5; x\_3 = 6$. Clearly there is an exact solution to the decision version of the 0/1 knapsack problem: $K - x\_1 - x\_3 = 0$. If we set $A = 2K - x\_1 - x\_2 - x\_3$, this solution gives us $A - x\_1 + x\_2 - x\_3 = 0$.


If $K$ is the size of a knapsack and $x\_i$ is the weight of the $i$th item, 
then set $a\_1 = 2K - \sum\_{i} x\_i$ and $a\_i = x\_{i-1}$. If you can determine if the expression $a\_1 \pm a\_2 \pm a\_3 \pm \ldots$ is ever 0 you can solve the knapsack problem. Therefore I expect there is no efficient solution.


