Studies of Euler diagrams/find segments

From Wikiversity
Jump to navigation Jump to search

dummy

This page uses the Python library discrete helpers,
which is not yet published.

The function find_segments is an attempt to automate most of the thinking that goes into the drawing of an Euler diagram.
It lists all found segments by dimension:

  • 0-dimensional: cells
  • 1-dimensional: borders between cells
  • n-dimensional: crossings of n borders surrounded by 2n cells

Multicrossings are crossings of n borders surrounded by less than 2n cells.
Finding them as well is a problem to be solved.

This does not help to find gapspots. E.g. for functions like selera only the cells are found.


kisago[edit | edit source]

Euler diagram

segments
########################## 0
    {'+−−−': [1], '−−+−': [4], '+−+−': [5], '−++−': [6], '+++−': [7], '−−−+': [8], '+−−+': [9], '−+−+': [10], '++−+': [11], '−−++': [12]}
########################## 1
A    {'0−+−': [4, 5], '0++−': [6, 7], '0−−+': [8, 9], '0+−+': [10, 11]}
B    {'−0+−': [4, 6], '+0+−': [5, 7], '−0−+': [8, 10], '+0−+': [9, 11]}
C    {'+−0−': [1, 5], '−−0+': [8, 12]}
D    {'+−−0': [1, 9], '−−+0': [4, 12]}
########################## 2
A,B    {'00+−': [4, 5, 6, 7], '00−+': [8, 9, 10, 11]}


logota[edit | edit source]

Euler diagram

segments
########################## 0
    {'+−−−': [1], '++−−': [3], '−−+−': [4], '+−+−': [5], '−+−+': [10], '++−+': [11], '−−++': [12], '−+++': [14]}
########################## 1
A    {'0−+−': [4, 5], '0+−+': [10, 11]}
B    {'+0−−': [1, 3], '−0++': [12, 14]}
C    {'+−0−': [1, 5], '−+0+': [10, 14]}
D    {'++−0': [3, 11], '−−+0': [4, 12]}

medusa[edit | edit source]

Euler diagram

segments
########################## 0
    {'−−−−': [0], '+−−−': [1], '−+−−': [2], '++−−': [3], '−−+−': [4], '+−+−': [5], '−++−': [6], '+++−': [7], '−−−+': [8], '+−−+': [9], '−+−+': [10], '−−++': [12], '−+++': [14]}
########################## 1
A    {'0−−−': [0, 1], '0+−−': [2, 3], '0−+−': [4, 5], '0++−': [6, 7], '0−−+': [8, 9]}
B    {'−0−−': [0, 2], '+0−−': [1, 3], '−0+−': [4, 6], '+0+−': [5, 7], '−0−+': [8, 10], '−0++': [12, 14]}
C    {'−−0−': [0, 4], '+−0−': [1, 5], '−+0−': [2, 6], '++0−': [3, 7], '−−0+': [8, 12], '−+0+': [10, 14]}
D    {'−−−0': [0, 8], '+−−0': [1, 9], '−+−0': [2, 10], '−−+0': [4, 12], '−++0': [6, 14]}
########################## 2
A,B    {'00−−': [0, 1, 2, 3], '00+−': [4, 5, 6, 7]}
A,C    {'0−0−': [0, 1, 4, 5], '0+0−': [2, 3, 6, 7]}
B,C    {'−00−': [0, 2, 4, 6], '+00−': [1, 3, 5, 7], '−00+': [8, 10, 12, 14]}
A,D    {'0−−0': [0, 1, 8, 9]}
B,D    {'−0−0': [0, 2, 8, 10], '−0+0': [4, 6, 12, 14]}
C,D    {'−−00': [0, 4, 8, 12], '−+00': [2, 6, 10, 14]}
########################## 3
A,B,C    {'000−': [0, 1, 2, 3, 4, 5, 6, 7]}
B,C,D    {'−000': [0, 2, 4, 6, 8, 10, 12, 14]}


kimuri[edit | edit source]

Euler diagram

segments
########################## 0
    {'+−−−': [1], '−+−−': [2], '−++−': [6], '+++−': [7], '−−−+': [8], '+−−+': [9]}
########################## 1
A    {'0++−': [6, 7], '0−−+': [8, 9]}
C    {'−+0−': [2, 6]}
D    {'+−−0': [1, 9]}