i Faculty of Information and Communication Technology, Kolej Universiti Teknikal Kebangsaan Malaysia,
Karung Berkunci 1200, 75450 Melaka,
Malaysia.
© FTMK, KUTKM 2006
All rights reserved. No part of this publication may be reproduced stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording or otherwise, without either the prior written permission of the publisher.
The programs in this book have been included for their instructional value. They have been tested with care but are not guaranteed for any particular purpose. The author or publisher does not offer any warranties or representations nor does it accept any liabilities with respect to the programs.
STUDENT NAME: MATRIC NUMBER: SEMESTER:
COURSE:
YEAR / SEMESTER SESSION:
MATHEMATICS FOR
Abdul Samad Hasan Basari
Editor
ii
TABLE OF CONTENTS
PAGE
PREFACE 1
TUTORIAL 1: LOGIC, SETS AND FUNCTIONS 2
1.1 Objectives
1.2 Theoretical background 1.3 Examples
1.4 Tutorial questions: Logic, sets and functions 1.5 Quiz: Logic, set and functions
TUTORIAL 2: ALGORITHM AND INTEGERS 34
2.1 Objectives
2.2 Theoretical background 2.3 Examples
2.4 Tutorial questions: Algorithm and Integers 2.5 Quiz: Algorithm and Integers
TUTORIAL 3: MATHEMATICAL REASONING, INDUCTION AND
RECURSION 53
3.1 Objectives
3.2 Theoretical background 3.3 Examples
3.4 Tutorial questions: Mathematical reasoning, induction and recursion
3.5 Quiz: Mathematical reasoning, induction and recursion
TUTORIAL 4: COUNTING 70
4.1 Objectives
4.2 Theoretical background 4.3 Examples
iii
TABLE OF CONTENTS
PAGE
TUTORIAL 5: RELATIONS 87
5.1 Objectives
5.2 Theoretical background 5.3 Examples
5.4 Tutorial questions: Relations 5.5 Quiz: Relations
TUTORIAL 6: GRAPHS 105
6.1 Objectives
6.2 Theoretical background 6.3 Examples
6.4 Tutorial questions: Graphs 6.5 Quiz: Graphs
TUTORIAL 7: TREES 128
7.1 Objectives
7.2 Theoretical background 7.3 Examples
7.4 Quiz: Trees and Boolean Algebra
PREFACE
Overview
This module is intended for half of the course in Mathematics for Computer Science 1. The module includes theoretical background, examples, exercises/tutorials, figures and tables to help the first year student in Faculty of Information and Communication Technology, Kolej Universiti Teknikal Kebangsaan Malaysia, master introductory discrete mathematics.
Approach
This module has been guided by the following principles.
To develop ideas step by step, leading from one idea to the next where possible, and present material in a manner that will be easy to follow for all students.
To use plenty of examples and exercises to reinforce students in understanding discrete mathematics.
Chapter Layout
Each chapter begins with a list of objectives. These include the important concepts to be mastered within the chapter. Extensive self-review questions are included at the end of each chapter for self-study. They provide the student with a chance to build confidence to answer quizes. This module contains 7 chapters i.e. chapter 1: Logic, sets and functions, chapter 2: Algorithm and integers, chapter 3: Mathematical reasoning, induction and recursion, chapter 4: Counting, chapter 5: Relations, Chapter 6: Graphs and Chapter 7: Trees.