DM Lecture 6.pdf - DISCRETE STRUCTURES COURSE I NSTRUCTOR MUHAMMAD SAIF UL I S LAM Course Outline Logic and Proofs(Chapter 1 Sets and Functions(Chapter

DM Lecture 6.pdf - DISCRETE STRUCTURES COURSE I NSTRUCTOR...

This preview shows page 1 - 10 out of 35 pages.

DISCRETE STRUCTURES COURSE INSTRUCTOR: MUHAMMAD SAIF UL ISLAM
Image of page 1

Subscribe to view the full document.

Course Outline Logic and Proofs (Chapter 1) Sets and Functions (Chapter 2) Relations Number Theory © Saif ul Islam - 2017 Combinatorics and Recurrence Graphs Trees Discrete Probability FAST NUCES – DISCRETE STRUCTURES 2
Image of page 2
Lecture Outline Definition of a Function. o Domain, Cdomain o Image, Preimage Injection, Surjection, Bijection © Saif ul Islam - 2017 Inverse Function Function Composition Graphing Functions Floor, Ceiling, Factorial Partial Functions (optional) FAST NUCES – DISCRETE STRUCTURES 3
Image of page 3

Subscribe to view the full document.

Functions Definition : Let A and B be nonempty sets. A function f from A to B , denoted f : A B is an assignment of each element of A to exactly one element of B . We write f ( a ) = b if b is the unique element of B assigned by the function f to the element a of A . Functions are sometimes called mappings or transformations . © Saif ul Islam - 2017 FAST NUCES – DISCRETE STRUCTURES 4
Image of page 4
Functions Let G be the function that assigns a grade to a student in our discrete mathematics class. The domain of G is the set X= {Adams, Chou, Goodfriend, Rodriguez, Stevens} The codomain of G is the set Y= { A, B, C, D, F } The range of G is the set { A, B,C, F } © Saif ul Islam - 2017 X Y G (Adams) = A G (Stevens) = F FAST NUCES – DISCRETE STRUCTURES 5
Image of page 5

Subscribe to view the full document.

Functions Given a function f : A B : We say f maps A to B or f is a mapping from A to B . A is called the domain of f . B is called the co-domain of f . © Saif ul Islam - 2017 If f ( a ) = b , then b is called the image of a under f . a is called the pre-image of b. The range of f is the set of all images of points in A under f . We denote it by f ( A ). Two functions are equal when they have the same domain, the same co-domain and map each element of the domain to the same element of the co-domain. FAST NUCES – DISCRETE STRUCTURES 6
Image of page 6
Functions © Saif ul Islam - 2017 FAST NUCES – DISCRETE STRUCTURES 7
Image of page 7

Subscribe to view the full document.

Functions © Saif ul Islam - 2017 FAST NUCES – DISCRETE STRUCTURES 8
Image of page 8
Representing Functions Functions may be specified in different ways: An explicit statement of the assignment. o Students and grades example. A formula. © Saif ul Islam - 2017 o f ( x ) = x + 1 A computer program. o A Java program that when given an integer n , produces the n th Fibonacci Number (covered in the next section and also in Chapter 5 ).
Image of page 9

Subscribe to view the full document.

Image of page 10
  • Fall '19

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Ask Expert Tutors You can ask You can ask ( soon) You can ask (will expire )
Answers in as fast as 15 minutes