# Math Help - Converting Sentence to Boolean Expression...

1. ## Converting Sentence to Boolean Expression...

Hey guys,

If I have three variables: X, Y, and Z, and I want to convert "exactly two of the three variables" into a boolean expression, would I express that as...

(X^Y^!Z) \/ (X^!Y^Z) \/ (!X^Y^Z)

...with ^ being AND, \/ being OR, and ! being NOT?

2. Hello, inthedl!

If I have three variables: $X, Y,\text{ and }Z$, and I want to convert

"exactly two of the three variables" into a boolean expression,

would I express that as: . $(X \wedge Y \wedge \sim\!Z) \vee (X \wedge \sim\!Y \wedge Z) \vee (\sim\!X \wedge Y \wedge Z)$

Yes, that's correct.

The three cases are mutually exclusive, so an ordinary OR will suffice.

3. Thanks! I appreciate your help!