{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

lec0111 - Fundamentals of Logic Statements/Propositions...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Fundamentals of Logic Statements/Propositions – Sentences that are true or false but not both. (Just like a simple boolean expression or conditional expression in a programming language.) For our purposes, statements will simply be denoted by lowercase letters of the alphabet, typically p, q, and r. I will refer to these as boolean variables as well. Given simple statements, we can construct more complex statements using logical connectives. Here are 4 logical connectives we will use: 1) Conjunction: This is denoted by the ‘ ’ symbol. The statement p q is read as “p and q.” Only if both the values of p and q are true does this expression evaluate to true. Otherwise it is false. 2) Disjunction: This is denoted by the ‘ ’ symbol. The p q is read as “p or q.” As long as at least one of the values of p or q is true, the entire expression is true 3) Implication: This is denoted by the ‘ ’ symbol. The statement p q is read as “p implies q”. Essentially, in a programming language, this logic is captured in an if then statement. If p is true, the q must be true. However, if p is not true, there is no guarantee of the truth of q. An
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}