Monday, April 21

Transition Matrices

These are, like, some of my favorite things in matrices, and maybe in math itself. Pay attention, yo! This is actually really useful for weather predictions, customer loyalty, and so many other things that it will blow your MIND OFF.

If you don't know yet, matrices are basically tables of data that math people use to perform operations. Happy Easter!
~~~~~~

1) Somewhere over the rainbow, there's a place with really weird weather. Let's say that:
9 rainy days out of 10 are followed by non-rainy days.
3 non-rainy days out of 10 are followed by rainy days.
By that logic, what's the chance that any particular day will be rainy?

If we try to do it the hard way, we have to use the probabilities as a result of what the previous day is and therefore the day before that, and therefore the day before THAT, and on and on until we get lost in the past and we can't really be happy anymore. But the sequence HAS to converge somewhere! I think we both can figure out right now it's possible, and I wouldn't give you a trick question about this anyway.
Speaking of the past, you're feeling slightly nostalgic for high-school math classes. One topic seems to shout out at you in particular: network matrices. You remember that you can organize a huge network of different pathways using a single matrix, with each datum representing a number of pathways from one point to another.
Being a good little nostalgic person, you decide to do this for yourself.
So there you have it. You've managed to be a clean freak. What do we do now?
Let's say we know what the weather is today. Then we also know the weather probabilities tomorrow. And, by reapplying the probability matrix again, we can figure out the day after that! The matrix squared is:
0.76   0.24
0.72   0.28
So that's the probabilities for the day after tomorrow. We can do this again and again, so where does it converge?
[M]^30=
0.75   0.25
0.75   0.25
In this case, we can assume that 30 is an artificial infinity. Referring to this new matrix, we see that after "infinity," there is a 1/4 chance of sun. Since infinity can technically count as any random day, as any operation performed on infinity is nullified, we see that the chance that any random day will be rainy is exactly 1/4. Finally!

The cool thing about these transition matrices is that you can apply them to other data.

2) Two competing fast-food chains, O'Donald's and Hamburger Queen, have respective customer loyalties of 70% and 60%. If, when they open (at the same time), 80% of all customers go to Burger King, how many of the customers will go to O'Donalds after two trips?
So about 2/3 of the customers are going to O-Dees after two trips.

This repetition of matrices to find data is called a Markov Chain. Markov Chains are statistic models whose event probabilities are based on the previous event.

The matrix [(0.75, 0.25) (0.75, 0.25)] from the first problem is called a steady-state matrix, because it is the convergence of the transition matrix and cannot be altered further by the transition matrix.

Transition matrices and network matrices are used in a LOT of things: communication, business, competitions, ecology, psychology, transportation, and even biology. 

~~~~~~~~

Crazy, right? I hope you like this as much as I do.

Stay coolio
John

Wednesday, April 9

Infinite Series (and Sequences) (cont.) (see first post) (parentheses)

When nobody knew anything about my blog except for my friend and some German Menschen (some of my first internet traffic came via Germany, strangely enough), I had a post about infinite serieses*. I found something interesting that my math teacher recommended I put in here, and as that topic was infinite sequences, I decided to put it in here.

Here is one of the problems:
Let's make a house of cards!
Write a formula for the sequence representing the number of cards at each stage.
First method is to make a chart.
Stage-     1      2      3      4...
Cards-    2      7     15    26...
                 +5    +8   +11
Each stage increases by 3 more than the last increase. Now I'm sure there's an algebraic way to solve it from there, but my method is much more interesting.
Look at the direction that the cards face-- I marked them with lines. What's the sequence that the directions make?
Stage-   1    2    3    4
Dir 1-   1    3    6    10
Dir 2-   1    3    6    10
Dir 3-   0    1    3     6
We know those sequences! Those are triangular numbers, denoted by (y=n(n+1)/2). Because one is offset to the left, we modify the formula a bit to (y=n(n-1)/2). By definition, we can add these three formulas together to get:
y=n(3n+1)/2


Another thing we thought about in class were divergent sequences with really weird sums. For example, 1+2+3+4... is equal to -1/12, while 1+2+4+8... is equal to -1. Here's why:
For the first, imagine three sequences:
S1=1-1+1-1+1-1+1...
S2=1-2+3-4+5-6...
S=1+2+3+4+5...
Unfortunately, S1 orbits on the period of 1 and 0. So we have to use other methods. Watch this:
S1 + S1 =   1 - 1 + 1 - 1 + 1 - 1 ....
                      + 1 - 1 + 1 - 1 + 1
              =   1 + 0 + 0 + 0 + 0 + 0... = 1
So two times S1 is one, so S1 is 0.5.
And then, there's S2.
S2 + S2 =   1 - 2 + 3 - 4 + 5 - 6 + 7 ...
                      + 1 - 2 + 3 - 4 + 5 - 6 ...
              =   1 - 1 + 1 - 1 + 1 - 1 ...
Thereby establishing that S2 is 0.25.
Then watch this!
S - S2 =   1 + 2 + 3 + 4 + 5 + 6 + 7 ...
               -1 + 2 - 3  + 4 -  5 + 6 -  7
           = 4 + 8 + 12 + 16 + 20 + 24 + 28 ...
which is 4 times S. We end with:
S - 0.25 = 4S
S = -1/12
Wow! Amazing! Literally impossible!
There's probably some reason that it's not true, but who cares? It's just time to marvel at the effects of calculus on algebra!

The next one on the list (that my friend learned from a high school teacher) is
S = 1 + 2 + 4 + 8 + 16 + 32 + 64
And so we use the same method, in theory.
S - S = 1 + 2 + 4 + 8 + 16 + 32 + 64 ...
                - 1 -  2  - 4  -  8  -  16  - 32..
         = 1 + 1 + 2 + 4 + 8 + 16 + 32...
And so
S - S = S + 1
S = -1

Another impossible sum! If any people disagree they will be ridiculed forever! I'm kidding- just give me a reason that I understand.

Stay coolio,
John

PS.: This post took FOREVER

Friday, April 4

GAME THEORY

I was looking through a Barnes and Noble science section for a book on quantum theory (DON'T JUDGE), and I found a book entitled "Game Theory". I began to look through it and found it to be very interesting. Although I didn't find a good (and easy to understand) book on QT, I almost got the Game Theory.

In game theory, only two things define a game-
-there are two or more players...
-who interact to maximize a 'Utility'.

In games, Utility are the 'points'-- or, if no points, a numerical representation of the situation they're in. Usually it's an estimate.

Let's give an example.
There are two prisoners A and B. Together, they committed a crime for which they could get 10 years in prison. However, they are each offered a deal in which they can confess and testify against their partner (defect) or refuse to admit it (refuses). This is the deal to both of them:
a) If you defect and your friend refuses, you escape free and your friend gets 20 years.
b) If you both defect, you both get 5 years.
c) If you both refuse, you get 10 years.

Let's analyze!
If your friend will defect, your best option is to defect too, because it reduces your sentence by 15 years. However, if your friend will likely refuse, you should defect, as it will reduce your sentence by 10 years. Your best option is to defect, because the average between your possible sentences will reduce by 7.5 years than if you refuse. Think of it this way-
This is called a matrix, if you don't know. But I'm assuming that you do.

We could also plot it on a tree.
An interesting property of the PD is that the players technically do not interact-- it's what they do when they don't interact that makes it an interesting game.

There's a concept called Nash Equilibrium that's relatively important to game theory. From what I can tell, it's a situation where no players want to change their strategy. In a way, it means that they won't gain anything by changing their strategy.
A NE in Prisoner's Dilemma is, let's say, both players choose to defect. If either player decides to change their strategy, they'll lose.

There's also another game called Morra that you may have played. This is an interesting game that is played like rock-paper-scissors.
In Morra, only two players compete. So, on the count of whatever, each player holds up a number on their fingers from one to ten. If the sum of their numbers is even, one player wins; and vice versa.
Here's a chart I created-
Notice that the number they pick doesn't matter-– only if it's even or odd does.The odd player should do the opposite of the even player, but the even player should do the same as the odd. There is no real 'better strategy', unless you somehow read your opponent's mind, or predict the future.

Anyway, I guess that's it! There are tons of other good games-- Rock Paper Scissors, Nim, 2/3 the Average, and Fair Division (Cake Cutting). You acan look at them if you want.

Stay coolio, John

*PS: Sorry if this was a bad post-- Game Theory is extremely general*

Friday, March 28

Orbits!

OK, this is a really interesting post for me. Just stick with it, OK?

In math, there are two types of orbits:
1) An elliptical path traced by an object due to gravitational pull towards another object. AKA the orbit that you know.
2) A repetition of a function infinitely upon itself. (this term might be outdated- I found the lesson in a precalculus book at my college-aged cousins' house)

For orbit #1, an orbit is elliptical due to two factors:
1) Gravity is imperfect.
2) the way that an object enters (or forms in) the gravitational area.
Anyway, the point is that the object that it orbits around is a focus of that ellipse. The foci are the two points that determine the ellipse-- the sum of the distances from any point on the ellipse to each of the foci is constant.
If you think about it, the Sun isn't at the center of the solar system–– it's at one of the foci.
Here's a good problem about it.

Denying the laws of probability and physics itself, let's say the planets in our solar system are perfectly lined up to one side of the sun. The center of the ellipse is approximately 1.5 million km from the center of the sun. If Earth is at its closest point to the sun (148 million km), and the center of gravity of the solar system remains where it is no matter where the planets travel (which is a lie), what is the furthest point of Earth's orbit from the sun?
In the ellipse above, A and B are the foci, D is the center, and C and E are points on the major and minor axes respectively. 
Anyhow, in this case, AD is equal to 1.5 million kilometers and EA is equal to 148 million kilometers. The sun is at A and Earth is at E. 
Since the furthest point is basically the point on the other side of point B, the formula for the farthest point would be:
( (EA) + (AD) ) * 2 - (EA)
Which is about 151 million km, or an accurate-ish 93.8 million miles.

Another thing you might want to know about ellipses is that in the above example (pretend the scale is off), ED=AC=(AD)^2 + (CD)^2.

~~~~

Soooo, now to the other orbit.

Function orbits are similar to orbits: they go around and around a particular value. Now, to explain them.
Imagine a function f(x) for any value x1. Now imagine f(f(x1)). Then f(f(f(x1))). Continue this pattern until you are 106 years old. The orbit of f(x) for that value of x1 would be the infinite sequence 
x, f(x), f(f(x)).... on until you are 106. Or really, infinity years old. The last (or technically last) term of that sequence would be called the limit of the orbit, because the sequence would get infinitely close to the limit but not to the limit.
The limits are also called 'fixed points', because if x1 is equal to its limit, it goes automatically to the limit. Therefore, the limit becomes 'fixed', as its position never changes after the first term.
If you think about it, the fixed points are all on the line y=x, as shown for f(x)= sqrt(x):

In fact, this is a good function to show you something about.

For f(x)=sqrt(x):
For the x1 values of 0<x1<1, what is the limit?
For the x1 values of x>1, what is the limit?
As you can see, both limits to the domain containing non-fixed points are 1. So, 1 is an attracting limit while 0 is repelling.

There are a couple important uses of orbits.

What is the value of 1+(2/(1+(2/(1+(2/...
This is the limit of the orbit 1+(2/x). Calculating the value of the limit would be:
1+(2/x) = x
x^2 - x - 2 = 0
x= 2, -1
Since all of the signs are positive, the root must be positive 2.
*Note*- The above problem could be thought of as the limit of (2/(1+x)) plus one.
The easier way to explain population is through orbits. Population prediction is really important for people in government, and they use dynamic systems to answer their questions. Here's an example of a model:
f(x+1)= 4 * f(x) * (1 - f(x))
where f(x) is a decimal less than one representing the current population. This function is true because of four things:
1)–– (1-f(x)) is a representation of death, especially by starvation or sickness. This would be true because as population goes up, resources get used quicker and lead to a severe lack of supplies.
2)–– f(x) is a representation of birth, which also increases as the population increases. 
3)–– 4 is needed to multiply because 0.5 is lost twice when the other terms are multiplied.
4)–– The function is recursive because we're trying to find the population next year, not any general year.


~~~~~

Have fun pondering over what I'm trying to explain!

Stay coolio,
John

Wednesday, March 26

Your Least Favorite Post

That's right... we're doing
So here are some tips for using the ID's--

1) Memorize those formulae- esp. sum and difference identities.
2) Simplify to sines and cosines-- using algebra and reciprocal ID's. This is probably the most important step.
3) Use algebra to simplify to the least possible amount of terms.
4) Use a calculator or something to do the rest. (if solving for variable)

Usually, the point of the identities is to
a) prove an identity/theorem or
b) solve for a variable.


Like above, you have to use all of the identities, mostly reciprocals. 

Although it's one of the most annoying parts of math, it's definitely worth knowing.

Another way to solve it is graphing, but that takes away all the coolness of it. Basically, you can find if the graphs of (cot(x)+tan(x)) and (sec(x)csc(x)) are the same.

I might do something with functions and orbits later. Sorry for not posting in a while.

Stay coolio, John

Thursday, March 20

Late Pi Day

Pie? Like the food?

OK, you've probably heard that before, as Pi Day is now more conspicuous in terms of holidays. Happy 6-days-too-late-for-Pi Day!

The approximate ratios for pi are:
3 digits: 22/7
4 digits: 245/78
5 digits: 333/106
6 and 7 digits: 355/113
continued...
38 digits: 2,646,693,125,139,304,345 / 842,468,587,426,513,207
Well, quintillions are pretty accurate, right?

At digit 763, there are 6 nines in a row. This is the Feynman point.

To find the circumference of a circle the size of the universe to within the radius of a single proton, you only need 39 digits. Although that seems like a lot, it really isn't.

Chao Lu from China memorized 67900 digits of pi. Nice use of time, Chao! Especially considering the last fact!
A ten year old actually memorized 410 digits of pi. Either he felt the urge to learn all of them or his parents are gigantic perfectionists.

Pi is equal to...
6 * sqrt(sum (1-inf) (1/n^2) )
4 * (sum (1-inf) ((-1)^n /(2n+1)))

Although pi is determined by a ratio, it cannot be expressed using a ratio. Therefore, the circumference and/or the diameter must be irrational in a circle.

In the first six million digits of pi, five is the most common and zero is the least common. In the first million, five is the most common and seven is the least common.

Pi is technically mentioned in the bible- see 1 Kings 7:23.

Pi has been referenced in a huge amount of books, TV shows, and movies.

Extremely Cool Sites:
The Pi-search page- This finds certain strings of digits from the first 200 million digits of pi. Extremely cool website.
More Links

Keep calm and guess again!

Friday, March 7

Problems of the Week 2 Answers

1. The answer to this is really obvious. The sum of n (1/n)'s is 1, so you need k=1000 ones to get 1000.

2. By definition, all multiples of x can be represented as Nx mod x, where N is an integer. Working backward, we find out that the code must be a multiple of 7, 8, and 9. The only three digit number with this property is 7*8*9= 504.

3. Let's replace the cost of a cone with x. Al must have (x-24) cents and Bob must have (x-2) cents. If Bob is only two cents short and the sum of their money is less than x, then Al must have 0 cents or 1 cent. Because Al took at least some money from his bank, he took out one cent; solving for x, we find that the cost is 25 cents.

4. This problem is simple replacement. We can take out the one to get 22 as a solution; and, if you take out 2, 3, and 4 and replace them with 24, you get 20. You can't add 25 because only one five follows, so those are your only solutions.

5. Two digit numbers with digits (xy) are written as 10x+y. Therefore the equation for their ages are:
10x+y+(41-14)=10y+x. One of the solutions is already (1, 4), and when we simplify we get
y=x+3. The next positive integer solution would be (2, 5),and therefore the answer is 11 years later.

6. When you graph 0<y<2, 0<x<2, and abs(y-x)<1, you get:

The green area takes up 3/4 of the 2x2 square, so the probability is 3 in 4.

7. After the first repetition, there are three digits. So after two repetitions, there are exactly four possibilities for the number: 033, 123, 213, and 303. However, 033 and 213 are null because no number simplifies to either of the two. 123 and 303 both go to 123 again.

8. For the sake of understanding what I'm saying, let's use the @ symbol in place of 'plus or minus'. abs(x) in this case simplifies to @x, abs(1@x) simplifies to @1@x, and abs(2@1@x) simplifies to @2@1@x=1. The solutions to this are @4, @2, and @0.

9. Drawing out the hexagon, it looks like this:

Notice that the corners are equilateral triangles of side lengths 9, 14, and 10. If you think about it, the other equilateral triangle will have corner triangles of 7, 11, and 6. The side length of the large triangle will consist of the side lengths of two smaller triangles and the side inbetween them. That would make the triangle's side length equal 7+14+6=6+10+11=11+9+7= 27 units.

10. Draw this out too.
Because FA is tangent to circle C at point F, radius FC is perpendicular to FA. This forms right triangle CAF, with hypotenuse CA and legs FA and FC. We know that FC is 3 units, and AC is 5 units, so therefore FA is 4 units long.

Sorry for the kind-of bad explanations I made. I tried, at least!

Stay coolio,
John

PS: Credit to SketchBookExpress and GeoGebra for the illustrations.