×
Create a new article
Write your page title here:
We currently have 3,189 articles on s23. Type your article name above or create one of the articles listed here!



    s23
    3,189Articles
    in:

    Boolean Algebra: Difference between revisions

    Content added Content deleted
    imported>mutante
    imported>mutante
     
    (5 intermediate revisions by 2 users not shown)
    Line 82: Line 82:


    === 6 ===
    === 6 ===
    <math>X = (( A \land B ) \lor C) \land (( A \lor B ) \lor D ))
    <=> (A \land B) \lor (C \land D)</math>


    <math>X = (( A \land B ) \lor C) \land (( A \lor B ) \lor D )
    ne das is nicht richtig so!
    betrachte A=0, B=1, C=1, D=0
    dann gilt: der linke ausdruck ist wahr, der rechte aber nicht.

    besser
    <math>X = (( A \land B ) \lor C) \land (( A \lor B ) \lor D ))
    <=> (A \land B) \lor ( C \land (A \lor B \lor D) )</math>
    <=> (A \land B) \lor ( C \land (A \lor B \lor D) )</math>


    Line 97: Line 90:
    <math>X = ( C \lor D \lor F ) \land ( C \lor D \lor G )
    <math>X = ( C \lor D \lor F ) \land ( C \lor D \lor G )
    <=> C \lor D \lor (F \land G)</math>
    <=> C \lor D \lor (F \land G)</math>

    CDEFG -> ABCDE

    <math>X = ( A \lor B \lor D ) \land ( A \lor B \lor E )
    <=> A \lor B \lor (D \land E)</math>


    === 8 ===
    === 8 ===
    Line 126: Line 124:
    for C in false true;
    for C in false true;
    do
    do
    for D in false true;
    do
    for E in false true;
    do
    x=0
    x=0
    (($A && $B) || ($A && $C)) || x=1
    # 1
    # (($A && $B) || ($A && $C)) || x=1
    # 2
    # ($C || $B) && ($A || $C) || x=1
    # 3
    # (($A && $B) || ($C && $D) || ($D && $A) || ($E && $C)) || x=1
    # 4
    # (($A && $B) || ($B && $A)) || x=1
    # 5
    # ((! $A || $B || $D ) && (! $A || $C || $E)) || x=1
    # 6
    # ((($A && $B) || $C) && (($A || $B) || $D)) || x=1
    # 7
    # (($A || $B || $D) && ($A || $B || $E)) || x=1
    # 8
    # (($A || $B) && ($A && $C)) || x=1
    # 9
    # (($B && $C) || ($B && ! $C)) || x=1
    # 10
    (($A || ! $B) && ($A || $B)) || x=1
    y=0
    y=0
    ($A && ($B || $C)) || y=1
    # 1
    # ($A && ($B || $C)) || y=1
    # 2
    # ($C || ($B && $A)) || y=1
    # 3
    # (($A && ($B || $D)) || ($C && ( $D || $E))) || y=1
    # 4
    # ($A && $B) || y=1
    # 5
    # (! $A || (($B || $D) && ($E || $C))) || y=1
    # 6
    # (($A && $B) || ($C && ($A || $B || $D))) || y=1
    # 7
    # ($A || $B || ($D && $E)) || y=1
    # 8
    # ($A && $C) || y=1
    # 9
    # $B || y=1
    # 10
    $A || y=1
    if [ $x -eq $y ]
    if [ $x -eq $y ]
    then
    then
    echo "ok"
    echo "ok"
    else
    else
    echo "FALSCH - Belegung: A: $A, B: $B, C: $C"
    echo "FALSCH - Belegung: A: $A, B: $B, C: $C, D: $D E: $E"
    fi
    fi
    done
    done
    done
    done
    done
    done
    done
    done


    </pre>
    </pre>


    wow cool, [[de-wp:Hilfe_zur_Selbsthilfe|Hilfe zur Selbsthilfe]] ist natürlich viel besser :) [[User:mutante|mutante]]
    wow cool, [[de-wp:Hilfe_zur_Selbsthilfe|Hilfe zur Selbsthilfe]] ist natürlich viel besser :) [[User:mutante|mutante]]

    Ok, all checked with script above :) [[User:mutante|mutante]] 12:00, 16 November 2006 (CET) :)


    [[Category:Math]]
    [[Category:Math]]

    Latest revision as of 19:20, 16 November 2006

    Axiome[edit]

    Kommutativ[edit]

    <math>A \land B = B \land A</math>

    <math>A \lor B = B \lor A</math>

    Assoziativ[edit]

    <math>(A \land B) \land C = A \land B \land C</math>

    <math>(A \lor B) \lor C = A \lor B \lor C</math>

    Distributiv[edit]

    <math>(A \land B) \lor (A \land C) = A \land (B \lor C)</math>

    <math>(A \lor B) \land (A \lor C) = A \lor (B \land C)</math>

    Vereinfachungsregeln[edit]

    <math>A \land 1 = A</math>

    <math>A \lor 1 = 1</math>


    <math>A \land 0 = 0</math>

    <math>A \lor 0 = A</math>


    <math>A \land A = A</math>

    <math>A \lor A = A</math>


    <math>\bar{A} \land A = 0</math>

    <math>\bar{A} \lor A = 1</math>


    <math>A \land (A \lor B) = A</math>

    <math>A \lor (A \land B = A</math>

    De Morgan Gesetze[edit]

    de-wp:De_Morgansche_Gesetze

    Examples[edit]

    1[edit]

    <math>Q = ( A \land B ) \lor ( A \land C )

       <=> A \land (B \lor C)</math>
    

    2[edit]

    <math>Q = ( C \lor B ) \land ( A \lor C )

       <=> C \lor (B \land A)</math>
    

    3[edit]

    <math>Y = ( A \land B) \lor ( C \land D) \lor ( D \land A ) \lor ( E \land C) <=>

     (A \land (B \lor D)) \lor ( C \land (D \lor E))</math>
    

    4[edit]

    <math>Z = ( A \land B ) \lor ( B \land A )

       <=> A \land B</math>
    

    5[edit]

    <math>Y = (\bar{C} \lor D \lor F) \land (\bar{C} \lor E \lor G)

       <=> \bar{C} \lor ((D \lor F) \land (G \lor E))</math>
    
    CDEFG -> ABCDE
    

    <math>Y = (\bar{A} \lor B \lor D) \land (\bar{A} \lor C \lor E)

       <=> \bar{A} \lor ((B \lor D) \land (E \lor C))</math>
    

    6[edit]

    <math>X = (( A \land B ) \lor C) \land (( A \lor B ) \lor D )

     <=> (A \land B) \lor ( C \land (A \lor B \lor D) )</math>
    

    7[edit]

    <math>X = ( C \lor D \lor F ) \land ( C \lor D \lor G )

     <=> C \lor D \lor (F \land G)</math>
    

    CDEFG -> ABCDE

    <math>X = ( A \lor B \lor D ) \land ( A \lor B \lor E )

     <=> A \lor B \lor (D \land E)</math>
    

    8[edit]

    <math>U = ( A \lor B ) \land ( A \land C )

       <=> ( A ) \land (A \land C) <=> A \land A \land C <=> A \land C</math>
    

    9[edit]

    <math>Q = (B \land C) \lor (B \land \bar{C})

       <=> B \land (C \lor \bar{C}) = B \land 1 = B</math>
    

    10[edit]

    <math>Y = ( G \lor \bar{F}) \land (G \lor F)

       <=> G \lor (F \land \bar{F}) = G \lor 0 = G</math>
    


    Are those right? I dont think so. Please check. --done :) --took 23:33, 14 November 2006 (CET) thank you, help is appreciated :) mutante 00:07, 15 November 2006 (CET)

    Automatic Proof[edit]

    with this little script u can check all of them by yourself. Just enter both conditions in line 9 and 11 and run it.

    #!/bin/bash
    for A in false true;
     do
      for B in false true
       do
        for C in false true;
         do
          for D in false true;
          do
           for E in false true;
           do
          x=0
          # 1
          # (($A && $B) || ($A && $C)) || x=1
          # 2
          # ($C || $B) && ($A || $C) || x=1
          # 3
          # (($A && $B) || ($C && $D) || ($D && $A) || ($E && $C)) || x=1
          # 4
          # (($A && $B) || ($B && $A)) || x=1
          # 5
          # ((! $A || $B || $D ) && (! $A || $C || $E)) || x=1
          # 6
          # ((($A && $B) || $C) && (($A || $B) || $D)) || x=1
          # 7
          # (($A || $B || $D) && ($A || $B || $E)) || x=1
          # 8
          # (($A || $B) && ($A && $C)) || x=1
          # 9
          # (($B && $C) || ($B && ! $C)) || x=1
          # 10
          (($A || ! $B) && ($A || $B)) || x=1
          y=0
          # 1
          # ($A && ($B || $C)) || y=1
          # 2
          # ($C || ($B && $A)) || y=1
          # 3
          # (($A && ($B || $D)) || ($C && ( $D || $E))) || y=1
          # 4
          # ($A && $B) || y=1
          # 5
          # (! $A || (($B || $D) && ($E || $C))) || y=1
          # 6
          # (($A && $B) || ($C && ($A || $B || $D))) || y=1
          # 7
          # ($A || $B || ($D && $E)) || y=1
          # 8
          # ($A && $C) || y=1
          # 9
          # $B || y=1
          # 10
          $A || y=1
          if [ $x -eq $y ]
           then
            echo "ok"
           else
            echo "FALSCH - Belegung: A: $A, B: $B, C: $C, D: $D E: $E"
           fi
         done
       done
      done
     done
    done
    
    
    

    wow cool, Hilfe zur Selbsthilfe ist natürlich viel besser :) mutante

    Ok, all checked with script above :) mutante 12:00, 16 November 2006 (CET) :)

    Cookies help us deliver our services. By using our services, you agree to our use of cookies.
    Cookies help us deliver our services. By using our services, you agree to our use of cookies.