Algorithm

VennPainter uses set-theory to generate Venn diagrams. The intersection is defined as follow:

A \ B ¼ fx : x 2 A ^ x 2 Bg

and its complement:

B n A ¼ B \ A∁ ¼ fx : x 2 B ^ x 2= Ag

Technically, integer ax is assigned to label element x.

ax can represent the following: 8x 2 ax ¼ i¼ [n Xn Ai; 1 ≤ n ≤ 31 bi; 1 ≤ n ≤ 31 and bi ¼ i ¼ 1 i ( 2i—1; x 2 A 0; x 2= Ai

Thus, if ax1 = ax2, then x1 and x2 belong to the same intersection. VennPainter labels every intersection Um with an integer cUm in the Venn diagram (S1, S2 and S3 Figs). If ax ¼ cUm , then x 2 Um. The flowchart (Fig 3) shows how VennPainter works.

These authors contributed equally to this work.

* [email protected] (WZ); [email protected] (JL)

More Tulasi Korra's questions See All
Similar questions and discussions