- Math
- Advanced Math
- transforming between two encodings for boolean vectors a boolean nvector...
Question: transforming between two encodings for boolean vectors a boolean nvector...
Question details
Transforming between two encodings for Boolean vectors. A
Boolean n-vector is one
for which all entries are either 0 or 1. Such vectors are used to
encode whether each
of n conditions holds, with a i = 1 meaning that condition i holds.
Another common
encoding of the same information uses the two values −1 and +1 for
the entries. For
example the Boolean vector (0, 1, 1, 0) would be written using this
alternative encoding
as (−1, +1, +1, −1). Suppose that x is a Boolean vector with
entries that are 0 or 1, and
y is a vector encoding the same information using the values −1 and
+1. Express y in terms of x. Express x in terms of y.
Solution by an expert tutor
