Lösungen / Solutions

1

Programm (aus dem Logik-Script) / 
Programme (pris du script "logique")

\(\(Wtab[f_, m_] := 
        Module[{tabb, tabZ, res, newtabX, u, exttabX, output, 
            output1}, \ 
Attributes[
              f] = {Listable}; 
tabb[
              1] = {{0}, {1}}; 
tabb[u_] := 
            Flatten[Table[
                Append[\(tabb[u - 1]\)[\([k]\)], w], {k, 1, 
                  Length[tabb[u - 1]]}, {w, 0, 1}], 1]; 
          tabZ[u_] := \ tabb[u] /. {0 -> False, 1 -> True}; 
          res = Table[
              Apply[f, \(tabZ[m]\)[\([n]\)]], {n, 1, Length[tabZ[m]]}]; 
          newtabX = Transpose[tabZ[m]]; 
u = 
            Length[newtabX]; 
\ \ \ \ \ exttabX = 
            Transpose[
              Append[newtabX, res]]; 
\ \ \ \ \ Prepend[exttabX, 
                Append[Range[u], {expr}]] /. {True -> 1, False -> 0} // 
            MatrixForm];\)\)
sub[x_, y_] := Or[Not[x], y]; 
    Attributes[sub] = {Listable};
bij[x_, y_] := And[sub[x, y], sub[y, x]]; 
    Attributes[bij] = {Listable};
orExc[x_, y_] := Not[bij[x, y]]; 
    Attributes[bij] = {Listable};
asUsual[f_] := 
      StringReplace[
        ToString[
          TraditionalForm[f]], {"!" -> "¬"}]

Testen / Tester

f1a[x1_, x2_] := Not[Or[x1, x2]];
f1b[x1_, x2_] := Or[Not[x1], Not[x2]];
f1c[x1_, x2_] := orExc[x1, x2];
{f1a[x1, x2], f1b[x1, x2], f1c[x1, x2]} // asUsual

{Wtab[f1a,     2    ], Wtab[f1b,     2    ], 
      Wtab[f1c,     2    ]}

Lösung / Solution

f[v_, u_, w_] := 
      orExc[sub[Not[sub[v, And[u, Not[w]]]], Not[u]], Not[w]];   f1[v, u, 
        w] // asUsual

Wtab[f,    3]

2

f2[x_, y_, z_] := Or[sub[Not[z], And[x, y]], x];   f2[x, y, z] // 
      asUsual

Wtab[f2,    3]

6 Terme  /  6 termes

3

?Range

u = Range[100]; a = Range[50];  b = Range[40, 60]; 
    c = Union[Range[6], {100}]

?Intersection

Intersection[a, b]

res1 = Complement[u, Intersection[a, b]]

Length[res1]

Complement[u, Intersection[a, c]] //  Length

Complement[u, Intersection[a, b, c]] //  Length

Complement[u, Intersection[b, c]] //  Length

Complement[u, Union[a, b, c]] //  Length

4

Pfeildiagramm (Handskizze) ==> Aequivalenzrelation
Diagramme de flèches (esquisse) ===> relation d'équivalence

5

Remove[a, b, c, d, e, f, r]

A1 = (2  r)^2 Pi

A2 = A1 120/360

h = Sqrt[(2  r)^2 - r^2]  /.  Sqrt[r^2] -> r

A3 = 2 r h /2

A4 = r^2 Pi /2

A = A1 - (A2 - A3) - A4

A // N

6

GCD[123456, 7890]

7

Sum[1/(k (k + 1)), {k, 1, n}]