Lösungen / Solutions

1

Remove["Global`*"]

Programm:

\(\(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]], {"!" -> "¬"}]

f[x_, w_] := 
      Or[orExc[w, Not[w]], 
        sub[Not[sub[w, And[x, Not[w]]]], Not[x]]]

Wtab[f, 2]

2

f[x_, y_] := sub[sub[sub[x, y], Not[x]], Not[y]]

Wtab[f, 2]

asUsual[sub[sub[sub[x, y], Not[x]], Not[y]]]

f[x_, y_] := Not[And[Not[x], y]]

asUsual[f[x, y]]

Wtab[f, 2]

f[x_, y_] := Or[x, Not[y]]

asUsual[f[x, y]]

Wtab[f, 2]

3

Remove["Global`*"]

s = 
      Solve[{(x - 2)^2 + y^2 == 2^2, y == 1.5/5 x}, {x, 
          y}]

{x1, y1} = {x, y} /. s[[2]]

x1

r2 = Sqrt[(x1 - 5)^2 + (y1 - 1.5)^2]

s = 
      Solve[{(x - 2)^2 + y^2 == 
            2^2, (x - 5)^2 + (y - 1.5)^2 == r2^2}, {x, 
          y}]

{xP, yP} = {x, y} /. s[[2]]

<< Graphics`Arrow`

Show[
        Graphics[{Line[{{0, 0}, {5, 0}, {5, 2}, {0, 2}, {0, 0}}], 
            Line[{{0, 0}, {5, 1.5}}], Circle[{2, 0}, 2], 
            Circle[{5, 1.5}, r2], Arrow[{2, 0}, {2.5, Sqrt[2^2 - 0.5]}], 
            Arrow[{5, 1.5}, {4.6, 1.5 - Sqrt[r2 + 0.4]}], PointSize[0.03], 
            Point[{xP, yP}], 
Text["(0,0)", {0, 
                0}, {-1, +1}], 
            Text["(5,0)", {5, 0}, {-1, +1}], 
            Text["(5,2)", {5, 2}, {-1, -1}], 
            Text["(0,2)", {0, 2}, {-1, -1}], 
            Text["P", {x1, y1}, {-1, -2}], 
            Text["r1", {x1 - 1.7, y1}, {-1, -2}], 
            Text["r2", {x1 + 0.8, y1}, {-1, 1}]}], 
        AspectRatio -> Automatic];

p = {xP, yP}

r2

4

a

?GCD

GCD[9996, 96]

b

GCD[9996, 996]

5

a = Table[2  n, {n, 1, 100}]

b = Table[3  n, {n, 1, 100}]

c = Table[5  n, {n, 1, 100}]

g = Table[n, {n, 1, 500}]

Intersection[a, b, c]

h = Complement[g, Intersection[a, b, c]]

Length[h]

6

Sum[k^3, {k, 1, n}]