For integer $N$ consider the mapping $$f : (0,1)^N \to \mathbb{R}, \quad x \mapsto \min\_{b \in \{0,1\}^N} \left\{ x^b + x^{1-b} \right\},$$
where $x^b = x\_1^{b\_1} \cdots x\_N^{b\_N}$ and $1-b = (1-b\_1, \ldots, 1-b\_N)$. Note that $x$ is a vector of reals and $b$ is a binary vector. 


Is there a faster than $O(2^N)$ algorithm (worst-case in $x$) for computing $f(x)$?



Complexity of this minimization
To minimize $x^b + x^{1-b}$, we must find $b$ such that $x^b$ and $x^{1-b}$ are as close together as possible.


Taking logs, this is equivalent to partitioning $(\log(x\_1), \log(x\_2), \dots, \log(x\_n))$ into two subsets whose sums are as close together as possible. This is the well-known subset-sum problem, which is $\mathsf{NP}$-complete in general, but has polytime approximation algorithms.


