MAT2440 – Ganguli – Spring 2022

Discrete Structures & Algorithms

Page 5 of 11

Class #17 (Mon April 4)

Topics

  • Finish Sec 2.3: Functions (“onto” functions)
  • Start Ch 3 – Algorithms
  • Python code
    • We discussed the function in Sec 2.3, #7(b): “the function that assigns to each positive integer the number of the digits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 that do not appear as decimal digits of the integer.”
    • See here for an implementation of that function in python, using python’s “set” data type.

Announcements/To-do:

  • Hand in HW#3

Class #16 (Wed March 30)

Topics

  • Finish Sec 2.3: Functions
    • definition of one-to-one
  • Quiz #2: proofs

Announcements/To-do:

  • Finish HW#3 – due Mon April 4:
    • Section 1.7 (Proofs): #1, 6, 10, 19(a), 20(a)
    • Section 2.1 (Sets): #1, 8, 29
    • Section 2.2 (Set Operations): #3, 4, 15(a), 16(a), 22(a), 38, 40 [extra credit: #53, 54]
    • Section 2.3 (Functions): #7, 9-12 (for #10 & #12, if given function is not one-to-one, show why!), 30

In class, we discussed the function in Sec 2.3, #7(b): “the function that assigns to each positive integer the number of the digits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 that do not appear as decimal digits of the integer.”

See here for an implementation of that function in python, using python’s “set” data type. We can discuss this code in class on Monday.

« Older posts Newer posts »