Thursday, July 21, 2016

Indices

Indices & the Law of Indices

Introduction

Indices are a useful way of more simply expressing large numbers. They also present us with many useful properties for manipulating them using what are called the Law of Indices.

What are Indices?

The expression 25 is defined as follows:
We call "2" the base and "5" the index.

Law of Indices

To manipulate expressions, we can consider using the Law of Indices. These laws only apply to expressions with the same base, for example, 34 and 32 can be manipulated using the Law of Indices, but we cannot use the Law of Indices to manipulate the expressions 35 and 57 as their base differs (their bases are 3 and 5, respectively).

Six rules of the Law of Indices

Rule 1:
Any number, except 0, whose index is 0 is always equal to 1, regardless of the value of the base.
An Example:
Simplify 20:
Rule 2: 
An Example:
Simplify 2-2:
Rule 3:
To multiply expressions with the same base, copy the base and add the indices.
An Example:
Simplify : (note: 5 = 51)
Rule 4:
To divide expressions with the same base, copy the base and subtract the indices.
An Example:
Simplify :
Rule 5:
To raise an expression to the nth index, copy the base and multiply the indices.
An Example:
Simplify (y2)6:
Rule 6: 
An Example:
Simplify 1252/3:

Sunday, July 17, 2016

Probability

Probability

How likely something is to happen.
Many events can't be predicted with total certainty. The best we can say is how likely they are to happen, using the idea of probability.
 

Tossing a Coin 

When a coin is tossed, there are two possible outcomes:
  • heads (H) or
  • tails (T)
We say that the probability of the coin landing H is ½.
And the probability of the coin landing T is ½.
pair of dice  

Throwing Dice 

When a single die is thrown, there are six possible outcomes: 1, 2, 3, 4, 5, 6.
The probability of any one of them is 1/6.

Probability 

In general:
Probability of an event happening = Number of ways it can happen Total number of outcomes

Example: the chances of rolling a "4" with a die

Number of ways it can happen: 1 (there is only 1 face with a "4" on it)
Total number of outcomes: 6 (there are 6 faces altogether)
So the probability = 1 6

Example: there are 5 marbles in a bag: 4 are blue, and 1 is red. What is the probability that a blue marble gets picked?

Number of ways it can happen: 4 (there are 4 blues)
Total number of outcomes: 5 (there are 5 marbles in total)
So the probability = 4 5 = 0.8

Probability Line

Probability is always between 0 and 1

Probability is Just a Guide

Probability does not tell us exactly what will happen, it is just a guide

Example: toss a coin 100 times, how many Heads will come up?

Probability says that heads have a ½ chance, so we can expect 50 Heads.
But when we actually try it we might get 48 heads, or 55 heads ... or anything really, but in most cases it will be a number near 50.

Words

Some words have special meaning in Probability:
Experiment or Trial: an action where the result is uncertain.
Tossing a coin, throwing dice, seeing what pizza people choose are all examples of experiments.
Sample Space: all the possible outcomes of an experiment

Example: choosing a card from a deck

There are 52 cards in a deck (not including Jokers)
So the Sample Space is all 52 possible cards: {Ace of Hearts, 2 of Hearts, etc... }
The Sample Space is made up of Sample Points:
Sample Point: just one of the possible outcomes

Example: Deck of Cards

  • the 5 of Clubs is a sample point
  • the King of Hearts is a sample point
"King" is not a sample point. As there are 4 Kings that is 4 different sample points.

Event: a single result of an experiment

Example Events:

  • Getting a Tail when tossing a coin is an event
  • Rolling a "5" is an event.
An event can include one or more possible outcomes:
  • Choosing a "King" from a deck of cards (any of the 4 Kings) is an event
  • Rolling an "even number" (2, 4 or 6) is also an event

  The Sample Space is all possible outcomes.
A Sample Point is just one possible outcome.
And an Event can be one or more of the possible outcomes.

Hey, let's use those words, so you get used to them:
pair of dice

Example: Alex wants to see how many times a "double" comes up when throwing 2 dice.

Each time Alex throws the 2 dice is an Experiment.
It is an Experiment because the result is uncertain.

The Event Alex is looking for is a "double", where both dice have the same number. It is made up of these 6 Sample Points:
{1,1} {2,2} {3,3} {4,4} {5,5} and {6,6}

The Sample Space is all possible outcomes (36 Sample Points):
{1,1} {1,2} {1,3} {1,4} ... {6,3} {6,4} {6,5} {6,6}

These are Alex's Results:
Experiment Is it a Double?
{3,4} No
{5,1} No
{2,2} Yes
{6,3} No
... ...

After 100 Experiments, Alex has 19 "double" Events ... is that close to what you would expect?

Logarithm

Introduction to Logarithms

In its simplest form, a logarithm answers the question:
How many of one number do we multiply to get another number?
Example: How many 2s do we multiply to get 8?
Answer: 2 × 2 × 2 = 8, so we needed to multiply 3 of the 2s to get 8
So the logarithm is 3

How to Write it

We write "the number of 2s we need to multiply to get 8 is 3" as:
log2(8) = 3

So these two things are the same:
logarithm concept
The number we are multiplying is called the "base", so we can say:
  • "the logarithm of 8 with base 2 is 3"
  • or "log base 2 of 8 is 3"
  • or "the base-2 log of 8 is 3"

Notice we are dealing with three numbers:

  • the base: the number we are multiplying (a "2" in the example above)
  • how many times to use it in a multiplication (3 times, which is the logarithm)
  • The number we want to get (an "8")

More Examples

Example: What is log5(625) ... ?

We are asking "how many 5s need to be multiplied together to get 625?"
5 × 5 × 5 × 5 = 625, so we need 4 of the 5s
Answer: log5(625) = 4

Example: What is log2(64) ... ?

We are asking "how many 2s need to be multiplied together to get 64?"
2 × 2 × 2 × 2 × 2 × 2 = 64, so we need 6 of the 2s
Answer: log2(64) = 6

Exponents

Exponents and Logarithms are related, let's find out how ...
2 cubed The exponent says how many times to use the number in a multiplication.
In this example: 23 = 2 × 2 × 2 = 8
(2 is used 3 times in a multiplication to get 8)
So a logarithm answers a question like this:
Logarithm Question
In this way:
The logarithm tells us what the exponent is!
In that example the "base" is 2 and the "exponent" is 3:
logarithm concept
So the logarithm answers the question:
What exponent do we need
(for one number to become another number)
?
The general case is:
Example: What is log10(100) ... ?
102 = 100
So an exponent of 2 is needed to make 10 into 100, and:
log10(100) = 2
Example: What is log3(81) ... ?
34 = 81
So an exponent of 4 is needed to make 3 into 81, and:
log3(81) = 4

Common Logarithms: Base 10

Sometimes a logarithm is written without a base, like this:
log(100)
This usually means that the base is really 10.
log
It is called a "common logarithm". Engineers love to use it.
On a calculator it is the "log" button.
It is how many times we need to use 10 in a multiplication, to get our desired number.
Example: log(1000) = log10(1000) = 3

Natural Logarithms: Base "e"

Another base that is often used is e (Euler's Number) which is about 2.71828.
ln
This is called a "natural logarithm". Mathematicians use this one a lot.
On a calculator it is the "ln" button.
It is how many times we need to use "e" in a multiplication, to get our desired number.
Example: ln(7.389) = loge(7.389) ≈ 2
Because 2.718282 ≈ 7.389

But Sometimes There Is Confusion ... !

Mathematicians use "log" (instead of "ln") to mean the natural logarithm. This can lead to confusion:
Example Engineer Thinks Mathematician Thinks
log(50) log10(50) loge(50) confusion
ln(50) loge(50) loge(50) no confusion
log10(50) log10(50) log10(50) no confusion
So, be careful when you read "log" that you know what base they mean!

Logarithms Can Have Decimals

All of our examples have used whole number logarithms (like 2 or 3), but logarithms can have decimal values like 2.5, or 6.081, etc.
Example: what is log10(26) ... ?
log Get your calculator, type in 26 and press log
Answer is: 1.41497...
The logarithm is saying that 101.41497... = 26
(10 with an exponent of 1.41497... equals 26)
This is what it looks like on a graph:
See how nice and smooth the line is.

Negative Logarithms

Negative? But logarithms deal with multiplying.
What could be the opposite of multiplying? Dividing!

A negative logarithm means how many times to divide by the number.
We could have just one divide:
Example: What is log8(0.125) ... ?
Well, 1 ÷ 8 = 0.125,
So log8(0.125) = −1
Or many divides:
Example: What is log5(0.008) ... ?
1 ÷ 5 ÷ 5 ÷ 5 = 5−3,
So log5(0.008) = −3

It All Makes Sense

Multiplying and Dividing are all part of the same simple pattern.
Let us look at some Base-10 logarithms as an example:
Number How Many 10s Base-10 Logarithm
larger-smaller .. etc..
1000 1 × 10 × 10 × 10 log10(1000) = 3
100 1 × 10 × 10 log10(100) = 2
10 1 × 10 log10(10) = 1
1 1 log10(1) = 0
0.1 1 ÷ 10 log10(0.1) = −1
0.01 1 ÷ 10 ÷ 10 log10(0.01) = −2
0.001 1 ÷ 10 ÷ 10 ÷ 10 log10(0.001) = −3
.. etc..
Looking at that table, see how positive, zero or negative logarithms are really part of the same (fairly simple) pattern.

Number Pattern

Arithmetic Sequences

An Arithmetic Sequence is made by adding the same value each time.

Example:

1, 4, 7, 10, 13, 16, 19, 22, 25, ...
This sequence has a difference of 3 between each number.
The pattern is continued by adding 3 to the last number each time, like this:

Example:

3, 8, 13, 18, 23, 28, 33, 38, ...
This sequence has a difference of 5 between each number.
The pattern is continued by adding 5 to the last number each time, like this:
The value added each time is called the "common difference"
What is the common difference in this example?
19, 27, 35, 43, ...

Answer: The common difference is 8
The common difference could also be negative:

Example:

25, 23, 21, 19, 17, 15, ...
This common difference is −2
The pattern is continued by subtracting 2 each time, like this:

Geometric Sequences

A Geometric Sequence is made by multiplying by the same value each time.

Example:

1, 3, 9, 27, 81, 243, ...
This sequence has a factor of 3 between each number.
The pattern is continued by multiplying by 3 each time, like this:
What we multiply by each time is called the "common ratio".
In the previous example the common ratio was 3:
We can start with any number:

Example: Common Ratio of 3, But Starting at 2

2, 6, 18, 54, 162, 486, ...
This sequence also has a common ratio of 3, but it starts with 2.

Example:

1, 2, 4, 8, 16, 32, 64, 128, 256, ...
This sequence starts at 1 and has a common ratio of 2.
The pattern is continued by multiplying by 2 each time, like this:
The common ratio can be less than 1:

Example:

10, 5, 2.5, 1.25, 0.625, 0.3125, ...
This sequence starts at 10 and has a common ratio of 0.5 (a half).
The pattern is continued by multiplying by 0.5 each time.
But the common ratio can't be 0, as we would get a sequence like 1, 0, 0, 0, ...

Special Sequences

Triangular Numbers

1, 3, 6, 10, 15, 21, 28, 36, 45, ...
This Triangular Number Sequence is generated from a pattern of dots which form a triangle.
By adding another row of dots and counting all the dots we can find the next number of the sequence:

triangular numbers

Square Numbers

0, 1, 4, 9, 16, 25, 36, 49, 64, 81, ...
They are the square of whole numbers:
0 (=0×0)
1 (=1×1)
4 (=2×2)
9 (=3×3)
16 (=4×4)
etc...

Cube Numbers

1, 8, 27, 64, 125, 216, 343, 512, 729, ...
They are the cube of the counting numbers (they start at 1):
1 (=1×1×1)
8 (=2×2×2)
27 (=3×3×3)
64 (=4×4×4)
etc...

Fibonacci Numbers

0, 1, 1, 2, 3, 5, 8, 13, 21, 34, ...
The Fibonacci Sequence is found by adding the two numbers before it together.
The 2 is found by adding the two numbers before it (1+1)
The 21 is found by adding the two numbers before it (8+13)
The next number in the sequence above would be 55 (21+34)

Wednesday, June 15, 2016

Combination And Permutation

Combination And Permutation

Permutations are for lists (order matters) and combinations are for groups (order doesn’t matter).

Combinations are easy going. Order doesn’t matter. You can mix it up and it looks the same. Let’s say I’m a cheapskate and can’t afford separate Gold, Silver and Bronze medals. In fact, I can only afford empty tin cans.

How many ways can I give 3 tin cans to 8 people?
Well, in this case, the order we pick people doesn’t matter. If I give a can to Ali, Abu and then Ahmad, it’s the same as giving to Ahmad, Ali and then Abu. Either way, they’re equally disappointed.

This raises an interesting point — we’ve got some redundancies here. Ali Abu Ahmad = Ahmad Abu Ali. Let’s just figure out how many ways we can rearrange 3 people.
Well, we have 3 choices for the first person, 2 for the second, and only 1 for the last. So we have 3 · 2 · 1 ways to re-arrange 3 people.

So, if we have 3 tin cans to give away, there are 3, or 6 variations for every choice we pick. If we want to figure out how many combinations we have, we just create all the permutations and divide by all the redundancies. In our case, we get 336 permutations (from above), and we divide by the 6 redundancies for each permutation and get 336/6 = 56.

For example:
Here’s a few examples of combinations from permutations:- 
  • Combination: Picking a team of 3 people from a group of 10. C(10,3) = 10!/(7! · 3!) = 10 · 9 · 8 / (3 · 2 · 1) = 120.
    Permutation: Picking a President, VP and Waterboy from a group of 10. P(10,3) = 10!/7! = 10 · 9 · 8 = 720.
  • Combination: Choosing 3 desserts from a menu of 10. C(10,3) = 120.
    Permutation: Listing your 3 favorite desserts, in order, from a menu of 10. P(10,3) = 720.

Introducing Mathematics for Diploma IT

Hello everyone,

This blog is specially designed and built for the purpose of mathematics Assignment and also to help me understand mathematics more. Feel free to post any comments or feedback on my posts. Thank you.