# Binary / Integer Conversion in R

I’ve been poking around in R with an unconstrained optimization problem involving binary decision variables. (Trust me, it’s not as trivial as it sounds.) I wanted to explore the entire solution space. Assuming \(n\) binary decisions, this means looking at the set \(\{0,1\}^n\), which contains \(2^n\) 0-1 vectors of dimension \(n\). For reasons I won’t …