Studies of Euler diagrams/ternary labels
A cell is either in or outside of a set. Therefore cell labels are among 2n binary numbers (starting with 0).
A segment in general (including edges and vertices) can also be on the border of a set.
Therefore segment labels are among 3n balanced ternary numbers (with 0 in the middle).
The ternary vectors of cells have only + and − entries, corresponding to binary 1 and 0.
The sign in place i of the ternary vector shows where the segment is relative to set i:
|+||in the set|
|0||on the border|