## Mathematics for Computer Scientists

3. antisymmetric: for all x and y in X it follows that if xRy and yRx then ... A relation which is reflexive, symmetric and transitive is called an equivalence ... What is the cardinalty of {{1, 2},{3},1}. 6. Give the domain and the range of each of the following relations. Draw the graph in each case. Download free eBooks at bookboon.
Gareth J. Janacek & Mark Lemmon Close

Mathematics for Computer Scientists

Mathematics for Computer Scientists © 2011 Gareth J. Janacek, Mark Lemmon Close & Ventus Publishing ApS ISBN 978-87-7681-426-7

Mathematics for Computer Scientists

Contents

Contents

Introduction

5

1

Numbers

6

2

The statement calculus and logic

20

3

Mathematical Induction

35

4

Sets

39

5

Counting

49

6

Functions

56

7

Sequences

8

Calculus

9

Algebra: Matrices, Vectors etc.

10

Probability

11

Looking at Data

360° thinking

.

73 83 98 119 146

360° thinking

.

360° thinking

.

Discover the truth at www.deloitte.ca/careers

© Deloitte & Touche LLP and affiliated entities.

Discover the truth at www.deloitte.ca/careers

© Deloitte & Touche LLP and affiliated entities.

© Deloitte & Touche LLP and affiliated entities.

© Deloitte & Touche LLP and affiliated entities.

D

Mathematics for Computer Scientists

Introduction

Introduction The aim of this book is to present some the basic mathematics that is needed by computer scientists. The reader is not expected to be a mathematician and we hope will find what follows useful. Just a word of warning. Unless you are one of the irritating minority mathematics is hard. You cannot just read a mathematics book like a novel. The combination of the compression made by the symbols used and the precision of the argument makes this impossible. It takes time and effort to decipher the mathematics and understand the meaning. It is a little like programming, it takes time to understand a lot of code and you never understand how to write code by just reading a manual - you have to do it! Mathematics is exactly the same, you need to do it.

5

Mathematics for Computer Scientists

Numbers

Chapter 1 Numbers Defendit numerus: There is safety in numbers We begin by talking about numbers. This may seen rather elementary but is does set the scene and introduce a lot of notation. In addition much of what follows is important in computing.

1.0.1

Integers

We begin by assuming you are familiar with the integers 1,2,3,4,. . .,101,102, . . . , n, . . . , 232582657 − 1, . . ., sometime called the whole numbers. These are just the numbers we use for counting. To these integers we add the zero, 0, defined as 0 + any integer n = 0 + n = n + 0 = n Once we have the integers and zero mathematicians create negative integers by defining (−n) as: the number which when added to n gives zero, so n + (−n) = (−n) + n = 0. Eventually we get fed up with writing n+(−n) = 0 and write this as n−n = 0. We have now got the positive and negative integers {. . . , −3, −2, −1, 0, 1, 2, 3, 4, . . .} You are probably used to arithmetic with integers which follows simple rules. To be on the safe side we itemize them, so for integers a and b 1. a + b = b + a 2. a × b = b × a or ab = ba 3. −a × b = −ab 7