Mentors of Boolean functions
The mentor is a rather dubious soft property of a BF. But it seems surprisingly interesting.
It is found in three steps: Creating a family matrix, getting the senior nobles of its rows, and getting their prefects.
The first digits of the prefects form the mentor.
Template:Mentors of Boolean functions/illustrated examples 3-ary
The following images are the 4-ary equivalents of those above. The results are either the same as above, or the complement.
Template:Mentors of Boolean functions/illustrated examples 4-ary
Walsh permutations
A Boolean function has a unique mentor for a given arity. The map between mentors can be expressed by four different Walsh permutations.
(That is, because a BF can be denoted by its truth table or by its Zhegalkin index. In the images above, they are shown red and green.)
In all there are six Walsh permutations, which shall be denoted by Cyrillic letters:
Ж (Zhe), Ч (Che), Ш (Sha), Ю (Yu), Я (Ya), Щ (Shcha)
Their degree is , i.e. they correspond to invertible binary matrices.
(The letter Ж is used in two different ways: On its own it represents the permutation. Followed by an integer it represents a BF, identified by its Zhegalkin index.)
Template:Mentors of Boolean functions/four WP relationships
Ч and Ш are both self-inverse. Ю and Я are inverse to each other.
The matrix of Щ is part of a top right Sierpinki triangle. Its diagonals follow a negated XOR pattern. (See image.)
The matrix of Ш is almost the same, but with the top right entry inverted.
The matrix of Ч is a family matrix. Its top row is related to that of the Ш matrix. The calculation involves the Zhegalkin twin and reversing the truth table.
Template:Mentors of Boolean functions/code Che matrix
Template:Collapsible START
The red family matrix has the pattern of Ч.
The green matrix shows the twins of the red rows, and has the pattern of Ю and Я.
The blue matrix shows the twins of the green columns, and has the pattern of Ш.
Template:Mentors of Boolean functions/code WP vectors
See the fixed points of Ч and Ш ordered by weight: Ч, Ш
1-ary
The permutations are all six Walsh permutations of degree 2. Template:Spaces Ч = (0, 2, 1, 3) Template:Spaces Ш = (0, 1, 3, 2) Template:Spaces Щ = I (neutral permutation)
Template:Collapsible START Template:Mentors of Boolean functions/illustrated WP 1-ary Template:Collapsible END
2-ary
Ч = Ш = I (neutral permutation) Template:Spaces Ю = Я = Ж Template:Spaces Щ = (0, 1, 2, 3, 4, 5, 6, 7, 9, 8, 11, 10, 13, 12, 15, 14)
3-ary
Template:Mentors of Boolean functions/illustrated WP 3-ary
Template:Collapsible START Template:Mentors of Boolean functions/code/3-ary Template:Collapsible END
Template:Mentors of Boolean functions/small WP example 199
Permutation Я is related to quarter sharpness, which is seen in these images.
4-ary
Template:Mentors of Boolean functions/illustrated WP 4-ary
Template:Collapsible START Template:Mentors of Boolean functions/code/4-ary Template:Collapsible END
seminars
The mentor is not simply a bijection between Boolean functions, but between the truth tables for a given arity.
The permutation from Zhegalkin indices to those of their n-ary mentors is Шn. The beginning of Шn+1 is Щn. (This letter has a little hook on the right.)
These two permutations are very similar. They are equal in the first half, and differ by exchanged neighbors in the second.
Neighboring Zhegalkin indices (i.e. 2·n and 2·n+1) denote complements.
So although there is no mentor bijection between Boolean functions, there is one between pairs of complements.
Complement and mentor partition the set of all Boolean functions into blocks of size 4 or 2. Such a block shall be called (big or small) seminar.
The Zhegalkin indices in a big seminar are with even and , so it can be represented by the pair .
An example of a seminar is {138, 139, 156, 157}, represented as (138, 156). See image. In the permutation it is represented by the pair (69, 78).
The pairs are the cycles of a self-inverse Walsh permutation of degree . (For arity 3 the degree is 7, and the permuted integers are 0...127.)
For arities 1 and 2 this permutation is neutral. For arity 3 is has 64 fixed points (of 128 places, i.e. 1/2). For arity 5 it has 1024 fixed points (of 32768 places, i.e. 1/32).
The first 64 entries of the sequence are the fixed points. The next 64 entries form these 32 cycles:
[ 64, 75], [ 65, 74], [ 66, 73], [ 67, 72], [ 68, 79], [ 69, 78], [ 70, 77], [ 71, 76],
[ 80, 91], [ 81, 90], [ 82, 89], [ 83, 88], [ 84, 95], [ 85, 94], [ 86, 93], [ 87, 92],
[ 96, 107], [ 97, 106], [ 98, 105], [ 99, 104], [100, 111], [101, 110], [102, 109], [103, 108],
[112, 123], [113, 122], [114, 121], [115, 120], [116, 127], [117, 126], [118, 125], [119, 124]
The permutation for arity 4 corresponds to the 15×15 matrix shown on the right.
It is described by this vector: (1, 2, 4, 8, 16, 32, 75, 128, 256, 512, 1155, 2048, 4233, 8330, 19252)
The matrix is always that of Ш or Щ without the top row and left column. Template:Collapsible END
For arity 3 the Boolean functions in big seminars are the sharp ones (i.e. those with odd weight). See Template:Boolf prop 3-ary.
For a given arity, each seminar is part of a Template:Boolf prop 3-ary. For arity 3 they all have size 16. Template:Mentors of Boolean functions/example chunky seminar
chains
The permutations Ю and Я have fewer fixed points and longer cycles than Ч and Ш.
A cycle of Ю shall be called chain. (Cycles of Я are the same, but reversed.)
The XOR of all entries of a chain is one of the fixed points, and shall be called anchor. The fixed points are nobles.
tables of chains: 3-ary (4 fixed points), 4-ary (8 fixed points)
3-ary partitions: Template:Boolf prop 3-ary, Template:Boolf prop 3-ary, Template:Boolf prop 3-ary, Template:Boolf prop 3-ary, Template:Boolf prop 3-ary, Template:Boolf prop 3-ary