CSE 20 DISCRETE MATH. Fall

Similar documents
CSE 20 DISCRETE MATH. Winter

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

9.5 Equivalence Relations

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

Discrete Mathematics Lecture 4. Harper Langston New York University

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

LOGIC AND DISCRETE MATHEMATICS

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

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.

Example: NFA to DFA Conversion

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

MATHEMATICAL STRUCTURES FOR COMPUTER SCIENCE

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

1KOd17RMoURxjn2 CSE 20 DISCRETE MATH Fall

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

1 Elementary number theory

CS1800 Discrete Structures Final Version A

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

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

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

2 Review of Set Theory

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

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

Math Introduction to Advanced Mathematics

THREE LECTURES ON BASIC TOPOLOGY. 1. Basic notions.

CSE 20 DISCRETE MATH WINTER

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

Slides for Faculty Oxford University Press All rights reserved.

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

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

Infinity and Uncountability. Countable Countably infinite. Enumeration

T. Background material: Topology

THEORY OF COMPUTATION

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

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

STABILITY AND PARADOX IN ALGORITHMIC LOGIC

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

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

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

Program Verification & Testing; Review of Propositional Logic

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.

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

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

Fundamentals of Discrete Mathematical Structures

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

COMP Logic for Computer Scientists. Lecture 17

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

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

MATH 22 MORE ABOUT FUNCTIONS. Lecture M: 10/14/2003. Form follows function. Louis Henri Sullivan

2.1 Sets 2.2 Set Operations

Power Set of a set and Relations

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

(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

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

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

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

Introductory logic and sets for Computer scientists

CS402 - Theory of Automata Glossary By

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

Math Week in Review #5. A proposition, or statement, is a declarative sentence that can be classified as either true or false, but not both.

Deductive Methods, Bounded Model Checking

Sets MAT231. Fall Transition to Higher Mathematics. MAT231 (Transition to Higher Math) Sets Fall / 31

Sets 1. The things in a set are called the elements of it. If x is an element of the set S, we say

A Random Walk through CS70

EE292: Fundamentals of ECE

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

Reductions and Satisfiability

CS1800 Discrete Structures Fall 2016 Profs. Aslam, Gold, Ossowski, Pavlu, & Sprague December 16, CS1800 Discrete Structures Final

CS314: FORMAL LANGUAGES AND AUTOMATA THEORY L. NADA ALZABEN. Lecture 1: Introduction

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

Definition: A context-free grammar (CFG) is a 4- tuple. variables = nonterminals, terminals, rules = productions,,

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

Sets. Mukulika Ghosh. Fall Based on slides by Dr. Hyunyoung Lee

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.

Cantor s Diagonal Argument for Different Levels of Infinity

CS100: DISCRETE STRUCTURES

Lecture 5. Logic I. Statement Logic

AXIOMS FOR THE INTEGERS

Cardinality Lectures

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

COMS 1003 Fall Introduction to Computer Programming in C. Bits, Boolean Logic & Discrete Math. September 13 th

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

Overview. CS389L: Automated Logical Reasoning. Lecture 6: First Order Logic Syntax and Semantics. Constants in First-Order Logic.

Notes on Topology. Andrew Forrester January 28, Notation 1. 2 The Big Picture 1

Answer Key #1 Phil 414 JL Shaheen Fall 2010

1.7 The Heine-Borel Covering Theorem; open sets, compact sets

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

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

Geometry Note-Sheet Overview

Integers and Mathematical Induction

Cardinality of Sets MAT231. Fall Transition to Higher Mathematics. MAT231 (Transition to Higher Math) Cardinality of Sets Fall / 15

Chapter 3: Propositional Languages

Homework Set #2 Math 440 Topology Topology by J. Munkres

Transcription:

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

Final exam The final exam is Saturday December 16 11:30am-2:30pm. Lecture A will take the exam in Lecture B will take the exam in Review session TBA

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 Review pseudocode from midterm exam 1. procedure notsogreedychange(n : a positive integer) 2. for i := 1 to r 3. d i := 0 4. while n>0 5. for i := 1 to r 6. if n c i 7. d i := d i +1 8. n := n c i Nested? Incrementing by what in for loops?

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 Convert (2A) 16 to A. binary (base?) B. decimal (base?) C. octal (base?) D. ternary (base?) E. All of the above 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

Power set example Power set: For a set S, its power set is the set of all subsets of S. A= { 1,2,3 } Give an example of a (well-defined) one-to-one function from the set A to its power set (or explain why this is impossible). Give an example of a (well-defined) onto function from the set A to its power set (or explain why this is impossible). Give an example of a (well-defined) function from the set A to its power set that is neither one-to-one nor onto (or explain why this is impossible).

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

Structural induction Theorem: For any bit string w, zeros(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.

Coin-changing For which values can you make change using just 2c and 5c coins?

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 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 a binary relation that is reflexive, not symmetric, and not transitive. B. Define a binary relation that is not reflexive, but is symmetric and transitive. C. Define an equivalence relation with exactly three distinct equivalence classes. D. Define an equivalence relation with infinitely many distinct equivalence classes, each of finite size.

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 December 16 11:30am in announced rooms. See all details on website and Piazza.