Home page for accesible maths 2 Logic

Style control - access keys in brackets

Font (2 3) - + Letter spacing (4 5) - + Word spacing (6 7) - + Line spacing (8 9) - +

2.2 The parity model

The simple model with which we begin is concerned with integers and whether they are odd or even; we shall call it the parity model. There are various technical terms associated with it:

  • the universe;

  • variables;

  • the parity values;

  • the parity switcher;

  • the parity table;

  • the operations;

  • expressions;

  • equivalence of expressions.

The universe for the model is the set \mathbb{Z} of integers. The variables, denoted by letters x, y, zx,\,y,\,z and so on, can stand for any elements of the universe. For example, xx might represent the integer 33, while yy stands for -14-14.

There are two parity values DD (for ‘‘odd’’) and EE (for ‘‘even’’) which any variable can take, depending on which element of the universe it represents. Thus if xx represents 33, then the parity value of xx is DD (because the number 33 is odd), and if yy represents -14-14, then the parity value of yy is EE (because -14-14 is even). (Note: using OO for ‘‘odd’’ might cause confusion, so we prefer DD.)

The parity switcher \sim (called ‘‘twiddles’’) is an operation on the variables, defined by setting the integer represented by xx to be 11 minus the integer represented by xx. For example, if xx represents 33, then x\sim\!x represents 1-3=-21-3=-2, and if yy represents -14-14, then y\sim\!y represents 1-(-14)=151-(-14)=15. We observe that the parity value of a variable xx is always the opposite of that of x\sim\!x; we summarize this observation in the following parity table.

xx x\sim\!x
DD E
EE D

Moreover, we note that (x)=x\sim\!(\sim\!x)=x because 1-(1-x)=1-1+x=x1-(1-x)=1-1+x=x.

There are two operations ++ (‘‘plus’’) and ×\times (‘‘times’’) which we can use to create expressions from the variables. Thus for variables xx and yy, we can form x+yx+y and x×yx\times y. For example, if xx and yy represent 33 and -14-14, respectively, then x+yx+y represents 3+(-14)=-11,3+(-14)=-11, while x×yx\times y represents 3×(-14)=-423\times(-14)=-42. The expressions obtained in this way also have parity values; they are completely determined by the parity values of the variables concerned as shown in the following parity tables.

xx yy x+yx+y xx yy x×yx\times y
DD DD E DD DD D
DD EE D DD EE E
EE DD D EE DD E
EE EE E EE EE E

Note that each table has 22=42^{2}=4 rows to allow for all possible combinations of the parity values of the two variables xx and yy.

The operations \sim, ++ and ×\times can be applied to expressions (as well as variables), enabling us to construct more complex expressions. When an expression involves more than a single operation, we use brackets to clarify its structure, and we work from the inside of the brackets outwards. For example, in the expression ((x+y)×z)+y\bigl((x+y)\times z\bigr)+y, we first create x+yx+y, we then multiply this by zz, and finally we add yy.

We can form parity tables for complicated expressions by building them up column by column. For example, the expression ((x+y)×(x+z))+(y×z)\bigl((x+y)\times(x+z)\bigr)+(y\times z) has the following table.

xx yy zz x+yx+y x+zx+z (x+y)×(x+z)(x+y)\times(x+z) y×zy\times z ((x+y)×(x+z))+(y×z)\bigl((x+y)\times(x+z)\bigr)+(y\times z)
DD DD DD E E E D D
DD DD EE E D E E E
DD EE DD D E E E E
DD EE EE D D D E D
EE DD DD D D D D E
EE DD EE D E E E E
EE EE DD E D E E E
EE EE EE E E E E E

Note that this table has 23=82^{3}=8 rows to allow for all possible combinations of the parity values of the three variables xx, yy and zz.

In some cases we may find that two different expressions have the same parity table. For example, x×((y+z))x\times\bigl(\sim\!(y+z)\bigr) has the same parity table as ((x+y)×(x+z))+(y×z)\bigl((x+y)\times(x+z)\bigr)+(y\times z) because the right-hand column of the following table is the same as that of the table above.

xx yy zz y+zy+z (y+z)\sim\!(y+z) x×((y+z))x\times\bigl(\sim\!(y+z)\bigr)
DD DD DD E D D
DD DD EE D E E
DD EE DD D E E
DD EE EE E D D
EE DD DD E D E
EE DD EE D E E
EE EE DD D E E
EE EE EE E D E

This means that, whatever elements of the universe are represented by xx, yy and zz, the two expressions will have the same parity, that is, both will be odd or both will be even. We call such expressions equivalent.