CSE 20 DISCRETE MATH. Winter

Similar documents
CSE 20 DISCRETE MATH. Fall

DISCRETE MATHEMATICS

Introduction to Sets and Logic (MATH 1190)

Summary of Course Coverage

r=1 The Binomial Theorem. 4 MA095/98G Revision

MATH 139 W12 Review 1 Checklist 1. Exam Checklist. 1. Introduction to Predicates and Quantified Statements (chapters ).

CSC Discrete Math I, Spring Sets

CSE 20 DISCRETE MATH WINTER

[Ch 6] Set Theory. 1. Basic Concepts and Definitions. 400 lecture note #4. 1) Basics

Discrete Mathematics Lecture 4. Harper Langston New York University

LOGIC AND DISCRETE MATHEMATICS

9.5 Equivalence Relations

2. Sets. 2.1&2.2: Sets and Subsets. Combining Sets. c Dr Oksana Shatalov, Fall

Chapter 3. Set Theory. 3.1 What is a Set?

MATHEMATICAL STRUCTURES FOR COMPUTER SCIENCE

About the Author. Dependency Chart. Chapter 1: Logic and Sets 1. Chapter 2: Relations and Functions, Boolean Algebra, and Circuit Design

To prove something about all Boolean expressions, we will need the following induction principle: Axiom 7.1 (Induction over Boolean expressions):

CHAPTER 8. Copyright Cengage Learning. All rights reserved.

Infinity and Uncountability. Countable Countably infinite. Enumeration

1KOd17RMoURxjn2 CSE 20 DISCRETE MATH Fall

Example: NFA to DFA Conversion

1 Elementary number theory

To prove something about all Boolean expressions, we will need the following induction principle: Axiom 7.1 (Induction over Boolean expressions):

TOPOLOGY, DR. BLOCK, FALL 2015, NOTES, PART 3.

2.2 Set Operations. Introduction DEFINITION 1. EXAMPLE 1 The union of the sets {1, 3, 5} and {1, 2, 3} is the set {1, 2, 3, 5}; that is, EXAMPLE 2

CS Bootcamp Boolean Logic Autumn 2015 A B A B T T T T F F F T F F F F T T T T F T F T T F F F

THREE LECTURES ON BASIC TOPOLOGY. 1. Basic notions.

THEORY OF COMPUTATION

Power Set of a set and Relations

2 Review of Set Theory

Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103. Chapter 2. Sets

quanüfied Statements; valid well-formed formulas; comparison of propositional and predicate wffs. Exercises

A set with only one member is called a SINGLETON. A set with no members is called the EMPTY SET or 2 N

Slides for Faculty Oxford University Press All rights reserved.

Discrete Mathematics SECOND EDITION OXFORD UNIVERSITY PRESS. Norman L. Biggs. Professor of Mathematics London School of Economics University of London

Geometry Note-Sheet Overview

Practice Final. Read all the problems first before start working on any of them, so you can manage your time wisely

MATHEMATICS 191, FALL 2004 MATHEMATICAL PROBABILITY Outline #1 (Countability and Uncountability)

Let A(x) be x is an element of A, and B(x) be x is an element of B.

A Survey of Mathematics with Applications 8 th Edition, 2009

CPSC 121 Some Sample Questions for the Final Exam Tuesday, April 15, 2014, 8:30AM

STABILITY AND PARADOX IN ALGORITHMIC LOGIC

Fundamentals of Discrete Mathematical Structures

Mathematical Logic Prof. Arindama Singh Department of Mathematics Indian Institute of Technology, Madras. Lecture - 9 Normal Forms

9/19/12. Why Study Discrete Math? What is discrete? Sets (Rosen, Chapter 2) can be described by discrete math TOPICS

Math Introduction to Advanced Mathematics

Math 55 - Spring 04 - Lecture notes # 1 - Jan 20 (Tuesday)

(a) (4 pts) Prove that if a and b are rational, then ab is rational. Since a and b are rational they can be written as the ratio of integers a 1

CIS 1.5 Course Objectives. a. Understand the concept of a program (i.e., a computer following a series of instructions)

CS1800 Discrete Structures Final Version A

The set consisting of all natural numbers that are in A and are in B is the set f1; 3; 5g;

CS 3512, Spring Instructor: Doug Dunham. Textbook: James L. Hein, Discrete Structures, Logic, and Computability, 3rd Ed. Jones and Barlett, 2010

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Discrete Mathematics

Integers and Mathematical Induction

Cardinality of Sets. Washington University Math Circle 10/30/2016

Introduction II. Sets. Terminology III. Definition. Definition. Definition. Example

A Random Walk through CS70

Program Verification & Testing; Review of Propositional Logic

T. Background material: Topology

Sub: EM-III (14MA301) Section: A & B Date: 13/07/17 One Mark Questions: 1. a) Write the iterative formula to compute 3 N by Newton s method.

Integrated Math 1. Integrated Math, Part 1

Propositional Calculus: Boolean Algebra and Simplification. CS 270: Mathematical Foundations of Computer Science Jeremy Johnson

Foundations of AI. 9. Predicate Logic. Syntax and Semantics, Normal Forms, Herbrand Expansion, Resolution

Indicate the option which most accurately completes the sentence.

Notes. Notes. Introduction. Notes. Propositional Functions. Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry.

Math 776 Graph Theory Lecture Note 1 Basic concepts

AXIOMS FOR THE INTEGERS

CS 441 Discrete Mathematics for CS Lecture 24. Relations IV. CS 441 Discrete mathematics for CS. Equivalence relation

STUDENT NUMBER: MATH Final Exam. Lakehead University. April 13, Dr. Adam Van Tuyl

2. Functions, sets, countability and uncountability. Let A, B be sets (often, in this module, subsets of R).

Introductory logic and sets for Computer scientists

ELEMENTARY NUMBER THEORY AND METHODS OF PROOF

Induction and Recursion. CMPS/MATH 2170: Discrete Mathematics

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Discrete Mathematics

ELEMENTARY NUMBER THEORY AND METHODS OF PROOF

CS1800 Discrete Structures Fall 2017 October 25, CS1800 Discrete Structures Midterm Version B

4&5 Binary Operations and Relations. The Integers. (part I)

COMP Logic for Computer Scientists. Lecture 17

1.1 What is an algorithm? Control structures Further examples of algorithms 7 Exercises 11

1. (15 points) Solve the decanting problem for containers of sizes 199 and 179; that is find integers x and y satisfying.

CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer Science (Arkoudas and Musser) Sections p.

Cardinality Lectures

Deductive Methods, Bounded Model Checking

To illustrate what is intended the following are three write ups by students. Diagonalization

Strategies for Proofs

2.1 Sets 2.2 Set Operations

Reductions and Satisfiability

Binary Relations McGraw-Hill Education

Introduction to Automata Theory. BİL405 - Automata Theory and Formal Languages 1

correlated to the Michigan High School Mathematics Content Expectations

Rizvi College of Arts, Science & Commerce Bandra (W), Mumbai Teaching Plan Academic Year

Functions. Def. Let A and B be sets. A function f from A to B is an assignment of exactly one element of B to each element of A.

CS 1200 Discrete Math Math Preliminaries. A.R. Hurson 323 CS Building, Missouri S&T

Notation Index. Probability notation. (there exists) (such that) Fn-4 B n (Bell numbers) CL-27 s t (equivalence relation) GT-5.

CSE101: Design and Analysis of Algorithms. Ragesh Jaiswal, CSE, UCSD

Homework 1. Due Date: Wednesday 11/26/07 - at the beginning of the lecture

GARDEN CITY UNIVERSITY. Bachelor of Computer Applications SEMESTER- I. Course: CONCEPTS OF PROGRAMMING USING C LANGUAGE CODE: 05ABCAR17111 CREDITS: 04

Math 302 Introduction to Proofs via Number Theory. Robert Jewett (with small modifications by B. Ćurgus)

It is important that you show your work. There are 134 points available on this test.

Discrete Structures. Fall Homework3

Transcription:

CSE 20 DISCRETE MATH Winter 2017 http://cseweb.ucsd.edu/classes/wi17/cse20-ab/

Final exam The final exam is Saturday March 18 8am-11am. Lecture A will take the exam in GH 242 Lecture B will take the exam in SOLIS 107 Practice questions +seat maps for the final exam are now available on Piazza. Solutions will not be posted for these questions. However, the TAs will discuss them in the review session Thursday 03/16/2017 8:00p-10:50p PETER 108.

1. Algorithms 2. Number systems and integer operations 3. Propositional Logic 4. Predicates & Quantifiers 5. Proof strategies 6. Sets 7. Induction & Recursion 8. Functions & Cardinalities of sets 9. Binary relations & Modular arithmetic

Algorithms Trace pseudocode given input. Explain the higher-level function of an algorithm expressed with pseudocode. Identify and explain (informally) whether and why an algorithm expressed in pseudocode terminates for all input. Describe and use classical algorithms: Addition and multiplication of integers expressed in some base Define the greedy approach for an optimization problem. Write pseudocode to implement the greedy approach for a given optimization problem.

Pseudocode Prove that after the code snippet executes, the value stored in x is not equal to 2. What proof technique will you try? A. Direct proof B. Contrapositive proof C. Proof by contradiction D. Exhaustive proof (proof by cases) E. Find an example

Pseudocode Prove that after the code snippet executes, the value stored in x is not equal to 2. Do you want to go through the proof together? A. Yes B. No

Number systems and integer representations Convert between positive integers written in any base b, where b >1. Define the decimal, binary, hexadecimal, and octal expansions of a positive integer. Describe and use algorithms for integer operations based on their expansions Relate algorithms for integer operations to bitwise boolean operations. Correctly use XOR and bit shifts. Define and use the DIV and MOD operators.

Arithmetic + Representations Rosen p. 251 What is the sum of (2A) 16 and (13) 16? What is the product of (2A) 16 and (13) 16? A. Do you want to work through both together? B. Just work through sum. C. Just work through product. D. Neither. Hexadecimal digits 0 8 1 9 2 A 3 B 4 C 5 D 6 E 7 F

Propositional Logic Describe the uses of logical connectives in formalizing natural language statements, bit operations, guiding proofs and rules of inference. Translate sentences from English to propositional logic using appropriate propositional variables and boolean operators. List the truth tables and meanings for negation, conjunction, disjunction, exclusive or, conditional, biconditional operators. Evaluate the truth value of a compound proposition given truth values of its constituent variables. Form the converse, contrapositive, and inverse of a given conditional statement. Relate boolean operations to applications: Complex searches, Logic puzzles, Set operations and spreadsheet queries, Combinatorial circuits Prove propositional equivalences using truth tables Prove propositional equivalences using other known equivalences, e.g. DeMorgan s laws, Double negation laws, Distributive laws, etc. Identify when and prove that a statement is a tautology or contradiction Identify when and prove that a statement is satisfiable or unsatisfiable, and when a set of statements is consistent or inconsistent. Compute the CNF and DNF of a given compound proposition.

Conditionals Rosen p. 6-10 Which of these compound propositions is logically equivalent to A. B. C. D. E. None of the above. p q p à q T T T T F F F T T F F T

Conditionals Rosen p. 6-10 Which of these compound propositions is logically equivalent to A. B. C. D. Normal forms: A. Do you want to find equivalent CNF and DNF? B. Just find DNF? C. Just find CNF? D. Neither. E. None of the above.

Predicates & Quantifiers Determine the truth value of predicates for specific values of their arguments Define the universal and existential quantifiers Translate sentences from English to predicate logic using appropriate predicates and quantifiers Use appropriate Boolean operators to restrict the domain of a quantified statement Negate quantified expressions Translate quantified statements to English, even in the presence of nested quantifiers Evaluate the truth value of a quantified statement with nested quantifiers

Evaluating quantified statements Rosen p. 64 #1 In which domain(s) is this statement true? A. All positive real numbers. B. All positive integers. C. All real numbers in closed interval [0,1]. D. The integers 1,2,3. E. The power set of {1,2,3}

Proof strategies Distinguish between a theorem, an axiom, lemma, a corollary, and a conjecture. Recognize direct proofs Recognize proofs by contraposition Recognize proofs by contradiction Recognize fallacious proofs Evaluate which proof technique(s) is appropriate for a given proposition: Direct proof, Proofs by contraposition, Proofs by contradiction, Proof by cases, Constructive existence proofs, induction Correctly prove statements using appropriate style conventions, guiding text, notation, and terminology

A sample proof by contradiction Theorem: There are infinitely many prime numbers.

Sets Define and differentiate between important sets: N, Z, Z+, Q, R, R+, C, empty set, {0,1}* Use correct notation when describing sets: {...}, intervals, set builder Define and prove properties of: subset relation, power set, Cartesian products of sets, union of sets, intersection of sets, disjoint sets, set differences, complement of a set Describe computer representation of sets with bitstrings

Power set example Power set: For a set S, its power set is the set of all subsets of S. Which of the following is not true (in general)? A. B. C. D. E. None of the above

Induction and recursion Explain the steps in a proof by mathematical induction Explain the steps in a proof by strong mathematical induction Use (strong) mathematical induction to prove correctness of identities and inequalities Use (strong) mathematical induction to prove properties of algorithms Use (strong) mathematical induction to prove properties of geometric constructions Apply recursive definitions of sets to determine membership in the set Use structural induction to prove properties of recursively defined sets

Triangles Theorem: If start with an equilateral triangle and divide each side into n equal segments, then connect the division points with all possible line segments parallel to sides of original triangle, then many small triangles will be contained in the original triangle.

Triangles Theorem: At stage n, n 2 triangles are formed. Proof: by Mathematical Induction. 1. Basis step WTS that when side lengths undivided, 1 2 triangles are formed. 2. Inductive hypothesis Let k be a nonnegative integer. Assume that when divide sides into k pieces, k 2 triangles are formed. 3. Induction step WTS when divide sides into k+1 pieces, (k+1) 2 triangles are formed.

Structural induction Theorem: For any bit strings w, ones(w) l(w). A. What does this mean? How to prove it? B. Just talk about what it means. C. How does structural induction apply? D. Neither.

Postage What postage can you make using just 3c and 5c stamps?

Functions & Cardinality of sets Represent functions in multiple ways Define and prove properties of domain of a function, image of a function, composition of functions Determine and prove whether a function is one-to-one Determine and prove whether a function is onto Determine and prove whether a function is bijective Apply the definition and properties of floor function, ceiling function, factorial function Define and compute the cardinality of a set Finite sets countable sets uncountable sets Use functions to compare the sizes of sets Use functions to define sequences: arithmetic progressions. geometric progressions Use and prove properties of recursively defined functions and recurrence relations (using induction) Use and interpret Sigma notation

Cardinality and subsets Suppose A and B are sets and. A. If A is infinite then B is finite. B. If A is countable then B is countable. C. If B is infinite then A is finite. D. If B is uncountable then A is uncountable. E. None of the above.

Binary relations Determine and prove whether a given binary relation is symmetric antisymmetric reflexive transitive Represent equivalence relations as partitions and vice versa Define and use the congruence modulo m equivalence relation

Properties of binary relations Over the set Z + A. Define an equivalence relation with exactly three equivalence classes. B. Define an equivalence relation with infinitely many equivalence classes, each of finite size. C. Define a binary relation that is reflexive but not symmetric and not antisymmetric. D. Define a binary relation that is reflexive, symmetric, antisymmetric, and transitive. E. Define a binary relation that is not reflexive, not symmetric, not antisymmetric, and not transitive.

Modular arithmetic Rosen p. 288 Solve the congruences

Reminders 1. Algorithms 2. Number systems and integer operations 3. Propositional Logic 4. Predicates & Quantifiers 5. Proof strategies 6. Sets 7. Induction & Recursion 8. Functions & Cardinalities of sets 9. Binary relations and Final exam Saturday March 18 8am in announced rooms. See all details on website and Piazza.