logotransparent.png

Legion of Learners

www.lol-101.com

  • Home

  • Classrooms

  • Courses

  • About Us

    • Executive Team
    • Board Members
  • Resources

  • More

    Use tab to navigate through the menu items.
    To see this working, head to your live site.
    • Categories
    • All Posts
    • My Posts
    sfolax6776
    Jun 07

    ACSL Elementary - DeMorgan's Law

    in CS Fundamentals for ACSL

    A. Notes

    DeMorgan’s Law tells us how to negate a combined statement such as A OR B, and A AND B.


    NOT (A OR B) = NOT A AND NOT B i.e. ~ ( A + B ) = ~A * ~B

    NOT (A AND B) = NOT A OR NOT B i.e. ~( A * B) = ~A + ~B



    Here, A and B can be any statement such as "Noah eats more apples than Justin" or "x < 3"


    B. HW Practice


    1. Let A be " x<3" and B be " x >10" , draw a number line, color all numbers less than 3 red, and all number greater than 10 blue, and the rest yellow. What is the color of a number that is A OR B? What is the color of a number that is NOT(A OR B)? What is the color of a number that is "NOT A AND NOT B"?


    2. Let A be " x<3" and B be " x >10" , draw a number line, color all numbers less than 3 red, and all number greater than 10 blue, and the rest yellow. Can you find a number that is A AND B? Can you find a number that is NOT(A AND B)? Can you find a number is "NOT A OR NOT B"?


    3. Can you think of another example similar to the above to prove DeMorgan's Law? For instance, you can assume that A is " y > 0" and B is " y < 5". What do ~ ( A + B ) and ~A * ~B mean then? Are they always equivalent? What do ~( A * B) and ~A + ~B mean? Are they always equivalent?


    4. Simply the following:

    ~ (A + B) + ~(A + ~B)

    ~ (A * B) + ~(A * ~B)

    2 comments
    0
    jyao.coding
    Jun 10
    1. yellow, yellow

    2. no, yes, yes

    3. not a and b, yes, not a and not b, no

    4. true, false


    0
    zihanlzh
    Jun 11
    1. red or blue, yellow,yellow

    2. N/A, y, y

    3. any number, yes, ay number >0,<5

    4. TRUE, true

    0
    2 comments

    Questions? Email us at legionoflearners@gmail.com or join our WeChat group!

    • lol-101dotcom

    ©2020 Legion of Learners