# Lecture 1: Introduction

• course overview
• course policies

• start of functions (key terms: function, domain, codomain, image)

• "Discrete" is the opposite of "smooth" or "continuous". The real numbers are continuous, the integers are discrete. Most of the objects of study in computer science (e.g. data structures and algorithms) are discrete; 2800 develops mathematical tools that help analyze them.

• 2800 is the first proof-based mathematics course for many students. You will learn to develop mathematical abstractions, clearly describe them, and prove things about them.

• 2800 covers many of the mathematical tools that are useful in computer science, including functions, relations, combinatorics, probability, finite automata, modular arithmetic, graphs, and formal logic.

## How to succeed in 2800

• Take time after the lecture to reproduce the lecture, starting from a short list of topics that were covered. Unlike

• Try to do the homework on your own before seeking help from colleagues, in office hours, or on Piazza.

• When reading proofs, write them too. The purpose of a proof is to make something obvious; so looking at a proof and saying "yep, that's obvious" doesn't mean that you understand or could reproduce the proof.

## Notation

$$\mathbb{N}$$ is the set of natural numbers, $$\mathbb{N} = \{0, 1, 2, \dots\}$$.

$$\mathbb{R}$$ is the set of real numbers.

$$x \in X$$ means that $$x$$ is an element of the set $$X$$.

## Functions

Definition: A function is an unambiguous rule; for every input there should be an unambiguous output. The domain is the set of inputs. The codomain describes the type of outputs; there may be elements of the codomain that do not have an element of the domain that map to them. The image is the set of outputs that actually have an input mapped to them.

Note: Our definition of function corresponds to MCS's definition of total function.

Note: some books use "range" to mean "codomain", while others use "range" to mean "image". I try to avoid the term "range" to avoid ambiguity.

To specify a function, you must give the domain, codomain, and the rule.

Examples:

• Let $$f : \mathbb{N} → \mathbb{R}$$ be given by $$f(x) = x^2$$. Then $$3.5$$ is in the codomain of $$f$$ but not the domain or the image, $$7$$ is in the domain and the codomain, but not the image, and $$49$$ is in the domain, codomain, and image.