I have a binary array like this:

$$A = [0,1,0,0,1,0]\,.$$

I'm trying to find a way to calculate how many arrays of the same length exist that have a Euclidean distance of 2 or less from this array.

So, how many arrays of length 6 exist where

$$\sqrt{\Sigma(A_{_i} - B_{_i})^2}\leq 2\,?$$

I'm trying to find or create a formula that takes an array like above and outputs a count of how many possible binary arrays exist that fit the conditions of the above formula.

I've looked online for a formula without success.

没有正确的解决方案

许可以下: CC-BY-SA归因
不隶属于 cs.stackexchange
scroll top