Sunteți pe pagina 1din 31

Mathematics for computing

Volume 1
C.A. Whitehead
CO1102

2004

Undergraduate study in
Computing and related programmes

This is an extract from a subject guide for an undergraduate course offered as part of the
University of London International Programmes in Computing. It contains sample material
from Volume 1 of the subject guide plus the table of contents for Volume 2. Materials for these
programmes are developed by academics at Goldsmiths.
For more information, see: www.londoninternational.ac.uk
This guide was prepared for the University of London International Programmes by:
C.A. Whitehead
This is one of a series of subject guides published by the University. We regret that due to pressure of work the author is
unable to enter into any correspondence relating to, or arising from, the guide. If you have any comments on this subject
guide, favourable or unfavourable, please use the form at the back of this guide.

University of London International Programmes


Publications Office
32 Russell Square
London WC1B 5DN
United Kingdom
www.londoninternational.ac.uk

Published by: University of London


© University of London 2004

The University of London asserts copyright over all material in this subject guide except where otherwise indicated. All rights
reserved. No part of this work may be reproduced in any form, or by any means, without permission in writing from the
publisher. We make every effort to respect copyright. If you think we have inadvertently used your copyright material, please
let us know.
Mathematics for computing
Volume 2
P. Heidtmann and B. Jackson
CO1102

2005

Undergraduate study in
Computing and related programmes
This guide was prepared for the University of London International Programmes by:
P. Heidtmann
B. Jackson
This is one of a series of subject guides published by the University. We regret that due to pressure of work the authors are
unable to enter into any correspondence relating to, or arising from, the guide. If you have any comments on this subject
guide, favourable or unfavourable, please use the form at the back of this guide.

University of London International Programmes


Publications Office
32 Russell Square
London WC1B 5DN
United Kingdom
www.londoninternational.ac.uk

Published by: University of London


© University of London 2005

The University of London asserts copyright over all material in this subject guide except where otherwise indicated. All rights
reserved. No part of this work may be reproduced in any form, or by any means, without permission in writing from the
publisher. We make every effort to respect copyright. If you think we have inadvertently used your copyright material, please
let us know.
Contents

Preface iii

1 Digraphs and relations 1


1.1 Digraphs . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Relations . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.2.1 Using digraphs to illustrate relations . . . . . . 5
1.2.2 Equivalence relations . . . . . . . . . . . . . . . 5
1.2.3 Partial orders . . . . . . . . . . . . . . . . . . . 8
1.3 Relations and Cartesian products . . . . . . . . . . . . 9
1.4 Exercises on Chapter 1 . . . . . . . . . . . . . . . . . . 11
1.4.1 True/False questions . . . . . . . . . . . . . . . 11
1.4.2 Longer exercises . . . . . . . . . . . . . . . . . 11

2 Sequences, series and induction 13


2.1 Sequences . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.1.1 Recurrence relations . . . . . . . . . . . . . . . 15
2.1.2 The Fibonacci sequence . . . . . . . . . . . . . 16
2.2 Induction . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.2.1 The Principle of Induction . . . . . . . . . . . . 17
2.2.2 Proof by induction . . . . . . . . . . . . . . . . 18
2.3 Series and the Sigma notation . . . . . . . . . . . . . . 21
2.3.1 Expressing sums in Sigma notation . . . . . . . 22
2.3.2 Some standard series and their sums . . . . . . 24
2.3.3 Rules of arithmetic for sums . . . . . . . . . . . 26
2.4 Exercises on Chapter 2 . . . . . . . . . . . . . . . . . . 28
2.4.1 True/False questions . . . . . . . . . . . . . . . 28
2.4.2 Longer exercises . . . . . . . . . . . . . . . . . 29

3 Trees 31
3.1 Properties of trees . . . . . . . . . . . . . . . . . . . . 31
3.1.1 Recursive construction of all trees . . . . . . . . 34
3.1.2 The number of edges in a tree . . . . . . . . . . 35
3.1.3 Spanning trees . . . . . . . . . . . . . . . . . . 36
3.2 Rooted trees . . . . . . . . . . . . . . . . . . . . . . . . 36
3.2.1 Binary trees . . . . . . . . . . . . . . . . . . . . 38
3.3 Binary search trees . . . . . . . . . . . . . . . . . . . . 39
3.3.1 Subtrees of a binary tree . . . . . . . . . . . . . 40
3.3.2 Storing data in a binary search tree . . . . . . . 41
3.3.3 The height of a binary search tree . . . . . . . . 42
3.3.4 Finding a record in a binary search tree . . . . 44
3.4 Exercises on Chapter 3 . . . . . . . . . . . . . . . . . . 45
3.4.1 True/False questions . . . . . . . . . . . . . . . 45
3.4.2 Longer exercises . . . . . . . . . . . . . . . . . 46

4 Counting methods and probability 49


4.1 The basic counting methods . . . . . . . . . . . . . . . 49
4.1.1 Counting in which order is important . . . . . . 49
4.1.2 Counting in which order is not important . . . 54
4.1.3 Summary of strategies for counting problems . 56
4.2 Counting using sets . . . . . . . . . . . . . . . . . . . . 57
4.3 Probability . . . . . . . . . . . . . . . . . . . . . . . . . 64
4.3.1 Independent events . . . . . . . . . . . . . . . 67

i
CIS102 Mathematics for computing volume 2

4.4 Exercises on Chapter 4 . . . . . . . . . . . . . . . . . . 67


4.4.1 Multiple choice questions . . . . . . . . . . . . 67
4.4.2 Longer exercises . . . . . . . . . . . . . . . . . 70
4.4.3 Further exercises and worked examples . . . . 71

5 Systems of linear equations and matrices 73


5.1 Systems of linear equations . . . . . . . . . . . . . . . 73
5.1.1 Gaussian elimination . . . . . . . . . . . . . . . 78
5.2 Matrix algebra . . . . . . . . . . . . . . . . . . . . . . 80
5.2.1 Addition and subtraction of matrices . . . . . . 80
5.2.2 Multiplication of a matrix by a constant . . . . 81
5.2.3 Multiplication of two matrices . . . . . . . . . . 81
5.2.4 Powers of square matrices . . . . . . . . . . . . 82
5.2.5 Rules of arithmetic for matrices . . . . . . . . . 86
5.2.6 Identity matrices . . . . . . . . . . . . . . . . . 87
5.3 Exercises on Chapter 5 . . . . . . . . . . . . . . . . . . 88
5.3.1 True/False questions . . . . . . . . . . . . . . . 88
5.3.2 Longer exercises . . . . . . . . . . . . . . . . . 88

A Additional references 91

B Solutions to Exercises 93
B.1 Exercises on Chapter 1 . . . . . . . . . . . . . . . . . . 93
B.1.1 Solutions to True/False questions . . . . . . . . 93
B.1.2 Solutions to Longer exercises . . . . . . . . . . 93
B.2 Exercises on Chapter 2 . . . . . . . . . . . . . . . . . . 96
B.2.1 Solutions to True/False questions . . . . . . . . 96
B.2.2 Solutions to Longer exercises . . . . . . . . . . 96
B.3 Exercises on Chapter 3 . . . . . . . . . . . . . . . . . . 99
B.3.1 Solutions to True/False questions . . . . . . . . 99
B.3.2 Solutions to Longer exercises . . . . . . . . . . 99
B.4 Exercises on Chapter 4 . . . . . . . . . . . . . . . . . . 101
B.4.1 Solutions to Multiple Choice questions . . . . . 101
B.4.2 Solutions to Longer exercises . . . . . . . . . . 103
B.5 Exercises on Chapter 5 . . . . . . . . . . . . . . . . . . 105
B.5.1 Solutions to True/False questions . . . . . . . . 105
B.5.2 Solutions to Longer exercises . . . . . . . . . . 106

C Specimen examination questions 109

D Solutions to Specimen examination questions 113

E List of Symbols 119

ii

S-ar putea să vă placă și