September 25th 2009 : permalink : Comments

However, as was a running theme throughout the panel, becoming a working designer often involves taking divergent paths, he said. Garfield noted that the idea for his first hit, Magic: The Gathering, didn’t come until he was pursuing his Ph.D. in mathematics.

- Tom Magrino, GameSpot


November 2nd 2009 : permalink : 57 notes : Comments

deep

deep


November 8th 2009 : permalink : 15 notes : Comments

why math majors should learn programming

I was working on some Modern Algebra homework and came across a problem that required a lot of calculations that I just didn’t want to do by hand. So I did what anyone with programming knowledge would do: create a program that would do it for me.

The problem was this:

List the order of each element of the group U20.

The order of an element of the group is defined as the least number of times that element must be multiplied by itself to get back to the identity element.

With groups, you only have operation * and that could be

  • a simple multiplication (a * b = ab)
  • a simple addition (a * b = a + b)
  • or something a little more complex (a * b = a + b - ab)

The identity element is the element e such that a * e = a = e * a.

So if you’re dealing with a simple multiplication, the identity element is 1. But if you’re dealing with a simple addition, your identity element is 0.

Now, what exactly is U20? It is the set of units of Z20.

An element a is a unit if there exists an element u such that au = 1. That is: a is invertible.

Wikipedia: “In computing, the modulo operation % finds the remainder of division of one number by another.” Here are some examples:

  • 5 % 3 = 2
  • 6 % 3 = 3
  • 7 % 5 = 2

Z20 is the set of integers mod 20. You take every single integer and divide it by 20 and if the remainders of two numbers are equal, the two numbers are congruent to each other. What Z20 then becomes is a set of 20 unique elements: the integers from 0 to 19 because then the numbers repeat: 20 % 20 = 0, 21 % 20 = 1.

U20 is easily obtained, actually, by the use of a corollary and a theorem. It is the set of all elements in Z20 that are relatively prime to 20. Relatively prime means their greatest common factor is 1. 20 and 1, 3, and 7 are relatively prime, for example, while 20 and 2, 4, 5 are not since their g.c.f.s are not 1.

The complete set U20 is 1, 3, 7, 9, 11, 13, 17, 19.

When working with a group of units, the operation * is always just multiplication (that is a theorem, by the way).

The problem was this:

List the order of each element of the group U20.

So I need to find the smallest power of each of those eight elements such that when raised to that power and then divided by 20, I get back the integer 1 (the identity element).

This means you start with the power of 1 and if that doesn’t work, you go on to 2, and if that doesn’t work, you keep going until it does. There will come a point when you’re doing 134 % 20 and then you’re just like “Okay, this is bullshit.”

You have more patience than me because I lasted until I found the order 3, which is 4.

Here’s the reasoning: 31 = 3, 32 = 9, 33 = 27 = 7 (remember the modulo thing?), and 34 = 81 = 1. And we’re done with 3. Time for 7. I say: NO. Going through the same procedure each time is the work of a machine, not man. If only there was a way…

Oh, I know! Conveniently, I have Microsoft Visual Studio 2008 installed on my laptop. This is something almost every college student who’s into programming can do for free if they just go to Microsoft’s DreamSpark website. With that fired up, I created a new project: a Visual C# Console Application. I don’t need anything fancy here, just something that will display to me some letters and numbers.

So here’s the code:

int[] units = { 3, 7, 9, 11, 13, 17, 19 };
foreach (int u in units) {
int k = 1;
while ((Math.Pow(u, k)) % 20 != 1) { k++; }
Console.WriteLine(“The order of {0} is {1}. \n”, u, k);
}
Console.Read();

And here’s my step-by-step explanation of the code:

int[] units = { 3, 7, 9, 11, 13, 17, 19 };

Sets up an array of integers that I plan to work with.

foreach (int u in units) {

Begins a loop of statements that will be executed for each one of the elements in the array.

int k = 1;
while ((Math.Pow(u, k)) % 20 != 1) { k++; }

Creates a power and starts it off at 1 and then takes the current integer and raised it to the power and then mods it by 20 and if the result is not 1, then we just increment the power to the next value and test it until we do get 1.

Console.WriteLine(“The order of {0} is {1}. \n”, u, k);

At which point we just spit out our result to the user and then move on to the next integer in the array.

I really want to see what this process would look like in F#. I tried to do it but my F# is f’n terrible and I completely forgot everything I learned a year ago.

There are a lot of higher-math concepts embedded into this post that most people aren’t familiar with me and I hope I made them clear enough to follow along with. Obviously I’ve been dealing with this stuff a while and may take my knowledge for granted, so if there’s something you didn’t really understand please leave a comment below and I’ll respond with a clarification.


November 15th 2009 : permalink : Comments

My Differential Equations & Linear Algebra professor is great.
P.S. I ended up getting 99.5/100 on this midterm.

My Differential Equations & Linear Algebra professor is great.

P.S. I ended up getting 99.5/100 on this midterm.


November 20th 2009 : permalink : 19 notes : Comments

Wolfram Alpha’s PDF function is so experimental (as it currently states) that it literally left Adobe Acrobat speechless. Judging by the question icon, it’d say it was confuddled. To that, I have naught to say but an a-OK.

Wolfram Alpha’s PDF function is so experimental (as it currently states) that it literally left Adobe Acrobat speechless. Judging by the question icon, it’d say it was confuddled. To that, I have naught to say but an a-OK.


December 15th 2009 : permalink : 1 note : Comments

you know the probability final exam will be hard when your cheat sheet has to look like this

you know the probability final exam will be hard when your cheat sheet has to look like this


January 20th 2010 : permalink : Comments

essentially two years left of college

So with my grades finally posted, I can see what classes I have left after this semester for graduation.

After I’m done with Statistics Applied to Natural Sciences (MATH 338), Mathematical Statistics (MATH 435), Critical Reading As Critical Thinking (READ 290), I’ll have to take:

  • MATH 307 — Linear Algebra
  • MATH 350 — Advanced Calculus I
  • MATH 380 — History of Mathematics
  • MATH 390 — Introduction to Actuarial Science
  • MATH 430 — Number Theory
  • MATH 436 — Advanced Applied Statistics
  • MATH 438 — Introduction to Stochastic Processes
  • MATH 439 — Intermediate Data Analysis
  • MATH 471 — Combinatorics

Which means that if I take just three courses a semester, I’ll be in school for three more semesters after this upcoming one. Meaning I’ll get my BA in Mathematics — Probability & Statistics — in Fall of 2011, my last semester. It could have been Spring of 2011 but I took art classes in my first semester because I still wanted to be a double major in math and illustration. Oh well.

By then, CSUF will have opened a graduate program in Prob. and Stats. so I’ll try to get good grades for the next four semesters, counting the one that starts in less than a week.

Thoughts?