CS 2100 Module 1: Logic Flashcards

1
Q

What is a proposition?

A

A statement that can be either true or false nothing else
ex 7 = 5

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

What is a proposition?

A

a statement with an ambiguous value or an x

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

How do we represent propositions?

A

We use propositional variables, denoted by
lowercase letters, to represent propositions.

ex p = “Today is Wednesday”

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

Logical operators

A

combine propositions, Not, And, Or

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

Not operator

A

L, turned 270 degrees, flips argument, true if false, false if true

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

And operator

A

^ , both are true false otherwise

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

Or operator

A

v, at lease one argument is true, can be both true

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

Or Exclusive

A

p or q but not both
(p ^ !q) v ( !p ^ q )

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

Operator precedence

A
  1. not
  2. and
  3. or
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

English But Translation

A

The same as and operator

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

English neither-nor Translation

A

not p and not q

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

Less than or equal to: Translation

A

a <= b = (a<b) v (a=b)
a <= b <= c = (a <= b) ^ ( b <= c)

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

What are truth tables?

A

It tells all possible true values of any compound statement.

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

Truth Table Not

A

p: T, f
!p: F, T

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

Truth Table And

A

p: T, T, F, F
q: T, F, T, F
p ^ q: T, F, F, F

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

Truth Table Or

A

p: T, T, F, F
q: T, F, T, F
p ^ q: T, T, T, F

17
Q

Logical equivalence

A

if two statements convey the same logical meaning, or the same value for every row on the truth table, represented by three parallel lines

18
Q

Logic Laws

A

t = tautology(always true), c = contradiction(always false)
See useful images.

19
Q

Substitution rule

A

We can replace the expression on the left of = with the expression on the right without changing the truth value

20
Q

tautology

A

always true

21
Q

contradiction

A

always false

22
Q

Predicate Logic

A

use variables instead of blanks to form a predicate
x is a CS Major
becomes proposition when x is known

23
Q

Predicate Domain

A

Values we use to replace x
Domain of
x is a CS Major
is all students in UoU

24
Q

Element of

A

represented as a curvy E
a set (domain)
Sarah E D
means Sarah is a n element od the domain D

25
Q
A