Download Properties of numbers

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Mathematics of radio engineering wikipedia , lookup

Elementary arithmetic wikipedia , lookup

Large numbers wikipedia , lookup

Proofs of Fermat's little theorem wikipedia , lookup

Rounding wikipedia , lookup

Factorization wikipedia , lookup

Location arithmetic wikipedia , lookup

Approximations of π wikipedia , lookup

Addition wikipedia , lookup

Continued fraction wikipedia , lookup

Positional notation wikipedia , lookup

Arithmetic wikipedia , lookup

Elementary mathematics wikipedia , lookup

Transcript
BSC(Hons) Computer Science DIS Foundation Year
Mathematics for Computing
Chapter 1
Properties of Numbers
1. Factors
When two or more whole numbers i.e. integers are multiplied together to form a
product, each of them is called a factor of that product.
Example
1. 3 x 6 = 18 so 3 and 6 are factors of 18.
2. 2 x 4 x 3 = 24, so 2, 4 and 3 are factors of 24.
Also note that
2 x 9 = 18
1 x 18 = 18, therefore 1, 2, 9 and 18 are also factors of 18.
Similarly
3 x 8 = 24
2 x 12 = 24
1 x 24 = 24
4 x 6 = 24
therefore 1, 6, 8 , 12 and 24 are also factors of 24.
Any integer has at least two factors namely 1 and itself. Any integer which has
only these factors is called a prime number; the first seven prime numbers are
2, 3 , 5, 7, 11, 13 and 17.
The most complete factorisation of an integer is to write it as the product of prime
factors.
Sometimes a factor is repeated e.g. 300 = 2 x 2 x 3 x 5 x 5
We say that the prime factors are 2, 3 and 5.
Factors can be found by dividing the number starting with the lowest factor and
increasing until it cannot be factorised any more e.g.
2
2
2
3
5
19
2280
1140
570
285
95
19
1
1
Therefore the product of the Prime Factors of 2280 are 2 x 2 x 2 x 3 x 5 x 19 = 2280.
Common Factors and Common Multiples
If two integers have a factor in common then it is a common factor of the two
numbers.
Example
36 has the factors 1, 2, 3, 4, 6, 9, 12, 18, 36
whereas,
60 has the factors 1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30 and 60.
The common factors are 1, 2, 3, 4, 6 and 12.
The highest common factor (HCF) is the largest of these common factors and
in the above example is 12.
If an integer is a multiple of each of two given integers then it is a common
multiple of them e.g. some common multiples of 10 and 15 are 30, 60, 90 120
and 150, the smallest of these i.e. 30 is the lowest common multiple( LCM).
The LCM can be found using prime factors
Example
24 = 2 x 2 x 2 x 3
36 = 2 x 2 x 3 x 3
The most often that 2 appears is three times and 3 appears at most twice, the
LCM is therefore: 2 x 2 x 2 x 3x 3 = 72.
Note that
24 x 3 = 72
36 x 2 = 72
2. Powers and indices
If a number is repeatedly multiplied by itself, this leads to the idea of raising a
number to some power.
The product 2 x 2 x 2 x 2x 2 can be written as 25 .
It can be said that the number 2 has been raised to the power 5.
The number 5 in this case is referred to as the index( plural indices) and 3 is
referred to as the base.
Raising a number to the power of 2 is called squaring and raising a number to
the power 3 is called cubing.
Therefore 25 = 5 x 5 is ‘5 squared’ and 8 = 2 x 2 x 2 is ‘2 cubed’.
Examples
2
1. Any integer raised to the power 1 equals itself.
31 = 3
2. When multiplying two powers of the same base we add the indices.
34 x 32 = 3 x 3 x 3x 3 x 3 x 3 = 36 = 3 4+2
3. When dividing two powers of the same base we subtract the indices.
3x3x3x3
3x3
34  32 =
= 32 = 3 4-2
4. Raising a non-zero integer to the power zero gives the result 1
32  32 = 9  9 = 1 , but 32  32 = 3 2-2 = 30 so 30 = 1
5. The power of a power is achieved by multiplying the indices.
(34)2 = 34 x 34 = 3 4+4 = 38 = 3 4x2 =38
6. Power of a combination
24 x 34 = (2 x 3) 4 = 64
7. Negative powers
34  36 =
we say that
1
32
3x3x3x3
3x3x3x3x3x3
is 3-2
=
1
3x3
=
1
32
( and is the reciprocal of 32)
3. Fractions and Decimals
Fractions
A fractions is the ratio of one integer divide by another, for example
5 2 18
,
,
7 3 7
Note that
2
3
or
2
2
can both be written as 3
3
The upper integer is the numerator and the lower integer is the denominator
sometimes fractions are called rational numbers.
A proper fraction has a numerator less than the denominator e.g. A fraction such as
18
, where the numerator is larger than the denominator, is termed improper or
7
vulgar.
3
18
4
is written as 2
it is called a mixed fraction.
7
7
3
6 12
It should be clear that
,
,
have the same value.
5 10 20
When
They are called equivalent fractions.
This concept is used to perform a simplification known as reduction to lowest
terms.
As an example
42 2 x3x7 2
=
=
105 3x5 x7 5
where we have divided the original fraction top and bottom by the common factor
3 x 7 = 21.
We can proceed no further since 2 and 5 are relatively prime.
We often call the process cancellation since 3 and 7 on the top and bottom have
in effect cancelled themselves out.
Since 42 = 14 x 3 and 105 = 35 x 3, we could write:
42 14
105 35
to cancel 3 top and bottom.
Since 14 = 2 x 7 and 35 = 5 x 7 we write:
14 2
2
 )
(
5
35
5
by cancelling by 7.
Arithmetic with Fractions
The following examples illustrate the basic processes of Addition, Subtraction,
Multiplication and Division of fractions.
To add two fractions with the same denominator we add the numerators and
place the result over the common denominator; a similar result holds for
subtraction.
To add two fractions having different denominators we first find the LCM of these
denominators, then replace each fraction by its equivalent having the LCM as its
denominator.
To multiply two fractions put the product of their numerators as the numerator of
the result and the product of their denominators as the denominator of the
result.
4
To divide one fraction by another, invert the second fraction and multiply.
Examples
1.
1
4
+
2
4
=
2.
1
4
+
2
5
=
3.
4.
5.
6.
3
4
5 +
20
1
4
+
3
10
=
4
5
-
2
3
=
8
20
5 +
20
12
15
6
20
10
15
-
13
20
=
=
11
20
=
2
15
4 2 4 2 8
 

5 3 5  3 15
4
15
5
6
x
=
4x5
15 x 6
=
2x2x5
5x3x2x3
7.
4
15

5
6
=
4
15
x
6
5
8.
2
3

3
4
=
2
3
x
4
3 =
9.
5 -2
5 -6
10.
1
4
1
52
=
+
2
4
5
7

=
=
1
56

3
4

=
2x2x2x3
3x5x5
=
56
1
x
=
1
4
=
=
2
9
8
25
=
8
9
1
52
3
8
19
56
4x6
15 x 5
=
2
3x3
=
3
4
+
x
=
2
4
54 =

1
5 -4
40 56
21
56
56
19
168
76
5
Decimals
Fractions whose denominators are powers of 10 are called Decimal Fractions, or
Decimals for short; they have a special notation.
For example, the fractions
2
31
3
407
21
6
,
,
,
,
,
10 100 100 1000 1000 1000
are written respectively as
0.2, 0.31, 0.03, 0.407, 0.021, 0.006
Note that 0.2 could be written as 0.20, 0.200 etc. but it is not usual to include
these trailing zeros unless there is good reason, e.g. to emphasise the precision
of a result.
Improper fractions can be dealt with similarly, for example:
24357
357
= 24+
= 24.357
1000
1000
Each digit has its special place, the last number above is
2 tens + 4 units + 3 tenths + 5 hundredths + 7 thousandths,
i.e.
2 x 10 + 4 x 1 +
3
5
7
+
+
10 100 1000
These place values are important when carrying out arithmetic calculations.
For example
2.46 + 13.1 = 15.56
12.46 + 0.328 = 12.788
22.46 – 13.1 = 9.36
1.2 x1.3 = 1.56
Multiplying by 10 has the effect of moving the decimal point one place to the
right:
24.357 x 10 = 243.57
Multiplying by 102 (i.e. 100) moves the decimal point two places to the right i.e.
2435.7, and so on.
6
Dividing by 10 moves the decimal point one place to the left, and so on, for
example 24.357  10 = 2.4357
Scientific Notation
In order to cope with very large or very small numbers, it is useful to employ
scientific notation, i.e. to write a number in the form a x 10r where r is the
exponent and a is a number between 1 and 10 which is called the mantissa.
Examples are
243.57 = 2.4357 x 102
0.0024357 = 2.4357 x 10-3
and
Converting between Decimals and Fractions
We can convert decimals to fractions and sometimes vice versa.
To convert a fraction to a decimal, we first replace the fraction by its equivalent
using a denominator that is a power of 10.
Examples
2.31 =
2.25 =
231
100
225 9 X 25
9
=
=
4
100 4 X 25
4
4 2
8
=
=
= 0.8
5
10
5 2
31
31  25
775
=
=
= 0.775
40
40  25
1000
It is not possible to convert some fractions to an exact decimal equivalent. For
example,
1
3
,
2
7 ,
5
9
,
4
11
have no exact equivalent in decimals.
In such cases the decimal form contains a single or a repeated group of digits.
Examples
1
3
.
= 0.33333….=0.3
7
.
1
=
0.11111…=
0.1
9
. .
1
= 0.09090…. =0.09
11
where the dots placed over the digits indicate the sequence to be repeated.
Approximation (Rounding)
We can approximate a decimal by rounding it off.
The number 2.346 is said to contain three decimal places (3 d.p.) or (3D); of the
two nearest numbers with two decimal places, namely 2.34 and 2.35 the latter is
the closer, so 2.346 is rounded off to 2.35 (2 d.p.).
To go one step further, 2.35 lies between 2.3 and 2.4; hence 2.35 is rounded off
to 2.4 (1 d.p.).
The convention is that if the last digit is 5,6,7,8 or 9 we round up, otherwise we
round down.
Approximation (Significant Figures)
The number 2.35 has 3 significant figures (3 s.f.); the number 0.235 has 3
significant figures, 0.0235 also has 3. (=2.35x10-3)
The number 2350.0 has 4 significant figures if we are sure that the number in
question is closer to 2350 than to either 2349 or 2351.
(However, when we say that the distance of the Earth from the Sun is 93 million
miles away we mean that the distance is nearer to 93 million miles than either 92
or 94 million miles, so there are really only two significant figures, namely 9 and
3. )
We can round off a number to a specified significant figure accuracy using the
convention mentioned earlier.
Hence 12.3456 is rounded to
12.346 to 5 s.f.,
to 12.35 to 4 s.f. ,
to 12.3 to 3 s.f. ,
to 12 to 2 s.f.,
to 10 to1 s.f..
Percentages
A percentage is a rational part of a whole where the denominator of the fraction is
equal to 100.
For example if 20 out of 100 eggs are brown then the fraction of brown eggs is
20
or 20 %.
100
8
To find a percentage part of a quantity we multiply the quantity by the percentage
written as a fraction, for example, 24% of 75 is
24
x 75 = 18
100
Additionally, @percentages can also be changed to decimals, for example
15% = 15/100 = 0.15
Errors
When measurements are made there is a limit on their accuracy.
For example, when measuring a length using a ruler graduated in millimetres we
are unable to be more accurate than the nearest 0.5mm.
If a length has a true value of 127.8mm and we measure it as 128 mm the actual
error is (128 - 127.8) mm = 0.2 mm.
In general
actual error = measured value – true value
If the measurement is greater than the true value then the actual error is positive;
if the measurement is smaller than the true value than the actual error is
negative. The fractional error or relative error is found by dividing the actual error
by the true value, if expressed as a percentage then it is called the percentage
error.
0.2
In the example above the fractional error is
and the percentage error is
127.8
 0 .2 

 x100 %
 127.8 
In practice, of course we do not know the true value, we merely estimate it via the
measured value.
When there is uncertainty in a measured quantity it is customary to quote it in the
form measured value  maximum error.
Hence, if we measured a temperature as 100.3 C and we rely on the
thermometer reading to the nearest 0.1 C then we can quote the result as
100.3  0.1 C
The magnitude of the actual error is called the absolute error.
+
In this example the maximum
actual error is  0.1C and the maximum absolute
error is 0.1 C.
END
9