×

### Let's log you in.

or

Don't have a StudySoup account? Create one here!

×

or

1 review
by: Anna Camper

22

2

6

# Unit 1 Truth and Logic CPSC 125A

Anna Camper
UMW

Get a free preview of these Notes, just enter your email below.

×
Unlock Preview

These are the notes from the first section of the class.
COURSE
Intro to Discrete Math
PROF.
Jeremy Robinson
TYPE
Class Notes
PAGES
6
WORDS
CONCEPTS
logic, Discrete math
KARMA
25 ?

## 2

1 review
"You can bet I'll be grabbing Anna studyguide for finals. Couldn't have made it this week without your help!"
Jerel Douglas IV

## Popular in ComputerScienence

This 6 page Class Notes was uploaded by Anna Camper on Monday February 8, 2016. The Class Notes belongs to CPSC 125A at University of Mary Washington taught by Jeremy Robinson in Winter 2016. Since its upload, it has received 22 views. For similar materials see Intro to Discrete Math in ComputerScienence at University of Mary Washington.

×

## Reviews for Unit 1 Truth and Logic

You can bet I'll be grabbing Anna studyguide for finals. Couldn't have made it this week without your help!

-Jerel Douglas IV

×

×

### What is Karma?

#### You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 02/08/16
Discrete Math Lecture Notes: Truth and Logic What is discrete mathematics? The study of topics that can be counted as opposed to continuous amounts that can only be measured. 1) Truth and Logic a) Formal Logic: foundation for organized and careful method of thinking that characterizes reasoned activity i) “Study of Reasoning”: Concerned with whether something is true or false ii) Focused of the relationship between statements as opposed to the content of a particular statement b) Uses: i) Checking validity ii) Proving theorems iii)Verifying correctness of computer programs iv)Prolog v) Circuit logic 2) Statements / Propositions a) declarative sentence that is exclusively true or false i) This room has four walls (valid) ii) Why do we need logic? (invalid) iii)She has a very logical outlook (invalid) b) Notation uses letters (A, B, C, etc…) 1. Encode Statements 2. Combine to create more complex statements 3. Manipulate statements according to a set of rules 4. Arrive at new statements 3) Logical Connectives: a) Connect or act upon statements or expressions i) Expressions are any combination of statements and connectives ii) Binary Connectives (1) And (2) Or (3) If (4) Then (5) If and only is iii)Unary Connectives (1) Not b) Conjunction: i) A ʌ B ii) ʌ represents and iii)A, B are statements known as conjuncts iv)Alternative representations - *, &, && v) Truth Table A B A ʌ B T T T T F F F T F F F F c) Disjunction: i) A v B ii) v represents or iii)A, B are statements known as disjuncts iv)Alternative representations - +, |, || v) Truth Table A B A v B T T T T F T F T T F F F d) Exclusive or / XOR i) A  B ii) Alternative representations – (+), ><, ^ iii)Truth Table A B A  B T T F T F T F T T F F F e) Conditional: i) A  B ii)  represents implies or if then iii)A is hypothesis or antecedent statement iv)B is conclusion or consequent statements v) Truth Table A B A  B T T T T F F F T T F F T f) Biconditional: i) A  B ii)  represents if and only if (iff) iii)Alternative representatin - iv)Equivalent to (A  B)  (B  A) v) Truth Table A B A  B T T T T F F F T F F F T g) Negation: i) A ii)  represents not iii)Alternative representations – A’, A, !A, iv)Truth Table A A T F F T h) Well-Formed Formulas i) May be simple statements ii) Statements formed by correctly applying one or more connectives iii)Truth can be determined by direct evaluation if we know the truth values of the simple statements contained i) Connective Order of Precedence i) Connectives within innermost parenthesis then progressing outward (1) Negation () (2) Conjunction (ʌ) and Disjunction (v) (3) Implication () and Biconditional () j) Truth Tables i) Number of rows depends on the number of simple statements (1) If number of simple statements = x, number of rows = 2x A B B A ʌ B A ʌ B (A ʌ B) A ʌ B  (A ʌ B) T T F F T F T T F T T F T T F T F F F T T F F T F F T T k) Tautologies i) Tautology (1) A compound statement that is always true, no matter the value of the simple statements that occur within it (2) Examples (a) A v A (b) It will rain today or it will not rain today l) Contradictions i) Contradiction (1) A compound statement that is always false, no matter the value of the simple statements that occur within it (2) Examples (a) A ʌ A (b) It will rain today and it will not rain today m) Logical Equivalences i) A  B (1) A and B may be either simple or compound (2) The truth values for A and B agree for every row of a truth table (3) A may be replaced by B, even if it’s imbedded in another statement without changing the truth of that statement ii) A B C A ʌ B (A ʌ B) ʌ C (B ʌ C) A ʌ (B ʌ C) T T T T T T T T T F T F F F T F T F F F F T F F F F F F F T T F F T F F T F F F F F F F T F F F F F F F F F F F n) Algorithms i) A set of instructions (procedure) ii) Can be mechanically executed iii)Requires a finite amount of time iv)Solves some problem v) **The major task in developing soft ware programming is devising the algorithm to be followed** o) Logical Programming i) Most programming languages have logical connectives (1) AND, OR, NOT (2) The rules for the use of these operations is the same in a program (3) Contradictions, Tautologies and Equivalences can be identified in programs in order to understand / simplify algorithms ii) Pseudocode (1) Should be easy to understand without programming experience j = 1 //initial value Repeat: Read a value for k If (k < 1) OR (k > 5) write the value of k Otherwise, write the value of j End if statement Increase j by 1 Until j > 6 p) Serendipity i) Fortuitous happening ii) Not a formal proof technique (1) Prove that there are 67 games during March Madness (a) There are 68 teams accepted to the tournament (b) There is only one champion (c)Therefore 67 teams must lose (d) Each game has a single loser (e) Each loser loses only one game (f) Hence: (i) 67 games must be played in order to produce 67 losers.

×

×

### BOOM! Enjoy Your Free Notes!

×

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

## Why people love StudySoup

Jim McGreen Ohio University

#### "Knowing I can count on the Elite Notetaker in my class allows me to focus on what the professor is saying instead of just scribbling notes the whole time and falling behind."

Allison Fischer University of Alabama

#### "I signed up to be an Elite Notetaker with 2 of my sorority sisters this semester. We just posted our notes weekly and were each making over \$600 per month. I LOVE StudySoup!"

Jim McGreen Ohio University

#### "Knowing I can count on the Elite Notetaker in my class allows me to focus on what the professor is saying instead of just scribbling notes the whole time and falling behind."

Parker Thompson 500 Startups

#### "It's a great way for students to improve their educational experience and it seemed like a product that everybody wants, so all the people participating are winning."

Become an Elite Notetaker and start selling your notes online!
×

### Refund Policy

#### STUDYSOUP CANCELLATION POLICY

All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email support@studysoup.com

#### STUDYSOUP REFUND POLICY

StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here: support@studysoup.com

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to support@studysoup.com