Chapter 5 : Logic and Boolean Algebra Flashcards

1
Q

What is the basis of all mathematical reasoning, and of all automated reasoning

A
  1. Logic
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What makes up a correct mathematical argument?

A
  1. Proof
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is called when we prove a mathematical statement is true?

A
  1. Theorem
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is used to verify that computer programs produce the correct output for all possible input values?

A
  1. Proofs
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a proposition?

A
  1. Declarative sentence
    • Means a sentence that declares a fact ( Which return True or False )
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a Notation?

A
  1. Variables are used to represnt propositions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

List out 4 conventional letters used for propositional variables ( Notation )

A
  1. p
  2. q
  3. r
  4. s
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

List out 2 values for truth value of proposition

A
  1. True - T
  2. False - F
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Determine which is / isn’t a propositional logic and list out the truth values of those that are propositions
1. “Listen”
2. “What time is it?”
3. “x + 2 = 2 and x + y = z”
4. 2 is a prime number
5. Kuala Lumpur is the capital of Malaysia

A
  1. Not a proposition
  2. Not a proposition
  3. Not a proposition
    • Question doesn’t provide values for x , y and z
  4. A proposition , True
  5. A proposition , True
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Determine which is / isn’t a propositional logic and list out the truth values of those that are propositions
1. 2 + 3 = 5
2. 5 + 7 = 10
3. x + 2 = 11
4. 2 + 3 = 4
5. Read this carefully
6. Cat is an insect
7. Answer this question
8. What time is it?

A
  1. A proposition , True
  2. A proposition , False (5 + 7 not equal to 10 )
  3. Not a proposition
    • Question doesn’t provide values for x
  4. A proposition , False (2 + 3 not equal to 4 )
  5. Not a proposition
  6. A proposition , False ( Cat isn’t an insect )
  7. Not a proposition
  8. Not a proposition
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are compound compositions?

A
  1. Mathematical statements are constructed by combining one or more propositions
  • Formed from existing propositions using logical operators
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How are compound compositions formes?

A
  1. From existing propositions using logical operators
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What does logical operations include?

A
  1. Comparisons of 2 data
  • Result will be either True or False
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How can logical operations be represented ?

A
  1. Using truth table ( True - 1 , False - 0 )
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What determined the number of rows inside a truth table?

A
  1. All the possible values taken by the propositions involved in the statement
  • If a compound statement containes n proposition variables there will need to be 2^n rows in the truth table
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

List out all 6 nouns for Logical Connectives

A
  1. Negation
  2. Conjunction
  3. Disjunction
  4. Exclusive Disjunction ( XOR )
  5. Implication / Conditional
  6. Biconditional
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What is the connectives and symbol for negation?

A
  1. Connectives
    • not
  2. Symbol
    • ~
    • ¬
  • Think of it as a Not Gate
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What is the connectives and symbol for conjunction?

A
  1. Connectives
    • and
    • but
  2. Symbol
    • ( ^ )
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What is the connectives and symbol for disjunction?

A
  1. Connectives
    • or
  2. Symbol
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What is the connectives and symbol for implication / conditional?

A
  1. Connectives
    • if .. (p) .. then only .. (q) ..
  2. Symbol
    • p → q
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What is the connectives and symbol for exclusive disjunction?

A
  1. Connectives
    • exclusive or ( xor )
  2. Symbol
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What is the connectives and symbol for negation?

A
  1. Connectives
    • if ..(p).. and only if ..(q)..
  2. Symbol
    • p ↔ q
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

List out the truth table of Negation

A

p ¬p
T F
F T

  • Not Gate
  • It is the statement “It is not the case that p”
  • Opposite truth value of p
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Find the negation of the following and then express in simple english
1. Today is Friday
2. At least 10 inches of rain fell today in Miami
3. 1 + 1 = 2
4. Lions cannot fly
5. I will study hard, or I will not pass this course
6. 1 + 2 = 3 or 2 + 1 = 3

A
  1. Today is not Friday
  2. Less than 10 inches of rain fell today in Miami
    • At Least ( > 10 ) , Negation Less than ( 10 < )
  3. 1 + 1 ≠ 2
  4. Lions can fly
  5. I will not study hard, and I will pass this course
  6. = ~ ( 1 + 2 = 3 ) and ~ ( 2 + 1 = 3 )
    = 1 + 2 ≠ 3 and 2 + 1 ≠ 3
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

What are 2 keywords that is being used inside conjunction?

A
  1. But ( Sometimes used instead of and )
  2. And
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

What is the condition of conjunction?

A
  1. p and q ( p ^ q ) when both p and q are true
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

Construct the truth table of conjunction

A

p q p ^ q
T T T
T F F
F T F
F F F

28
Q

What are the keywords in disjunction?

29
Q

What is the condition of disjunction?

A
  1. p or q ( p ∨ q ) is false when both p and q are false
30
Q

Construct a truth table for disjunction

A

p q p ∨ q
T T T
T F T
F T T
F F F

31
Q

What is the keywords for exclusice disjunction?

A
  1. exclusive or
  • p or q but not both
32
Q

What is the condition for exclusive disjunction?

A
  1. p exclusive or q ( p ⊕ q ) is true when exactly one of p and q is true and it is false otherwise
  • True when 1 is true and another one is false
33
Q

Construct a truth table for exclusive disjunction

A

p q p⊕q
T T F
T F T
F T T
F F F

  • The room has 2 light switches controlling one light bulb. If both switches are on, the light if off. IF one is ON, the light is on, if none is ON, the lights is off
  • Think of it like telling a child they can have candy, or ice cream. But they can’t have both!
34
Q

What is the keyword for expression implication ( conditional ) ? ( 8 )

A

Condition follow Conclusion
1. if p, then q
2. p implies q
3. p is sufficient for q
4. p only if q

** Conclusion follow by Condition**
5. q when p
6. q whenever p
7. q, if p
8. q is necessary for p

35
Q

What is the condition for implication?

A
  1. p implies q ( p → q ) is false when p is true, and q is false and it is true otherwise
  • It is only false when p is true but q is false
36
Q

Construct truth table for implication

A

p q p→q
T T T
T F F
F T T
F F F

37
Q

List out 3 ways to represent the conditional statements in English
p : Maria learns discrete mathematics
q : Maria will find a good job

p→q

A
  1. If Maria learns discrete mathematics, then she will find a good job
  2. Maria will find a good job when she learns discrete mathematics
  3. For Maria to get a good job, it is sufficient for her to learn discrete mathematics
38
Q

What is the keyword for expressing biconditional?

A
  1. p if only if q
  2. p iff q
  3. If p then q, and conversely
  4. p is necessary and sufficient for q
39
Q

What is the condition for biconditional?

A
  1. p if and only if q ( p ↔ q ) is true when p and q have the same truth values

When both value for p → q and q → p is true, p ↔ q will be returning true

40
Q

Construct a truth table for biconditional

A

p q p → q q → p p ↔ q
T T T T T
T F F T F
F T T F F
F F T T T

41
Q

Determine whether each of these conditional and biconditional statements are true?
1. If 1 + 1 = 2 , then 2 + 2 = 5
2. 0 > 1 if and only 2 > 1
3. 2 - 7 = -5 if and only if -7 < -5
4. 169 is a perfect square
5. The product of a^4 and a^3 is a^12

A
  1. False
  2. False
  3. True
  4. True 13^2 = 169
  5. a^4 . a^3 = a^ ( 4 + 3 ) = a^7
42
Q

How can the following English sentence can be translated into a logical expression?
“You can access the internet from the campus only if you are a computer science major or you are not a freshmen”

A

p : You can access the internet from the campus
q : You are a computer science major
r : You are a freshmen

Ans : ( p → q ) ∨ ~r

43
Q

How can the following English sentence can be translated into a logical expression?
“You cannot ride a roller coaster if and only if and only if you are under 4 feet tall and you are not older than 16 years old”

A

p : You can ride a roller coaster
q : You are under 4 feet tall
r : You are older than 16 years old

~p ↔ q ^ ~r

44
Q

Transform logical expressions to English sentences
p : Alice is smart
q : Alice is honest
1. ~p ^ q
2. p ∨ ( ~p ^ q )
3. p → ~q

A
  1. Alice is not smart but honest
  2. Either Alice is smart or she is not smart but honest
  3. If Alice is smart, then she is not honest
45
Q

Given
p : The file system is full
q : The automated reply can be sent
Express the specification “ The automated reply cannot be sent when the file system is full “ using logical connectives

46
Q

List out the precedence ( priority ) of operators in symbols ( Top to bottom )

A
  1. ~
  2. ^ ( And )
  3. ∨ ( Or )
  4. → ( Conditional )
  5. ↔ ( Biconditional )
47
Q

What does logical equivalent ( ≡ ) represents ?

A
  1. 2 statements ( Left & Right ) have the same Truth Table in all possible cases
48
Q

List out 3 logical equivalence statement

A
  1. Tautology
    • Truth value in all possible cases is True
  2. Contradiction
    • Truth value in all possible cases is False
  3. Contigency / Indeterminant
    • Truth value in all possible cases is Some True and False
49
Q

Prove that p ∨ q ≡ ~ ( ~p ^ ~q )

A

p q p∨q ~p ~q ~p ^ ~q ~ ( ~p ^ ~q )
F F F T T T F
T F T F T F T
F T T T F F T
T T T F F F T

50
Q

Construct a truth table and state whether it is tautology, contradiction or contingency
1. ( A ∨ B ) ^ ( ~A )

A

A B A ∨ B ~A ( A ∨ B ) ^ ( ~A )
F F F T F
T F T F F
F T T T T
F F F T F

Ans : Contingency

51
Q

What does computer used to represent information?

52
Q

What is the possible value for bits?

A
  1. 0
  2. 1
  • Since bit is called binary digit
53
Q

What is the rule of precedence of Boolean Algebra?

A
  1. Parentheses / Brackets
  2. Complement ( NOT )
  3. Product ( AND )
  4. Sum ( OR )
54
Q

Show that ( 1’ . 0’ ) + ( 1 . 0’ ) = 1

A

( 1’ . 0’ ) + ( 1 . 0’ )
= ( 0 . 1 ) + ( 1 . 1 )
= 0 + 1
= 1

55
Q

What is NOT gate also known as?

56
Q

List out the truth table for NOT gate

A

A A’
0 1
1 0

_
A

57
Q

List out what symbols used in the gate below:
1. AND Gate
2. OR Gate

A
  1. A x B ( A . B )
  2. A + B
58
Q

List out the truth table for AND gate

A

A B A.B
0 0 0
0 1 0
1 0 0
1 1 1

59
Q

List out the truth table for OR Gate

A

A B A+B
0 0 0
0 1 1
1 0 1
1 1 1

60
Q

List out the truth table for NAND Gate

A

A B A.B (A.B)’
0 0 0 1
0 1 0 1
1 0 0 1
1 1 1 0

61
Q

List out truth table for NOR Gate

A

A B A+B (A+B)’
0 0 0 1
0 1 1 0
1 0 1 0
1 1 1 0

62
Q

List out truth table for XOR Gate

A

A B A⊕B
0 0 0
0 1 1
1 0 1
1 1 0

  • If 2 value are the same ( 1 , 1 ) , ( 0 , 0 ), it will be 0
  • If A and B are the same value , the gate isn’t happy - Abubakar
63
Q

Which Boolean Identities is important during exam?

A
  1. Distributive Laws
    • x + yz = ( x + y )( x + z )
    • x ( y + z ) = xy + xz
  2. De Morgans’ Laws
    • (xy)’ = x’ + y’
    • ( x + y ) ‘ = x’y’
  3. Absorption Laws
    • x + ( xy ) = x
    • x ( x + y ) = x
  4. Redundancy Laws ( Deal with complement )
    • x + x’y = x + y
    • x ( x’ + y ) = xy
64
Q

Prove that A + A . B = A

A

A + A . B ( Absorption Law )
= A

A + A . B
= A . 1 + A . B Identity Law
= A ( 1 + B ) Distributive Law
= A . 1 Dominance Law
= A Identity Law

65
Q

Until Slide 56 ( Don’t need to include Questions in Boolean Identities , Just proceed with questions now )

66
Q

Write out truth table for p q r

A

p q r
T T T
T T F
T F T
T F F
F T T
F T F
F F T
F F F

1st Column
T
T
T
T
F
F
F
F

2nd Column
T
T
F
F
T
T
F
F

3rd Column
T
F
T
F
T
F
T
F

67
Q

List out truth table for p q

A

p q
T T
T F
F T
F F

1st Column
T
T
F
F

2nd Column
T
F
T
F