© tefko saracevic 1 exercise: logical operators boolean search statements and venn diagrams

8
© Tefko Saracevic 1 Exercise: Logical operators Boolean search statements and Venn diagrams

Upload: milton-harris

Post on 18-Jan-2016

217 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: © Tefko Saracevic 1 Exercise: Logical operators Boolean search statements and Venn diagrams

© Tefko Saracevic 1

Exercise: Logical operators

Boolean search statements and

Venn diagrams

Page 2: © Tefko Saracevic 1 Exercise: Logical operators Boolean search statements and Venn diagrams

© Tefko Saracevic 2

Directions

• Slide 4 provides a Venn diagram with numbered sets and a number of search statements– for each statement shade the

appropriate set or sets– e.g. for (A OR B) AND C the sets

are 4, 5, 6

• Slide 5 is for practice

• Slide 6 has the answers– BUT NOTE: one of the answers is

WRONG! Which one?

Page 3: © Tefko Saracevic 1 Exercise: Logical operators Boolean search statements and Venn diagrams

© Tefko Saracevic 3

Order of operations• Rules for the order in which

operations are done effect the answer - so follow them

• DIALOG order of operation is: 1. First are done all operations that are in

parentheses, then:

2. (W), (N), (S), (L), or (F)

3. NOT

4. AND

5. OR

• e.g. for A OR B AND C– first is done B AND C

– and then A OR the results of B AND C

– thus this is the same as A OR (B AND C)

Page 4: © Tefko Saracevic 1 Exercise: Logical operators Boolean search statements and Venn diagrams

© Tefko Saracevic 4

Exercise: shade Venn diagrams

1 2 3

4 56

7

A B

C

1. A AND B

2. A OR B

3. A OR B AND C

4. (A OR B) AND C

5. A AND B NOT C

6. A AND (B NOT C)

7. (A AND B) NOT C

8. (A NOT B) AND C

9. A NOT (B AND C)

10. A NOT B AND C

11. A AND (B OR C)

12. A AND B OR C

13. A OR (B AND C)

14. A OR B OR C

15 A AND B AND C

Page 5: © Tefko Saracevic 1 Exercise: Logical operators Boolean search statements and Venn diagrams

© Tefko Saracevic 5

12

3

4 56

7

A B

C

Practice page

Page 6: © Tefko Saracevic 1 Exercise: Logical operators Boolean search statements and Venn diagrams

© Tefko Saracevic 6

1. A AND B 2,5

2. A OR B 1,2,3,4,5,6

3. A OR B AND C 1,2,4,5,6

4. (A OR B) AND C 4,5,6

5. A AND B NOT C 2

6. A AND (B NOT C) 2

7. (A AND B) NOT C 2

8. (A NOT B) AND C 4

9. A NOT (B AND C) 6

10. A NOT B AND C 4

11. A AND (B OR C) 2,4,5

12. A AND B OR C 2,4,5,6,7

13. A OR (B AND C) 1,2,4,5,6

14. A OR B OR C 1,2,3,4,5,6,7

15 A AND B AND C 5

1 2 3

4 56

7

A B

C

Venn diagrams: solutionsp.s. one of them is wrong!

Page 7: © Tefko Saracevic 1 Exercise: Logical operators Boolean search statements and Venn diagrams

© Tefko Saracevic 7

well…it is a Venn diagram toofrom angelfire.com

Page 8: © Tefko Saracevic 1 Exercise: Logical operators Boolean search statements and Venn diagrams

© Tefko Saracevic 8

description• This Venn diagram is color-coded in order to

demonstrate the way in which the layers overlap--if you are not familiar with the way colors are mixed subtractively just enjoy all the pretty colors. Not all Venn diagrams are color-coded.

• Each circle is clearly labeled with the name of a character in bold letters. The qualities of that character are then written in that circle.

• Some qualities are in an area where two circles overlap because both characters share those qualities. For instance, both the Tazmanian Devil and Wile E. Coyote are mammals, so "mammal" goes in the purple area where the circles of the two characters overlap.

• In the center, all the circles overlap; qualities in this area this are shared by all three characters. For instance, Elmer Fudd, Wile E. Coyote, and the Tazmanian Devil were all in the movie Space Jam, so "Space Jam is written in the area where all the circles overlap.