750 likes | 1.48k Views
Discrete Mathematics I Lectures 1.1,1.2,1.3. Some material adapted from lecture notes provided by Dr. Chungsim Han and Dr. Sam Lomonaco. Dr. Adam Anthony Spring 2011. Lecture 1.1. Intro to Discrete Math Syllabus Highlights Course Policies Intro to Propositional Logic.
E N D
Discrete Mathematics ILectures 1.1,1.2,1.3 Some material adapted from lecture notes provided by Dr. Chungsim Han and Dr. Sam Lomonaco Dr. Adam Anthony Spring 2011
Lecture 1.1 • Intro to Discrete Math • Syllabus Highlights • Course Policies • Intro to Propositional Logic
What is Discrete Mathematics? • It’s sort of the opposite of calculus • Calculus = analysis of continuous functions and processes • Rates of change • Mixture Models • Surface area • Discrete Math = analysis of processes that consist of “a sequence of individual steps” (Epp, xiv) • Logic, deduction and induction • Sets and Functions • Describing data (graphs, trees) • Counting/probability • Algorithms for solving problems
Why Care about Discrete Mathematics? • It challenges you to a different form of thought, one which you rarely encounter in high school • It’s relevant (though not always obviously so) to computing, and will come up all the time as you study • It will equip you with some really strong reasoning skills that are applicable outside of mathematics • Might even help you on the GRE!
GRE Question #1 • Which of the following contradicts the view that only the smart become rich? • Brian was smart, yet he was poor his whole life. • Both “smart” and “rich” are relative terms. • Different people are smart in different ways. • Some smart people do not desire to become rich. • Peter is stupid, yet he amassed a large fortune by the age of 30.
GRE Question #2 • Excessive amounts of mercury in drinking water, associated with certain types of industrial pollution, have been shown to cause Hobson’s disease. Island R has an economy based entirely on subsistence-level agriculture; modern industry of any kind is unknown. The inhabitants of Island R have an unusually high incidence of Hobson’s disease. Which of the following can be validly inferred from the above statements? • Mercury in drinking water is actually perfectly safe • Mercury in drinking water must have sources other than industrial pollution • Hobson’s disease must have causes other than mercury in drinking water • II Only • III only • I and II only • I and III only • II and III only
Syllabus Highlights • Instructor: • Dr. Adam Anthony • apanthon@bw.edu(preferred way to reach me) • 440 826 2059 (less reliable) • Guaranteed Office hours: • Monday/Wednesday 1:00 – 2:00 • Tuesday/Thursday 10:00 AM – 11:00 AM • Any time M-F 8:00AM – 4:00 PM by appointment • You can stop by my office (check my posted semi-open door policy before coming in), but I may not be there, or I may ask you to come back later • Evening Students • 30-60 minutes prior to class available by appointment only
Textbook and Grading • Required Text: • Susanna S. Epp. Discrete Mathematics with Applications. Fourth Edition. Brooks-Cole, 2011. ISBN: 978-0-495-39132-6 • Grading: • 11 Homeworks ~ 30% • 3 Midterms ~ 10% each (30% total) • Final Exam ~ 20% • Study Journal ~ 5% • Class Participation (Pop Quizzes) ~ 5% • Read syllabus to see letter grade scale
Homework and Study Journal • Buy some type of bound notebook/binder to use as a study journal. Should be separate from anything you use to take notes in class • Solving a problem • Messy • Error-prone • I don’t want to see this; It goes in your journal • Writing a solution • Take a solved problem from your journal, write up the solution in a neat, readable format • This is what you’ll turn in as homework • All Homework problems must be solved in the journal first, then re-written for submission • Supplemental problems will also be required in the journal only that will help you study • Journals will be graded at each midterm • A certain number of assigned problem sets must be attempted in the journal before each exam • Graded only for completeness Each student may request a single extension of up to 1 week, but must do so 24 HOURS IN ADVANCE OF THE DUE DATE (dire circumstances excluded). I will also drop your lowest homework score. NO OTHER EXTENSIONS WILL BE GRANTED, FOR ANY (INCLUDING MEDICAL) REASON!
Collaboration • Working together is OK, to an extent, when you: • Discuss problems, approaches • Work out solutions collaboratively • Give each other hints, helpful suggestions (“I found page 53 to be useful…”) • Working together is not OK when: • Only one person is doing any talking • Problems are worked out on a board, then everyone copies answer • You borrow someone’s homework to ‘get started’ • You search for answers on the Internet and copy them
Collaboration Policy • Students may solve problems in their journals in groups, but they must complete the written solutions individually. • Furthermore, to prevent any "accidental" cheating, each student must provide a citation at the top of each written solution, that has the form: • I worked with _________________________ on this assignment. • If you forget: • 1st time = Warning • Every other time = 20% reduction of assignment grade • If collaboration is evident, you may be punishable under the college’s Academic Honesty Policy (see syllabus)
Technology Policy • Technology is great, especially for us! • Using it to enhance your learning is fully permitted • Technology is a tempting distraction • Facebook does not care if you fail • It is impossible to browse the internet and learn at a high level at the same time • Abuse of technology in the classroom will be penalized if you: • Distract classmates • Distract the professor • Exhibit pattern behavior • Not paying attention for > ½ class period • Minor infractions occurring in multiple class periods • Penalties: • 1st offense: you will be asked to immediately shut down the equipment • Subsequent offenses: dismissal from class and/or a 5% reduction in final grade • Using computers in class is your privilege
How to Pass This Class • I promise to pass you (Minimum grade of D) if you’ll commit to: • Perfect Attendance (excused absences allowed, read syllabus) • Turn in 11 complete homework assignments (no blank/weakly attempted problems) • Visit the Mathematics lab in at least 8 different weeks (there will be a signup sheet) • In the Learning Center (Ritter Library second floor Rm. 206) between noon and 9:30 p.m. Monday through Thursday and again from 6:00-9:00 p.m. on Sunday evenings. • Complete every problem assigned to the study journal • Failing any one of these commitments voids the offer!
What to do before next class • Read the syllabus (In BB, click ‘course main page’ link, then click syllabus in menu) • Grading criteria • ADA Compliance • Excused Absence/Missed Exam Policy • Must be notified 7 days prior if you will miss an exam. VERY FEW EXCEPTIONS • Skim course schedule, note exam dates! • DO NOT PRINT!!! • Assigned Reading
Logic • Crucial for mathematical reasoning • Used for designing electronic circuitry • Logic is a system based on propositions. • A proposition is a statement that is either true or false (not both). • We say that the truth value of a proposition is either true (T) or false (F). • Corresponds to 1 and 0 in digital circuits
Logical Forms • Recipe for Success • Follow a basic pattern • You can solve a problem/answer a question in the same way for all problems that have the same logical form. • Can be expressed in English, but we’ll often simplify the process by using symbols
Example 1 • How do you know that today is not Labor day? • Logical form (symbolic template): • If p, then q. (read as: anywhere in the world, if p is true, then q will also always be true) • NOT q (read as: I found a case where q is false) • Therefore, NOT p (How do we know for sure???) • If 1) and 2) are true facts, then we can be CERTAIN about 3 being true, without any evidence • The form above is therefore considered a valid form • This argument is called Modus Tollens
Example 2 • Find the forms of the following arguments: • If Jane is a CIS major, then Jane takes MTH 161 Jane does not take MTH 161 Therefore, Jane is not a CIS major • If x2-4x+4 = 0, then x = 2 x 2 Therefore, x2-4x+4 0 • Strategy for finding logical forms given on the board
Propositions (Example 3) • A Proposition is a sentence that is either true or false, but not both. • Which of the following are Propositions (and is it true/false)? • 1 + 2 = 3 • 1 + 2 = 5 • X + 2 = 5 • x < y if and only if y > x • Elephants are bigger than mice • Today is January 10 and 99 < 5.” Not a proposition because we need to know what X is before we can evaluate its truth value Here, the values of X and Y don’t matter, and we can evaluate the truth value.
Variable Systems • Algebra: hassling H.S. Students for decades • Imagine if you had to solve problems like this: • Pick a number. The new number you will compute is 5 times that first number, plus 4. • Alternative: Y = 5X + 4 • VARIABLES MAKE MATH EASIER, MORE CONCISE • In logic, we’ll assign a letter to each individual proposition that we need to make our argument • Let p = “It is Hot” and q = “It is Humid”
Basic Logical Connectives • But there’s more than variables… • In algebra, we have +, -, /, *, >, <, =, etc. • These symbols let us express complex ideas using a single symbol • Three core logical connectives: • NOT (negation): p (or ~ p) (means p is not true) • AND (conjunction): p q (means p AND q are both true) • OR (disjunction): p q (means that AT LEAST ONE of these is true) • In practice, we assign letters to the simplest possible facts, then use these three connectives to build more complex propositions
Exercise 4 • Use variables and connectives to express the following sentences (Let p = “It is Hot” and q = “It is Humid”): • It is hot but it is not humid • It is neither hot nor humid • It is hot or humid but not both This is a common compound statement, so logicians created a special operator called XOR to save time: p q
Lecture 1.2 • Truth Tables • Order of Operations • Logical Equivalence • Logical laws and Simplification of complex statements • Conditional Statements • Converse, Inverse, Contrapositive
Truth Tables • Logical arguments are frequently hypothetical • We don’t always know whether a statement is true or false, in real life! • First solution: enumerate all the possibilities • Let p = “It is Hot” and q = “It is Humid” • If you are in a climate-controlled, windowless room, what are all the possible things you might experience when you exit? • It is hot and it is humid • It is hot and it is not humid • It is not hot and it is humid • It is not hot and not humid TRUTH TABLE
Conjunction (AND) • Binary Operator, Symbol: • Example: • The conjunction of “It is raining” and “The sun is shining” is “It is raining but the sun is shining”.
Disjunction (OR) • Binary Operator, Symbol: • Example: • The disjunction of “It is raining” and “The sun is shining” is “It is raining or the sun is shining.” CMSC 203 - Discrete Structures
Negation (NOT) • Unary Operator, Symbol: • Example: • The negation of “It is raining” is “It is not raining”
Exclusive Or (XOR) • Binary Operator, Symbol: • Example: • The exclusive OR of “It is raining” and “The sun is shining” is “It is raining or the sun is shining, but not both.”
Order of Operations • Just like in algebra, statements can be ambiguous unless we set up some rules: • pq ??? It is not hot or it is humid? It is not the case that is is hot or humid? • Order of operations: ,,, • Use parentheses to force certain meanings: • It is not hot or it is humid • It is not the case that it is hot or humid
Exercise 6 • Create Truth Tables with columns for the following propositions: • (pq) and pq • (pq) (p q) and (p q) ( p q) • p (q r) and (p q) r • p p and p p
Logical Equivalence • Two Complex Statements P and Q are logically equivalent if and only if they have identical truth tables. We denote equivalence as P Q:
Tautologies and Contradictions • A tautology is a statement that is always true (denoted as t). • Examples: • T t • R(R) t • A contradiction is a statement that is always false (denoted as c). • Example: • F c • R(R) c • The negation of any tautology is a contradiction, and the negation of any contradiction is a tautology.
Theorem 2.1.1 • Given any propositions p, q, and r, a tautology t and a contradiction c, the following logical equivalences hold:
Exercise 8 • For each statement below: • Choose variables • Translate to logical formulas • negate the formulas • distribute negations using DeMorgan’s Laws • Translate back to English • Amy Got an A on Test 1 and Laura got an A on the final • Charlie drove or rode a bicycle • x 2
Exercise 9 (49,53 from book p. 38) • Use the various logic laws to show the following:
Implication (if - then) • Binary Operator, Symbol: • Example: • The conditional of “If you finish your homework” and “I will take you to a movie” is “If you finish your homework then I will take you to a movie.” • When the left-hand side of a conditional is FALSE, we say it is vacuously true, or true by default. In other words, it is true because it is not false
Exercise 1 • Let p = “It is Hot” and q = “It is Humid.” and m = “It is miserable outside” Express the following statements symbolically: • If it is not hot, it is not humid • It is hot only if it is humid • If it is hot and humid, then it is miserable outside • If it is not miserable outside, then it is not humid
An Important Equivalence (Exercise 3) • Use a Truth Table to Show that: • Use the above to also show that:
Exercise 4 • Convert the following to symbols, negate the expression, then distribute the negation as far as possible. • If Bob is Rich, then Bob is Happy. • If Sue got the right output, then she programmed correctly.
Converse, Contrapositive, and Inverse • Take any conditional: PQ • Converse: QP • Contrapositive: Q P • Inverse: P Q • Thought exercise: The contrapositive of a conditional always has the same truth value as the conditional. This is not true for the converse and inverse. • These terms will come up again so don’t forget about them!!!
Biconditional (if and only if) • Binary Operator, Symbol: • Example: • The biconditional of “It is raining” and “The sun is shining” is “It is raining if and only if the sun is shining.” • When is this true?
Necessary and Sufficient • The term sufficient condition is another way of expressing a conditional. • p is a sufficient condition for q means: • p q • Yet another term is a necessary condition: • p is a necessary condition for q means: • q p (NOTE THE FLIP-FLOP!) • Finally, a condition can be necessary AND sufficient • p is a necessary and sufficient condition for q means: • p q
Exercise 8 • Write the following as conditional or biconditional statements: • Getting all A’s is sufficient (but not necessary) for graduating with honors. • Being curious is a necessary (but not sufficient) condition for being a successful student • Getting 100 points on all the exams is both necessary and sufficient for earning an A on the course
About • The use of necessary and sufficient terms together is not a coincidence • To confirm that p q is true, you can separately prove: • pq (sufficient) • qp (necessary) • Another nice use of is for logical equivalence: • Two compound statements P and Q are logically equivalent if the truth table for P Q is always true
DeMorgan’s Law Revisited • OR you can show that p q and q p are both always true
Valid and Invalid Arguments • Remember Modus Tollens? If p then q p q q q Therefore, p p • If Jane is a CIS major, then Jane takes MTH 161 Jane does not take MTH 161 Therefore, Jane is not a CIS Major • This argument is based on the definition of a conditional. How does that work???
Arguments and Forms • An argument is a sequence of statements. The final statement is the conclusion. The preceding statements are premises (hypotheses). • We will assume, for the sake of argument, that all premises must be true. • If they are not, then the argument fails! • An argument form is obtained by generalizing an English argument using propositional variables • An argument form is valid if any argument of that form for which the conclusion is guaranteed to be true, without evidence, as long as the premises are true
Exercise 2.3.2 • Verify that modus tollens is a valid form of argument using a truth table • (Remember, whenever ALL the premises are true, then the conclusion HAS to be true)
Other Valid Arguments • Modus Ponens: p q p q • Generalization: p q p qp q • Specialization: p q p • Elimination: p q q p • Transitivity: p q q r p r • Division into Cases: p q p r q r r