5 views

Uploaded by rgolfnut1

- Mcqs Mth301 Solved
- Ncert Math 12
- Linear Algebra New Book
- calculus
- linear functions unit lesson plan preview
- Examples Bijections
- Holiday Assignment Functions
- Goldrei Classic Set Theory
- hw1solutions
- An Instrumental Approach to Mathematics Learning
- Functions
- 116 Problems in Algebra - Functional Equations
- A Set Theoretic Algorithm for Real Time Terrain Mapping of Mobile Robots in Outdoor Environments
- Graphing Calculator Capabilities for the Exams
- FUNCTIONS.pptx
- FUNCTIONS
- c lab
- 2A-NOTES-PERMUTATIONS-COMBINATIONS.pdf
- 12 Maths Key Notes Ch 01 Relations and Functions
- 12 Maths Test Paper Ch1 1

You are on page 1of 16

Milos Hauskrecht milos@cs.pitt.edu 5329 Sennott Square

M. Hauskrecht

Course administration

Midterm 1: Week of October 4, 2009 Covers chapter 1 and 2.1-2.3 of the textbook Closed book Tables for equivalences and rules of inference will be given to you Course web page: http://www.cs.pitt.edu/~milos/courses/cs441/

M. Hauskrecht

Set

Definition: A set is a (unordered) collection of objects. These objects are sometimes called elements or members of the set. (Cantor's naive definition) Examples: Vowels in the English alphabet V = { a, e, i, o, u } First seven prime numbers. X = { 2, 3, 5, 7, 11, 13, 17 }

M. Hauskrecht

Sets - review

A subset of B: A is a subset of B if all elements in A are also in B. Proper subset: A is a proper subset of B, if A is a subset of B and A B A power set: The power set of A is a set of all subsets of A

M. Hauskrecht

Sets - review

Cardinality: The number of elements of in the set An n-tuple An ordered collection of n elements Cartesian product of A and B A set of all pairs such that the first element is in A and the second in B

M. Hauskrecht

Set operations: Union of A and B: Intersection of A and B Difference of A and B Complement of A

M. Hauskrecht

Set identities

Double complement A=A Commutative A B = B A A B = B A Associative A (B C) = (A B) C A (B C) = (A B) C Distributive A (B C) = (A B) (A C) A (B C) = (A B) (A C)

M. Hauskrecht

Set identities

DeMorgan (A B) = A B (A B) = AB Absorbtion Laws A (A B) = A A (A B) = A Complement Laws A A=U A A=

M. Hauskrecht

Set identities

Set identities can be proved using membership tables. List each combination of sets that an element can belong to. Then show that for each such a combination the element either belongs or does not belong to both sets in the identity. Prove: (A B) = A B

_ A 0 0 1 1 _ B 0 1 0 1 ____ AB 0 0 0 1 _ _ A B 0 0 0 1

A 1 1 0 0

B 1 0 1 0

M. Hauskrecht

Definition: The union of a collection of sets is the set that contains those elements that are members of at least one set in the collection.

UA

i =1

= { A1 A2 ... An }

A i = { 1 , 2 ,..., n }

i=1

M. Hauskrecht

Definition: The intersection of a collection of sets is the set that contains those elements that are members of all sets in the collection.

IA

i =1

= { A1 A2 ... An }

Ai = { 1 }

i=1

M. Hauskrecht

Idea: Assign a bit in a bit string to each element in the universal set and set the bit to 1 if the element is present, otherwise use 0 Example: All possible elements: U={1 2 3 4 5} Assume A={2,5} Computer representation: A = 01001 Assume B={1,5} Computer representation: B = 10001

M. Hauskrecht

Example: A = 01001 B = 10001 The union is modeled with a bitwise or A B = 11001 The intersection is modeled with a bitwise and A B = 00001 The complement is modeled with a bitwise negation A =10110

M. Hauskrecht

Functions

M. Hauskrecht

Functions

Definition: Let A and B be two sets. A function from A to B, denoted f : A B , is an assignment of exactly one element of B to each element of A. We write f(a) = b to denote the assignment of b to an element a of A by the function f.

A f: A B B

M. Hauskrecht

Functions

Definition: Let A and B be two sets. A function from A to B, denoted f : A B , is an assignment of exactly one element of B to each element of A. We write f(a) = b to denote the assignment of b to an element a of A by the function f.

A f: A B B

M. Hauskrecht

Representing functions

Representations of functions: 1. Explicitly state the assignments in between elements of the two sets 2. Compactly by a formula. (using standard functions) Example1: Let A = {1,2,3} and B = {a,b,c} Assume f is defined as: 1c 2a 3c Is f a function ?

M. Hauskrecht

Representing functions

Representations of functions: 1. Explicitly state the assignments in between elements of the two sets 2. Compactly by a formula. (using standard functions) Example1: Let A = {1,2,3} and B = {a,b,c} Assume f is defined as: 1c 2a 3c Is f a function ? Yes. since f(1)=c, f(2)=a, f(3)=c. each element of A is assigned an element from B

M. Hauskrecht

Representing functions

Representations of functions: 1. Explicitly state the assignments in between elements of the two sets 2. Compactly by a formula. (using standard functions) Example 2: Let A = {1,2,3} and B = {a,b,c} Assume g is defined as 1c 1b 2a 3c Is g a function? No. g(1) = is assigned both c and b.

M. Hauskrecht

Representing functions

Representations of functions: 1. Explicitly state the assignments in between elements of the two sets 2. Compactly by a formula. (using standard functions) Example 3: A = {0,1,2,3,4,5,6,7,8,9}, B = {0,1,2} Define h: A B as: h(x) = x mod 3. (the result is the remainder after the division by 3) Assignments: 0 0 3 0 1 1 4 1 2 2

M. Hauskrecht

Definitions: Let f be a function from A to B. We say that A is the domain of f and B is the codomain of f. If f(a) = b, we say that b is the image of a and a is a pre-image of b. The range of f is the set of all images of elements of A. Also, if f is a function from A to B, we say f maps A to B. Example: Let A = {1,2,3} and B = {a,b,c} Assume f is defined as: 1 c, 2 a, 3 c What is the image of 1? 1c c is the image of 1 What is the pre-image of a? 2a 2 is a pre-image of a. Domain of f ? {1,2,3} Codomain of f ? {a,b,c} Range of f ? {a,c}

M. Hauskrecht

Image of a subset

Definition: Let f be a function from set A to set B and let S be a subset of A. The image of S is a subset of B that consists of the images of the elements of S. We denote the image of S by f(S), so that f(S) = { f(s) | s S }.

A S f: A B B f(S)

Example: Let A = {1,2,3} and B = {a,b,c} and f: 1 c, 2 a, 3 c Let S = {1,3} then image f(S) = ?

M. Hauskrecht

Image of a subset

Definition: Let f be a function from set A to set B and let S be a subset of A. The image of S is a subset of B that consists of the images of the elements of S. We denote the image of S by f(S), so that f(S) = { f(s) | s S }.

A S f: A B B f(S)

Example: Let A = {1,2,3} and B = {a,b,c} and f: 1 c, 2 a, 3 c Let S = {1,3} then image f(S) = {c}.

M. Hauskrecht

Injective function

Definition: A function f is said to be one-to-one, or injective, if and only if f(x) = f(y) implies x = y for all x, y in the domain of f. A function is said to be an injection if it is one-to-one. Alternative: A function is one-to-one if and only if f(x) f(y), whenever x y. This is the contrapositive of the definition.

A f: A B B

M. Hauskrecht

Injective function

Definition: A function f is said to be one-to-one, or injective, if and only if f(x) = f(y) implies x = y for all x, y in the domain of f. A function is said to be an injection if it is one-to-one. Alternate: A function is one-to-one if and only if f(x) f(y), whenever x y. This is the contrapositive of the definition.

A f: A B B A f: A B B

Not injective

Injective function

M. Hauskrecht

Injective functions

Example 1: Let A = {1,2,3} and B = {a,b,c} Define f as 1c 2a 3c Is f one to one? No, it is not one-to-one since f(1) = f(3) = c, and 1 3. Example 2: Let g : Z Z, where g(x) = 2x - 1. Is g is one-to-one (why?) Yes. Suppose g(a) = g(b), i.e., 2a - 1 = 2b - 1 => 2a = 2b `` => a = b.

M. Hauskrecht

Surjective function

Definition: A function f from A to B is called onto, or surjective, if and only if for every b B there is an element a A such that f(a) = b. Alternative: all co-domain elements are covered

f: A

M. Hauskrecht

Surjective functions

Example 1: Let A = {1,2,3} and B = {a,b,c} Define f as 1c 2a 3c Is f an onto? No. f is not onto, since b B has no pre-image. Example 2: A = {0,1,2,3,4,5,6,7,8,9}, B = {0,1,2} Define h: A B as h(x) = x mod 3. Is h an onto function? Yes. h is onto since a pre-image of 0 is 6, a pre-image of 1 is 4, a pre-image of 2 is 8.

M. Hauskrecht

Bijective functions

Definition: A function f is called a bijection if it is both one-toone and onto.

A f: A B B

M. Hauskrecht

Bijective functions

Example 1: Let A = {1,2,3} and B = {a,b,c} Define f as 1c 2a 3b Is f is a bijection? Yes. It is both one-to-one and onto. Note: Let f be a function from a set A to itself, where A is finite. f is one-to-one if and only if f is onto. This is not true for A an infinite set. Define f : Z Z, where f(z) = 2 * z. f is one-to-one but not onto (3 has no pre-image).

M. Hauskrecht

Bijective functions

Example 2: Define g : W W (whole numbers), where g(n) = [n/2] (floor function). 0 [0/2] = [0] = 0 1 [1/2] = [1/2] = 0 2 [2/2] = [1] = 1 3 [3/2] = [3/2] = 1 ... Is g a bijection? No. g is onto but not 1-1 (g(0) = g(1) = 0 however 0 1.

M. Hauskrecht

- Mcqs Mth301 SolvedUploaded bycs619finalproject.com
- Ncert Math 12Uploaded byRebel Mad
- Linear Algebra New BookUploaded byAnup Saravan
- calculusUploaded byantiv3nom
- linear functions unit lesson plan previewUploaded byapi-270341664
- Examples BijectionsUploaded byAndrei Cristian Nazare
- Holiday Assignment FunctionsUploaded byGaurav Yadav
- Goldrei Classic Set TheoryUploaded byKelvin Koor
- hw1solutionsUploaded byvertigo_0ne8163
- An Instrumental Approach to Mathematics LearningUploaded byapoloc C
- FunctionsUploaded by12u88el
- 116 Problems in Algebra - Functional EquationsUploaded byUrim Hoxha
- A Set Theoretic Algorithm for Real Time Terrain Mapping of Mobile Robots in Outdoor EnvironmentsUploaded byAurel GS
- Graphing Calculator Capabilities for the ExamsUploaded bydebbienw
- FUNCTIONS.pptxUploaded byPrabhakarrao Palingi
- FUNCTIONSUploaded byChandra Sekhar D
- c labUploaded by9897856218
- 2A-NOTES-PERMUTATIONS-COMBINATIONS.pdfUploaded byRaj
- 12 Maths Key Notes Ch 01 Relations and FunctionsUploaded byroyalrajoria4912
- 12 Maths Test Paper Ch1 1Uploaded byurvashbhargavasharma
- Functions 123Uploaded byRavinder Ranga
- foundations-of-algebra-standardsUploaded byapi-291483144
- 6.3 Additional Practice.pdfUploaded byTyler Vanvleet
- UntitledUploaded byJean Pierre Pellet
- 301301_6 - Momento 4Uploaded byCarlos Cediel
- OBBUploaded byAlexis V. Larosa
- TOS-GEN. MATH (1st q)Uploaded byRUBY B. SEBASTIAN
- 18361663 Form4 Add Maths Chapter 1Uploaded bysyieda
- 1-s2.0-S1877042814053749-mainUploaded byAbdul Yazid Nafii
- j 27 Solutions 2Uploaded byAnonymous j6r5KRtrH2

- Fundamental Computer Investigation Guide for WindowsUploaded byrgolfnut1
- Sheriff's Sale No. 2018-13893Uploaded byrgolfnut1
- Defense Acquisition Process Waterfall MethodUploaded byrgolfnut1
- Fundamentals of System Acquisition Mgmt Part2Uploaded byrgolfnut1
- FEMA ICS200_Student ManualUploaded byrgolfnut1
- Forgery and the Handwriting ExpertUploaded byAlsomar86
- DDoS Quick GuideUploaded byElthon Abreu
- Steganographic Embedding Undetectable by JPEG Compatibility Steganalysis Newman etal2002.pdfUploaded byrgolfnut1
- Ecryptfs Enterprise LinuxUploaded byrgolfnut1
- Stat FormulasUploaded byrgolfnut1
- Shavlik Patch User GuideUploaded byrgolfnut1
- RegistryDecoder Offline Analysis Instructions v1.1 (1)Uploaded byrgolfnut1
- Malware detection using OWA measureUploaded byJournal of Computing
- CHAPTER 02 - Linear CodesUploaded byNuruljannah Mohd Mazuki
- Golf Swing Speed Training LogUploaded byrgolfnut1
- Rotator Cuff and AB ExercisesUploaded byrgolfnut1
- Cryptography - Lecture1Uploaded byrgolfnut1
- Orthogonal MatricesUploaded byrgolfnut1
- Louisian Private Investigator LawsUploaded byrgolfnut1
- InstallShield AdminStudio ConfiguringRepackage PHrUploaded byrgolfnut1
- Mold_remediation Instructions Univ South CarolinaUploaded byrgolfnut1
- 09.02.10.HashingPasswords Class.csci4621Uploaded byrgolfnut1
- 09.02.10.BirthdayParadox.CSC4621Uploaded byrgolfnut1
- 9.23.10.Polyinstantiation PDFUploaded byrgolfnut1
- Socket ProgrammingUploaded byanon_112381
- Geologic Conditions Beneath New OrleansUploaded byrgolfnut1
- Absolute Value InequalitiesUploaded byrgolfnut1

- Introduction to networking (CBCN4103).docUploaded byWei
- Quantitative TechniquesUploaded byhfarrukhn
- Green (2008) Toward a Sociology of DesireUploaded byMichael Ruíz
- 05875994Uploaded byUmasankar Chilumuri
- Coa Experimentno.3(Output)Uploaded byGlennNacarGan
- Writing a Design Document for Computer Science 51Uploaded byJeff Pratt
- 297 ethnographic reportUploaded byapi-400554052
- SCI-Arc Viewbook 2014Uploaded byJames Lowder
- Interview With Ken WaltzUploaded byAbhishek Choudhary
- The Merciad, Oct. 30, 1996Uploaded byTheMerciad
- Jurnal_the Impact of Codes of Ethics & Experience on Auditor JudgmentsUploaded byVrisca Libraris Octavania
- The Place of Ultrasonography in Knee Joint OsteoarthritisUploaded bymuhammad arial fikri
- Recreational Fishing is an Important Component of the Tourism Industry and an Important Component of Regionaleconomies Around the WorldUploaded byRaghu Verma
- Correlation Based VMS Placement Resource ProvisionUploaded byAnonymous Gl4IRRjzN
- uch610.pdfUploaded byKidus Belay
- CHAPTER 2-Individual Differences Mental Ability and PersonalityUploaded byDenise Cruz
- Formulating Aims and Objectives From Research QuestionsUploaded byDesiree Joy Alfonso Agoncillo
- Presentation Basic EcIo and EcNoUploaded byJiku
- Difference Between OSI Model and TCPUploaded byAndima Jeff Hardy
- Luminol Post LabUploaded byjoshkty27
- Wc 1 SolutionsUploaded byRodrigoCastellano
- Impression Formation and ManagementUploaded byClazther Mendez
- dr22_enUploaded byHéctor Mendoza Huarcaya
- Heimlich UnheimlicheUploaded byMario Santiago
- EntropyUploaded byDianne Villanueva
- reading.pdfUploaded byShiera Mae Labial Lange
- Final HRM ProjectUploaded byPunit Bhanushali
- LARAVELUploaded byBen Khlifa Tlijani
- Vocabulary of Mechanic -english to persianUploaded byneda
- dynamic system modelingUploaded byDaniel Son