Studies of Euler diagrams/NP tables

From testwiki
Jump to navigation Jump to search

Template:EuDi

These tables are in category Template:C.

The natural subdivisions of an NP equivalence class are permutation and negation equivalence classes.

These tables show all functions of an NP-EC (hereafter just EC) with the P-ECs as rows and the N-ECs as groups of columns.

The functions are represented by their Zhegalkin indices, and the order of the rows and columns is based on these numbers.
The chosen representative is highlighted in violet, and its name is shown in the header.
The transformations, denoted by number icons, refer to this representative. (Otherwise it has no influence on the table.)

The following table shows the EC of Template:Boolfname Template:Zhe and its complement Template:Boolflink Template:Zhe.
It has three N-ECs, each with 8 functions.
Its six P-ECs contain 3 functions if the Venn diagrams are symmetric, or 6 functions if they are not.

Template:Collapsible START Template:Studies of Euler diagrams/takate NP table Template:Collapsible END


Template:Collapsible START

Hovering over the numbers will show a mouseover.
Its first line is the Zhegalkin index in little-endian binary (which corresponds to the algebraic normal form).
The second line is the truth table of the Boolean function.
The screenshot on the right shows a mouseover in the table above.
(The diagram to its right shows how the second line is derived from the first.)

Template:Multiple image

Template:Collapsible END


The number icons denote the transformations from the representative to each particular function.
A transformation is a signed permutation, i.e. a negator pattern paired with a permutation — both of which can be represented by a natural number.
While the permutation index numbers are unambiguous, there is some potential confusion about numbering the negator patterns.
Generally it is more useful to refer to which values are negated. (See this 8×6 matrix.)
But functions in the same P-EC have the same negated places in common — which are thus used as row labels in these tables.
To avoid confusion, the icons referring to negated values are round, and those referring to negated places are square.

Template:Collapsible START

This signed permutation is based on the permutation (1, 2, 0) with the index number .
The distribution of negators will usually be described as (1, 1, 0) , based on which values are negated. (Seen in the rows of the matrix.)
But it can also be described as (1, 0, 1) , based on which places are negated. (Seen in the columns of the matrix.)

from discretehelpers.sig_perm import SigPerm


sigperm = SigPerm(valneg_index=3, perm_index=4)

sigperm.sequence_string()
# '(~1, 2, ~0)'

sigperm.matrix()
# array([[ 0,  0, -1],
#        [-1,  0,  0],
#        [ 0,  1,  0]])

sigperm.keyneg_index
# 5

Template:Collapsible END

So each function corresponds to a set of transformations.
To such a set corresponds a set of keyneg indices, a set of valneg indices and a set of perm indices.
P-ECs (rows) have the same set of keyneg indices, and N-ECs (column groups) have the same set of perm indices in common.
The sets of perm indices are Template:W of The Template:W Sn, where n is the arity. (See Template:W.)
The valneg set is shown under each Zhegalkin index. Hovering over it will show a table with the whole set of transformations.

Template:Collapsible START The representative function of the table above is Template:Boolfname Template:Zhe. The hover table is shown for Template:Boolfname Template:Zhe.
Below is shown how the two transformations turn the Euler diagram of the former into (mirrored) Euler diagrams of the latter.

Template:Boolfname
Template:Boolfname
Template:Boolfname
hover table

 

(012¬02¬1)

 

(0122¬0¬1)

Template:Collapsible END


Often the set of valneg indices of a function contains only a single element.
Two are also common:

Template:Collapsible START Template:Studies of Euler diagrams/makoto NP table Template:Collapsible END

There is only one 3-ary EC with three:

Template:Collapsible START Template:Studies of Euler diagrams/berusa NP table Template:Collapsible END

Eight are an extreme case. This is very rare:
Template:Collapsible START Template:Studies of Euler diagrams/fidele NP table Template:Collapsible END (This table is wider than most screens. The hover tables on the right can be seen by keeping the mouse on them, and pressing the right arrow key.)