I am trying to design a circuit that outputs a logical 1 if the input is high-impedance, and a 0 otherwise.  

Any idea how I might implement this?  I would prefer to use off-the-shelf parts (no programming).

Truth table:

I|O
---
X|1
0|0
1|0


I was thinking something along the lines of a pull up resistor with an NPN transistor.  Thoughts?


Question: Adding/multiplying summations of different indices to prove Cauchy-Schwarz
Answer: Hint: start off by expanding the square:
$$\sum_{i=1}^{n}\sum_{j=1}^{n}(a_ib_j-a_jb_i)^2
  =\sum_{i=1}^{n}\sum_{j=1}^{n}(a_i^2b_j^2-2a_ib_ja_jb_i+a_j^2b_i^2)$$
Now split the sum:
$$\sum_{i=1}^{n}\sum_{j=1}^{n}(a_ib_j-a_jb_i)^2
  =\sum_{i=1}^{n}\sum_{j=1}^{n}a_i^2b_j^2
    -\sum_{i=1}^{n}\sum_{j=1}^{n}2a_ib_ja_jb_i
    +\sum_{i=1}^{n}\sum_{j=1}^{n}a_j^2b_i^2\ .$$
The reason this RHS equals the previous RHS is that you are adding up the same things, only in a different order.  Now for the first sum, think about what happens when $j$ varies from $1$ to $n$.  As this happens, the $a_i^2$ never changes, so it is a constant factor and can be taken out of the sum:
$$\sum_{i=1}^{n}\sum_{j=1}^{n}a_i^2b_j^2
  =\sum_{i=1}^{n}\Bigl(\sum_{j=1}^{n}a_i^2b_j^2\Bigr)
  =\sum_{i=1}^{n}a_i^2\Bigl(\sum_{j=1}^{n}b_j^2\Bigr)\ .$$
And now the sum over $j$ adds up to a fixed quantity which does not depend on $i$, so it can be taken outside the sum over $i$ to give
$$\sum_{i=1}^{n}\sum_{j=1}^{n}a_i^2b_j^2
  =\Bigl(\sum_{i=1}^{n}a_i^2\Bigr)\Bigl(\sum_{j=1}^{n}b_j^2\Bigr)\ .$$

The last two steps are really just the same as
$$\sum_{j=1}^3ab_j=ab_1+ab_2+ab_3=a(b_1+b_2+b_3)=a\sum_{j=1}^3b_j\ .$$

Hopefully you can now treat the rest of the original expression in the same way.  Good luck!