Lecture 1 and 2 Flashcards

Lecture 1 notes

1
Q

How to convert Binary to Decimal format

A

To convert binary to decimal format, starting with the leftmost digit add together 1 x 2^n.
Example- 1110011 is equivalent to 115. 1x2^6 + 1 x 2^5 + 1 x 2^4 + 1 x 2^1 + 1 x 2 ^0. You exclude any that have a 0 in the slot.

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

How to convert decimal to binary format?

A

To convert decimal to binary format you continually divide by 2 and track the remainder and then read the remainders backwards.

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

How to convert decimal to hexadecimal?

A

To convert decimal to hexadecimal you divide the number by 16 and read the remainders backwards.

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

How to convert binary to hexadecimal?

A

To convert binary to hexadecimal you split the binary into groups of 4 and if there is an uneven group of less than 4 add a 0 to the left hand side.

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

How to convert binary into octal

A

To convert binary to octal you split the binary into group of 3

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

How to express a decimal based fraction in binary?

A

Start by splitting the whole number portion and the fraction
Then multiply the fraction portion by 2 and record the 1 on a separate column and continue to only multiply the fraction portion.

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

What is the double negative law?

A

~(~p) = p

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

What is the commutative law

A

p v q = q v p

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

What is the Associative Law?

A

(p v q) v r = p v (q v r) and

p ^ q) ^ r = p^ (q^r

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

What is the distributive law?

A
p ^ (q v r) = (p^ q) v (p^r) and
p v (q^r) = (p v q) ^ (p v r)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is Demorgan’s Law

A

~(p v q) = ~p ^ ~q

~(p ^ q) = ~p v ~q

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

Difference between predicate and proposition?

A

In contrast predicate logic distinguishes the subject of a sentence from its predicate.

i.e “The dog is sleeping”
the phrase is sleeping is the predicate and is symbolized by P(x)

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

How do you rewrite p XOR q?

A

2 ways:

  1. (p v q) ^ ~(p ^ q)
  2. (p ^ ~q) v (q ^ ~p)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How to rewrite p –> q

A

~p v q

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

How to rewrite p q

A

2 Ways:

  1. (p –> q) ^ (q –>p)
  2. ~(p XOR q)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the negation of: For all x, P(x)

A

~(For all x, P(x)) <=> There exists x, ~p(x)

This works for there exists statements as well. to negate these statements change ‘for all’ to ‘there exists’ and vice versa

17
Q

What is a Theorem (proposition)?

A

a statement that has been proven to be true.

18
Q

What are Axioms, postulates, hypotheses, premises?

A

They are assumptions (often unproven) defining the structures about which we are reasoning.

19
Q

What are Rules of inference

A

patterns of logically valid deductions from hypotheses to conclusions.

20
Q

What is a Lemma

A

a minor theorem used as a stepping stone to proving a major theorem.

21
Q

What is a corollary?

A

a minor theorem proved as an easy consequence of a major theorem

22
Q

What is a conjecture?

A

a statement whose truth value has not been proven. May be widely believed to be true anyway.

23
Q

What is a theory?

A

the set of all theorems that can be proven.

24
Q

What is the rule of Addition pertaining to Inference Rules

A

p is true

p v q is true

25
Q

What is the rule of simplification pertaining to inference rules

A

p ^ q is true

q is true

26
Q

What is the rule of conjunction pertaining to inference rules?

A

p is true
q is true
p ^ q is true

27
Q

What is the rule of Modus Ponens aka Law of detachment

A

p –> q
p is true
therefore q

28
Q

What is the rule of Modus tollens aka the mode of denying?

A

p implies q
not p
therefore not q

29
Q

What is the rule of hypothetical syllogism

A

p implies q
q implies r
therefore p implies r

30
Q

What is the rule of disjunctive syllogism?

A

p v q
not p
therefore q

31
Q

What is Universal instantiation?

A
For all x P(x)
therefore P(o) (some value)
32
Q

What is Universal generalization?

A

P(g) of some arbitrary g

therefore for all x P(x)

33
Q

What is existential instantiation

A
there exists x such that P(x)
therefore P(c)
34
Q

What is existential generalization?

A

P(o)

therefore there exists x such that P(x)

35
Q

Proof Methods for implications (p implies q) 1. Direct Proof

A

assume p is true and prove q

36
Q

Proof methods for implications 2. Indirect Proof

A

Assume ~q and prove ~p

37
Q

Proof methods for implications 3. Vacuous Proof

A

prove ~p by itself

38
Q

Proof methods for implications 4. Trivial proof

A

prove q by itself

39
Q

What is (k+1)! equal to?

A

(k+1)*k!