Introduction to Permutations

Problem: In how many ways can Anna, Brenda and Connie stand in a single line for picture taking?

Intuitively, we can count the number of ways by listing. We can list randomly as shown below.

Anna, Brenda, Connie

Brenda, Connie, Anna

Connie, Anna, Brenda

and so on.

Q1: Do you think that listing randomly is a good idea? What are its advantages and its disadvantages?

Listing randomly can solve our problem, if there are only a few things, or in our case persons, to be arranged; however, we can do better than that.  Learning mathematics has taught us to be organized, and has taught us to do things systematically.  Besides, if there are many persons to be arranged, it is hard to keep track if we have listed all possible arrangements. For example, what if David joins the group? Try to list randomly and determine how many possible arrangements are there.

Q2: Before proceeding, can you think of a way to come up with an organized way to list all the possible arrangements?

One possible strategy is to list in alphabetical order. Let us represent Anna, Brenda and Connie by the first letter of their names. If we choose A to occupy the leftmost position, then there are two possible choices for the middle position, namely B and C. That means have AB and AC as all possible arrangements if A is chosen to occupy the leftmost position. Now, in each of the cases, we only have one person left to occupy the rightmost position.  This gives as ABC and ACB as all possible arrangements of the three girls if A were to occupy the leftmost position.

We can also use a tree diagram as shown in Figure 1.  If we choose A to be the person in leftmost position, then the branches B and C mean our possible choices for the middle position. If we have chosen a person who will occupy the middle position, then we are left with only one person to occupy the rightmost position.  Hence, if we choose A to occupy the first position, the only possible arrangements for picture taking are ABC and ACB.

Figure 1- The tree diagram of all the possible arrangements of A, B and C.

But we know that we can also choose B or C as the person who will occupy the leftmost position. This means, that there are 3 possible choices for the first position, 2 possible choices  for the second position and 1 possible choice for the third position (see Figure 1). Hence, there are 3 x 2 x 1 possible arrangements for 3 persons in a single line.

We will denote 3 x 2 x 1 as 3! (3 factorial).  This implies that if we say 5!, we mean 5 x 4 x 3 x 2 x 1 = 120.  In general, n! means n(n-1)(n-2)…(3)(2)(1). Note that the ellipsis symbol … denotes that there are numbers in the sequence that are not shown.  For example, 100(99)(98)…(3)(2)(1), means the product of all integers from 100 all the way down to 1.

Q3: If David joins the group, how many possible arrangements are there?

You may want to solve this problem first before proceeding.

Figure 2 – The tree diagram of all possible arrangments of A, B, C and D.

Looking at the tree diagram, there are four possible choices to occupy the leftmost position, 3 possible choices to occupy the second position, 2 possible choices to occupy  the third position and 1 possible choice to occupy the rightmost position.  Hence there are 4! = 4 x 3 x 2 x 1 = 24 possible arrangements.

By now, you would have realized that the number of arrangements or the number of permutations of n persons on a single line for picture taking is n!. We will denote it as P(n,n) orthe permutations of n objects taken n at a time. We sayn objects taken n at a time because we have the choice to choose numbers less than n to be arranged.  For example, we can choose A and C from A, B, C and D .  This means that we a permutation of 4 objects taken 2 at a time. In general, we describe this type of permutation as permutations of n objects taken k at a time and write P(n,k).

Let us see what happens to our computation with P(4,2). Since there are 4 possible choices for the first choice, and 3 choices for the second position, therefore, there are 4 x 3 possible permutations.  This is the same as removing the smallest two factors by division. If we do this, we come up with the following computation:

If we list the elements of P(4,2), we have the following: AB, BA, AC, CA, AD, DA, BC, CB, BD, DB, CD, and DC. Indeed, we have 12 possible arrangements.

With our findings above, let us try to perform a few more computations and see if we can find a pattern.

Therefore, by looking at the pattern, we can conclude that the number of permutations of n things taken k at a time described by the formula

You may want to read  Introduction to Combinations, the continuation of this post.

Latex Tutorial: How to embed Latex in blogs and forums

What is Latex really?

Latex is a typesetting program which is now considered as a standard in mathematical writing.  It works just like MathType and Equation Editor, but has a lot more functionalities.  Equation Editor is just part of a word processor, but Latex is capable of creating an entire document, and mostly in pdf, dvi or postscript format. The other advantages of Latex are discussed by Robert Talbert in his blog Five reasons you should use latex and five tips for teaching it.  Openwetware.org also discusses the advantages of Latex over Microsoft Word.

Latex, however, is quite different because you have to code the  mathematical expressions and equations instead of writing them.

If you can see web pages with complicated equations or expressions, then it has to be Latex because most web pages do not support writing of mathematical expressions like word processors.

With Latex, equations like

x = \displaystyle\frac{-b \pm \sqrt{b^2 - 4ac}}{2a}

can be easily written in web pages and blogs. In fact, the quadratic formula  you see above is coded with Latex. To see the code, place the mouse pointer on the code and let it rest for about two seconds.

If you are familiar with HTML, it works just like it: its code is different from its output. If you want to write a fraction, for instance, the source code you have to type is \frac{a}{b} where a is the numerator and b is the denominator. This means, that if you want to write \frac{1}{2}, then you have to write \frac{1}{2}. Several examples of Latex source codes and their outputs are shown below. Do not be intimidated with the codes because in the next tutorial, I am going to discuss them slowly and step-by-step.

Latex Source Code Output
\sqrt{x} = 5 \sqrt{x} = 5
A = \frac{(b_1 + b_2)h}{2} A =\displaystyle \frac{(b_1 + b_2)h}{2}
c^2 = a^2 + b^2 c^2 = a^2 + b^2
d = \sqrt{(y_2 – y_1)^2 + (x_2-x_1)^2} d = \sqrt{(y_2 - y_1)^2 + (x_2-x_1)^2}
x = \frac{-b \pm \sqrt{b^2 – 4ac}}{2a} x =\displaystyle\frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
1 + 2 + 3 + \ldots + n = \sum_{i=1}^{n} i = \frac{n(n+1)}{2} 1 + 2 + 3 + \ldots + n = \sum_{i=1}^{n} i = \displaystyle\frac{n(n+1)}{2}
Embedding Latex in Blogs, Forums and Web Pages

Latex  can be embedded in web pages, forums and blogs.  Note that not all forums or blogs are capable of embedding Latex, so you have to know if your service provider is compatible with Latex.   For instance, the Art of Problem Solving forum supports Latex while Ask Dr. Math does not.

Most forums or blogs let you embed Latex by placing dollar signs on both sides of the Latex code as shown below.  Suppose you want to write the following sentence:

For any triangle with side lengths a,b and hypotenuse c, then c^2 = a^2 + b^2.

If you are in Art of Problem Solving Forum, then you have to write it in the following format:

For any right triangle with side $a, b$ and hypotenuse $c$, then $c^2 = a^2 + b^2$.

Red-colored texts shown above are Latex codes.

Also, not all blogs or forums follow the same format. WordPress, for example, places the word latex after the first dollar sign before typing the code, and Moodle places two dollar signs at each side of the latex code. Notice below that the format of embedding changes depending on the service provider or website, but the latex code is always the same.

WordPress Code

For any right triangle with side $latex a, b$ and hypotenuse , then $latex c^2 = a^2 + b^2$.

Moodle Code

For any right triangle with side $$a, b$$ and hypotenuse $$c$$, then $$c^2 = a^2 + b^2$$.

In my next Latex blog, we will learn the basics of coding Latex.

Can we Graph Inequalities in GeoGebra?

Update (Oct 2, 2010): The GeoGebra 4.0 version can now graph linear inequalities. Click here to read about it.

I wrote this because there are a lot of searches in my Blog Stat searching how to graph inequalities in GeoGebra. UNFORTUNATELY, GeoGebra is still working on this feature. I emailed Markus Hohenwarter, the creator and lead programmer of GeoGebra, two years ago requesting for this feature but he told me that he was still working on more important features.

There are, however, GeoGebra users who found a way to improvise. Some of the links are shown below.

http://www.geogebra.org/en/upload/files/english/Daniel_A_Kaufmann/Inequalities.htm

http://www.geogebra.org/en/upload/files/english/dtravis/sys_of_line_inequalities.html

http://www.geogebra.org/en/upload/files/italian/remigio/diseq/diseq.html

If you are just looking for a software that can graph inequalities, you can try  Graph Calculator 3D which has a free edition. The screen shot of graphs of systems of inequalities is shown below.

Notice, that graphing inequalities in this software is very easy. First, you just have to type the equations or inequalities (upper left of the diagram), then choose the graph attributes (middle left of the diagram). You can also choose 3-dimensional graphs.

I will have a separate tutorial post on how to use the Graph Calculator 3D  soon.

1 397 398 399 400 401 405