dms boolean algebra tutorial

Upload: lalith-krishnan

Post on 01-Jun-2018

222 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/9/2019 DMS Boolean Algebra Tutorial

    1/15

  • 8/9/2019 DMS Boolean Algebra Tutorial

    2/15

    Q9 Show that in a Boolean algebra, the modular properties

    hold. That is, show that

    x /\ (y V (x /\ z)) = (x /\ y) v (x /\ z) and x v (y /\ (x V z))= (x V y) /\ (x V z).

    Q10 Find a minterm that equals 1 if x1= x

    3= 0 and x

    2= x

    4= x

    5= 1, and

    equals 0 otherwise.

    Q11 Find the sum-of-products expansion for the function

    F(x, y, z) = (x + y)z.

  • 8/9/2019 DMS Boolean Algebra Tutorial

    3/15

    d) x (x + y + z)

    Q17 Show that

    a) x = x | x .

    b) x y = (x | y) | (x | y).

    c) x + y = (x | x) | (y | y).

    Q18 Find the K-maps for (a) xy + x y , (b) x y + x y , and (c) x y + x y

    + x y .

    Q19 Use K-maps to minimize these sum-of-products expansions.

    (a) x y z+x y z+ x y z+ x y z

    (b) x y z + x y z + x y z + x y z + x y z

    Q20 Use K-maps to simplify these sum-of-products expansions.

    (a) w x y z + w x y z + w x y z + w x y z + w x y z + w x y z +

    w x y z + w x y z + w x y z

    (b) w x y z + w x y z + w x y z + w x y z + w x y z + w x y z +

    w x y z

    Q 21

  • 8/9/2019 DMS Boolean Algebra Tutorial

    4/15

  • 8/9/2019 DMS Boolean Algebra Tutorial

    5/15

    Q23

    c)

  • 8/9/2019 DMS Boolean Algebra Tutorial

    6/15

    d)

    Q24

  • 8/9/2019 DMS Boolean Algebra Tutorial

    7/15

    Q25

    Q26

    Q27

    Q28

  • 8/9/2019 DMS Boolean Algebra Tutorial

    8/15

    Q29

  • 8/9/2019 DMS Boolean Algebra Tutorial

    9/15

    Q30

  • 8/9/2019 DMS Boolean Algebra Tutorial

    10/15

  • 8/9/2019 DMS Boolean Algebra Tutorial

    11/15

    Partial Orderings

    Q32 Show that the "greater than or equal" relation ( ) is a partial

    ordering on the set of integers.

    Q33 Show that the inclusion relation is a partial ordering on the

    power set of a set S.

    Q34 Let R be the relation on the set of people such that x R y if x and

    yare people and x is older than y. Show that R is not a partial ordering.

    NOTE : The poset (Z, < ) is totally ordered, because a < b or b < a

    whenever a and b are integers.

    NOTE : The set of ordered pairs of positive integers, Z+X Z+, with(a1, a2) (b1, b2) if al< b1, or if a1= b1and a2< b2(the lexicographic

    ordering), is a well-ordered set.

    NOTE: The set Z, with the usual < ordering, is not well-ordered because

    the set of negative integers, which is a subset of Z, has no least

    element.

    Q 35 Is the poset (Z+, |) a lattice?

    Q 36 Determine whether the posets ({ 1, 2, 3, 4, 5}, |) and ({ 1, 2, 4, 8,

    16}, |) are lattices.

    Q 37 Determine whether (P(S), ) is a lattice where S is a set.

    Application of Lattice

    The Lattice Model of Information Flow In many settings the flow of

    information from one person or computer program to another is

    restricted via security clearances. y.le can use a lattice model torepresent different information flow policies. For example, one common

    information flow policy is the multilevel security policy used in

    government and military systems. Each piece of information is assigned

    to a security class, and each security class is represented by a pair

    (A, C) where A is an authority level and C is a category. People and

    computer programs are then allowed access to information from a

  • 8/9/2019 DMS Boolean Algebra Tutorial

    12/15

    specific restricted set of security classes. The typical authority levels

    used in the U. S. government are unclassified (0), confidential (1),

    secret (2), and top secret (3). Categories used in security classes are the

    subsets of a set of all compartments relevant to a particular area of

    interest. Each compartment represents a particular subject area. For

    example, if the set of compartments is {spies, moles, double agents},

    then there are eight different categories, one for each of the eight

    subsets of the set of compartments, such as {spies, moles}.

    We can order security classes by specifying that (A1, C1) (A2, C2) if and

    only if Al< A2and C1 C2. Information is permitted to flow from

    security class (A1, C1) into security class (A2, C2) if and only if (A1, C1)

    (A2, C2). For example, information is permitted to flow from the

    security class (secret, {spies, moles}) into the security class (top secret,

    {spies, moles, double agents}), whereas information is not allowed to

    flow from the security class (top secret, {spies, moles}) into either of thesecurity classes (secret, {spies, moles, double agents}) or (top secret,

    {spies}).

    Q 38

    Which of these relations on to {0, 1, 2, 3} are partial order-

    ings? Determine the properties of a partial ordering that

    the others lack.

    a) {(0, 0), (1,1), (2, 2), (3, 3)}

    b) {(0, 0), (1, 1), (2, 0), (2, 2), (2, 3), (3, 2), (3, 3)}

    c) {(0, 0), (1,1), (1, 2), (2, 2), (3, 3)}

    d) {(0, 0), (1, 1), (1, 2), (1, 3), (2, 2), (2, 3), (3, 3)}

    e) {(0, 0), (0,1), (0, 2), (1, 0), (1,1), (1, 2), (2, 0),

    (2,2), (3, 3)}

    Q 39

    Which of these relations on {0,1, 2, 3} are partial order-ings? Determine the properties of a partial ordering that

    the others lack.

    a) {(0, 0), (2, 2), (3, 3)}

    b) {(0, 0), (1, 1), (2, 0), (2, 2), (2, 3), (3, 3)}

    c) {(0,0),(1, 1),(1,2),(2,2),(3, 1),(3,3)}

    d) {(0, 0), (1,1), (1, 2), (1, 3), (2, 0), (2, 2), (2, 3), (3, 0), (3,3)}

  • 8/9/2019 DMS Boolean Algebra Tutorial

    13/15

    e) {(0, 0), (0,1), (0, 2), (0, 3), (1, 0), (1,1), (1, 2), (1, 3),

    (2, 0), (2, 2), (3, 3)}

    Q40

    Is (S, R) a poset if S is the set of all people in the world

    and (a, b) R, where a and b are people, if

    a) a is no shorter than b?

    b) a weighs more than b?

    c) a = b or a is a descendant of b?

    d) a and b do not have a common friend?

    Q 41

    Which of these are posets?

    a) (Z, =) b) (Z, ) c) (Z , ) d)(Z, not divisible by)

    Q 42

    Which of these are posets?

    a) (R, =) b) (R,

  • 8/9/2019 DMS Boolean Algebra Tutorial

    14/15

    Q 44

    Let (S, R) be a poset. Show that (S, R-1

    ) is also a poset,

    where R-1

    is the inverse of R. The po set (S, R-1

    ) is called

    the dual of (S, R).

    Q45

    Find the duals of these posets.

    a) ({0, 1, 2}, < ) (b) (Z , ) (c) (P(Z), ) (d) (Z+, |)

    Q 46

    Find the lexicographic ordering of the bit strings 0, 01,11, 001, 010, 011, 0001, and 0101 based on the ordering

    0 < 1.

    Q 47

    Draw the Hasse diagram for the "greater than or equal to"

    relation on to {0, 1, 2, 3, 4, 5}.

    Q 48

    Draw the Hasse diagram for the "less than or equal to"relation on to {0, 2, 5, 10, 11, 15}.

    Q 49

    Let (S, ) be a poset. We say that an element y S covers

    an element x S if x y and there is no element z S such

    that x z y. The set of pairs (x, y) such that y covers x is

    called the covering relation of (S, ).

    Q 50 What is the covering relation of the partial ordering{(a, b) / a divides b} on {1, 2, 3, 4, 6, 12}?

    Q 51 What is the covering relation of the partial ordering

    {(A, B) / A B} on the power set of S, where S = {a, b, c}?

  • 8/9/2019 DMS Boolean Algebra Tutorial

    15/15

    Q 52 Show that the pair (x, y) belongs to the covering relation

    of the finite poset (S, ) if and only if x is lower than y and there is an

    edge joining x and y in the Hasse diagram of this poset.

    Q 53

    Answer these questions for the poset ({ { 1 }, {2}, {4 }, {1, 2},

    {1,4}, {2,4}, {3,41, {1,3,4}, {2,3,4}} | ).

    a) Find the maximal elements.

    b) Find the minimal elements.

    c) Is there a greatest element?

    d) Is there a least element?

    e) Find all upper bounds of {{2}, {4}}.

    I) Find the least upper bound of {{2 }, {4 }} if it exists.g) Find all lower bounds of {{1, 3,4}, {2, 3, 4}}.

    h) Find the greatest lower bound of {{ 1, 3, 4}, {2, 3, 4}}

    if it exists.