Saturday, December 20, 2008


Well I didn't manage to completely solve a SPOJ problem today, what a shame. I managed to think of a method of attack but didn't have the time or motivation to try and code it up or even write pseudo-code. The problem statement can be found here, since I don't want to accidentally leave out any details.

The method I am going to try combines a binary search and greedy algorithm.
First create a sorted array of all the locations of the stalls, then a second array that will keep track of which stalls have cows. Call these arrays A and B respectively. Through out my explanation assume that both arrays are always sorted. Now if you only have 2 cows you place them in the extreme left and right stalls, so add these stalls to B. The general idea is that the best location for cow (N+1) can be built from the best location for cow N. For example, to add the third cow look at the stall that is "half-way " between the 2 stalls with cows. Is the minimum distance at this point less than if you were to move it left or right by one stall? If so add this stall to B. If not do the same thing by looking at the midpoint of the left and right halves (some case work might be able to be applied to minimize this but I haven't thought about it yet). After doing this you can find the best spot for the third cow. To add the 4th cow look at the "interval" between cows 1 and 3, and the interval between cows 3 and 2, and apply the above method.

I haven't really considered the time constraint and input sizes but I might be able to get away with a linear search for the best spot (though I doubt it). I suppose that TopCoder article I read on binary search is coming in handy. Well I probably won't be able to work on this again until Tuesday so hopefully I'll be able to work out any "bugs" before I sit down to code.

*UPDATE: Well I managed to actually write up the code for this earlier than expected. However, there was a change in how I went about doing it. I instead did a binary search on all the possible distances between the stalls, in order to find the largest possible minimum. Basically given a distance and the number of cows I would perform the following operation;

bool(stall, distance, cows) //where they are all the appropriate data type
for i from 1 to one less than the number of stalls
. if stall[i]-prev is less than distance do nothing
.else prev=stall[i] and increase num by 1
end for loop
return true if num is at least as big as cows, else return false

This basically tells you the maximum number of cows you can place so that the distance between any 2 is "distance". So if I remember correctly the possible distances between stalls were between 1 and 1 billion. So the above should only needed to be run no more than 30 times.

Thursday, December 18, 2008

Making a Fence

Another day and another SPOJ problem complete ( link to problem). In this one you had to implement a way to find the convex hull of a given set of points. This one wasn't that horrible since I already knew a method to perform the desired task. The only problems I encountered were, 1) what do you do about collinear points and 2) what about one and two point sets? Luckily there were examples that covered both of these issues so I adjusted my code accordingly.

The method I used is known as the Graham Scan. First you find the most lowest point, or furthest left point (I personally like to chose the lowest, but going with the furthest left doesn't really change anything). After this is done you sort the remaining points according to the angle the line connecting them and the lowest point, makes with the x-axis. Then create a stack, and add the first two points (the lowest point and the one with the smallest angel measure). I should clarify that this is not actually a stack since we will need the ability to access both the top and second elements. What you do next is easier to explain with pseudo-code in my opinion at least so here it is:

for i=3 to the size of P //P is the collection of points
. while stack.size>=2 and cross(stack.second,, P[i])<=0)
.. s.pop //remove the top element
. s.push(P[i])

Basically if a right turn is made (cross product less than 0) or collinear points (cross product equal to 0) the point at the top of the stack is not part of the convex hull. If you don't follow draw some points, if you ever make a "right turn" you are moving "out" and thus it is more efficient to not consider the point at where you turned right. (hope that helped). Supplementary stuff: This could be improved by first finding the points with the largest and smallest x and y coordinates. These four points will form a quadrilateral (assuming you have at least 4 points that is), if any point is inside this quadrilateral it is clearly not part of the convex hull, so you only need to consider the remaining points. I would like to get around to adding this to my code by I am a little stuck at finding a way to determine if a point is in the quadrilateral or not.

In case you were wondering this is a O(n*log n) algorithm.

Wednesday, December 17, 2008

Minimum Spanning Tree

While online I realized that I visit the same sites on a regular basis. So I decided to look through my bookmarks to see what sites I haven't visited in a while. Hey look what I found, SPOJ. Why not try to solve as many problems as I can over this break? I already have bookmarked a few problems I have found to be particularly interesting or will make me implement an algorithm I know but have not coded before.

Well I decided to start with a problem where I was asked to find the minimum spanning tree of a given graph. This falls under the "found to be interesting" category. After thinking about it for a while Dijkstra's Algorithm came to mind, and I said "instead of adding the vertex that has the shortest path to the starting point, why don't I just add the smallest weight?" So I wrote a program to solve the problem this way, with out caring about how efficiency. Then testing it against the example they gave I saw that it worked. So now time to do some improvements, but first to look around the internet (aka Wikipedia) to see what other attacks there are that I might not have considered.

Turns out that the method I though of is known as Prim's Algorithm. Unfortunately the pseudo-code that Wikipedia provided was difficult to follow, but luckily I didn't have to search hard for a site with pseudo-code I could understand. However, there is one thing I still don't understand. Each of the sites mentions how you can put the edges into a heap to help make searching faster. First I don't see how this helps and second how does one decide how one edge comes before another in the heap? Well I guess I'll have more time to consider this.

Here is my implementation of the algorithm, I believe it runs in O(EV) time. Sorry for the horrible formatting, I really wish that blogger would just not auto-format stuff the way MSWord does, so annoying.

void mst(vector&E,int N)
vector found(N+1,false);//vector of already solved vertices
long long wgt=0;//total weight
tpl temp=tpl(-1,-1,-1);

vector::iterator II=E.begin();
int sh=2000000;
for(vector::iterator I=E.begin();I!=E.end();++I)
tpl R=*I;
if(found[R.first]==true && found[R.second]==false)

else if(found[R.first]==false && found[R.second]==true)
found[temp.first]=found[temp.second]=true;//another vertex has been solved for
wgt+=temp.third;//update total weight
print(found);//print found vertices, used to debug

Friday, December 12, 2008

Another Semester Down

Finally this semester is over. Not that I didn't enjoy it but the classes didn't provide me with enough of a challenge. I don't see too much changing next semester but you never know. I don't see any reason for not making all As since I pretty much destroyed every test and project. Well here's the expected break down of each class.

CIS 3020: Quite uninteresting. All the object oriented stuff we learned in class I already knew, and that was because I spent about an hour reading the OO portion of a C++ tutorial. The lab sessions were quite useful since you actually learned concept, thank god for graduate students. The two things I got out of this were learning some Java and finally switching over to Linux (as far as my laptop, I still have to get around to putting it onto my desktop).

Fourier Analysis: Worst mistake ever. Easy class, but so uninteresting. I was expecting a theoretical approach to the topic, or at least an applied one where theorems were stated and then proofs sketched. However, what I got was "here is what a fourier series is, now here is what MATLAB can do". Needless to say I didn't really learn anything I would consider worthwhile.

Numerical Analysis: Seemed like a computational approach to linear algebra. Though the class did make us use MATLAB he would explain where the equations and algorithms came from before showing how to perform them in MATLAB. Overall could have been a better class but I guess I was expecting too much since I had already started reading a Numerical Analysis book a few years ago.

Modern Analysis: Good review of what I did all last year in Adv. Calc. The problems he assigned were pretty interesting and required some thought, but nothing to the point where you would be banging your head on a desk two hours before the assignment was due. He's a pretty cool guy and an amazing teacher. The phrases of the semester were "blindingly obvious" and "it's easy", so as you can imagine we had some fun with those. OH before I forget he has agreed to be my faculty adviser (or whatever it's called) for my honors thesis. So after the second semester of the course we will get together to discuss thesis topics; looking forward to it.

On a non academic side, today I found out that I was chosen to go through the selection process for an NSA internship. Hope everything goes well and I am chosen, this is honestly my dream internship.

Also if you have lots of time to waste here is a really good site, though I warn you there are a lot of graphs.

Thursday, December 04, 2008

Steven A. Smith on Burress

What more is there to be said.

Saturday, November 29, 2008

Oh Java

Well I have been doing a project in Java (obviously not my choice, I would rather be using C++). I have started to get annoyed with how verbose Java can be at times. For instance say you have two string, string1 and string2, and you wanted to see if they were the same; instead of just typing string1 == string2 like you would be able to in C++ you have to type string1.equals(string2). I should note that string1 == string2 is allowed in Java but it checks to see if the two objects point to the same location in memory, and in most cases this is not what you want to check. But check this out, apparently if you want to compare two characters using the == operator is perfectly fine, gosh Java just make up your mind already. Well that's enough Java bashing for a while, I suppose that I just prefer C++ because it is what I learned first and have been using for much longer. I will admit though that Java does have its upsides (this will be left for another post).

The other day I got around to wondering why I never needed to defragment. the drive with Linux. I have just had people tell me this and have read it online but never actually got around to seeing why. So I got on Google did a quick search and found my answer, and was quite pleased with the result. Here is a link to probably the easiest explanation to follow. After reading that article I saw on the page a link to something about how to "properly delete files", something I have always wondered about and now was just as good a time as any to read about it. I won't go into it too much here, but when you just hit the delete button it is similar to just deleting the pointer that tells you where the information is stored and not the information itself. If you want a better explanation and information on how to "delete" the information just follow this link (you will see why I put delete in quotation marks once you read the article/post).

Friday, November 28, 2008

Why Teachers Weep

This is not mine but I found it to be quite funny and true at the same time. I am glad that I am finally in classes where students are honestly interested in learning the material and not so much about knowing just what will be on the test.

Then Jesus took his disciples up on the mountain and gathered them around Him. And He taught them, saying: "Blessed are the poor in spirit, Blessed are the meek, Blessed are the merciful, Blessed are you who thirst for justice, Blessed are you who are persecuted, Blessed are the peacemakers...

And Simon Peter said, "Do we have to write this stuff down?"

And Phillip said, "Will this be on the test?"

And John said, "I'm sorry. Would you mind repeating that?"

And Andrew said, "John the Baptist's disciples don't have to learn this stuff!"

And Matthew said, "Huh?"

And Judas said, "What does this have to do with real life?"

Then, one of the Pharisees, an expert in the law said, "I don't see any of this in your syllabus. Do you have a lesson plan? Is there a summary? Where is the student guide? Will there be any follow-up assignments? How will this affect the bell curve?"

And Thomas, who had missed the sermon, came to Jesus privately and said, "Did we do anything important yesterday?"

And Jesus wept.

Thursday, November 27, 2008

A Follow up on Amendment 2

Now this article from isn't about Florida but it is about the same topic so in my opinion it is just as good.

Here is a link to the article, please actually take the time to read it and the links that it sends you to.

Wednesday, November 26, 2008

Intermediate Value Theorem

Well I have stared looking over some analysis problems in preparation for the Putnam exam. Though I will admit I have not prepared as much this year as I have in the past, or would have like to.
Well here are some of the problems I have worked on, none of them are particularly difficult but they make you think for a few seconds.

Here are the solutions.

Saturday, November 22, 2008

Integral Test

Here is my post on the integral test. The post is located at my WordPress blog.

Integral Test.


Well for unknown reasons (well not totally unknown) I can no longer use LaTex on this blog. I did look up ways to get this back but ran into a few problems. Most of the solutions only worked for Unix like systems, and I would like to be able to use LaTex on the blog even if I was on a Windows machine. Also most of these solutions would have required me to add another version of Tex to my linux system and I didn't really want to do that. There was however, one solution that would work with all systems (supposedly). All I had to do was edit the source code for a GreaseMonkey script, but after doing that I was still running into the same issues as before so I quickly gave up on that dead end.

I will still be using this blog but whenever I want to post anything mathematically related I shall post a link to my WordPress blog in the post. The reason I am using WordPress is becasuse it has LaTex built in and thus less work on my part.

Saturday, November 15, 2008

Welcome Home Steve Spurrier

Well I finally went to a UF football game. I was pretty much forced into it by Veronica and Juliana. Really it wasn't a bad choice for a first game really, UF was playing USC (South Carolina, not Southern Cal), so I got to see Steve Spurrier.

We had pretty good seats for the game, right behind the band. I admit it was quite the experience, though not all that people have talked it up to being. The game itself was not really worth it since it was a blow out (56-6 UF) and really who want's to watch that?

The half time show...oh how I miss half time at FAMU games, and that is all I have to say about that.



Wednesday, November 05, 2008

Amendment 2

Sometimes I am just shocked at how closed minded and "selfish" Americans (in this particular case Floridians) can be. Look at the title, if you don't know what I'm talking about follow this link.

Below is what one of my friends had to say about this topic. I would have to agree with him 100%, yes even the willingness to leave America and live somewhere else.

It is not often enough that something happens in this country that makes me ashamed to be a part of it. However, there has been a growing trend which has stopped me dead in my tracks. With the recent Florida elections, I have witnessed first hand the bigotry that continues to permeate our society.

I am speaking of course about the Florida Constitutional Amendment number 2. This amendment passed on November 4th, and it prohibited homosexual marriage and stripped rights from a domestic partnership. For those of you who are ignorant on the subject, domestic partnership has not been an exclusively or even predominantly homosexual union. It is merely what the name says. Two beings entering in a legal partnership in order to relieve stress of financial situations among many other things. Now, domestic partnerships across Florida have been reduced to a mere shadow of the benefits a man and a woman may have by being legally married.

This ignorance is gut wrenching. Imagine a similar amendment, one which prohibited interracial marriage. That's right Florida, let's all vote on whether our constitution says I can marry a black woman. Such a proposition would be met with instant hostility and cries of overwhelming racism. Hell, lets take it one step further. Black people can't marry. Period. There is no alternative to give them equal status of being "married". By the simple fact that they were born black, they are denied the rights which are extended to another race.

If you think there is a fundamental difference between those two examples and amendment 2, you are blinder than I ever thought my friends could be.

There is no excuse for this. There is no justification. This, and the progression of 29 other US states is fueled by nothing but sheer bigotry towards homosexual people. In the process, states such as Florida have crippled many non-homosexual partnerships, all in the name of preserving the American family.

I cannot and I will not tolerate this. My desire to complete my education keeps me in the US, but I vow that if such blind hatred continues to be entwined into the very constitutions of the states that make up this nation, I will be leaving. I love America, and I have always thought how lucky I was to live in a nation that was for the most part, better off than most others. But this is not an issue I will compromise.

Normally, I would be open for debate on an issue, but I'm afraid I am making an exception to this. I am not gay, and honestly this decision will probably never affect my personal life. It is the principle itself which is evil. If you think this could have been defended by saying that the domestic partnership was abusable, then I counter with allowing homosexuals an equal equivalent to marriage. If you counter with marriage only being between a man and a woman by decree of God, I will counter with an absolute declaration of your stupidity.

My only salvation is to hope that in the future, children will read about this is textbooks, much as we read about the injustices against black people in America and their faces will be filled with shock. Shock that at one point in the not so distant past, their country, their grandfathers and grandmothers, could have believed in such bullshit.

Also I would like to mention that I am not gay and just like my friend this will most likely not affect me in my life. But it is the principle of the matter, who gave the government to power to say that marriage is the union of one man and one women? Some people will say something like "'s in the bible...", well I am still waiting for someone to actually show it to me. Also since when was the bible the doctrine that governed this country? The bible also says to turn the other cheek...and yet we are in a war over a particular even that happened a few years ago. So don't tell me that we are a "Christian nation", because being a Christian is about more than just reading the bible, you also have to follow the lifestyle, and so far this country isn't doing a very good job. Yes I know that homosexuality is looked down upon by the bible (this I have actually read and/or been shown) but so are the 2 commandments Jesus gave us (for crying out loud he cut the 10 down to 2, at least have the decency to try and follow them both). Here they are, "The first commandment is this: Hear, O Israel: The Lord our God is the only Lord. Love the Lord your God with all your hear, with all your soul, and with all your mind, and with all your strength. The second is this: Love your neighbor as yourself. There is no other commandment greater than these." (Mark 12:29 if you need a reference). Now I don't know about the first one, but this Amendment surely goes against the second.

I shall leave you with the following quote, and if you don't see how it relates then I truly do feel sorry for you.

If mankind minus one were of one opinion, then mankind is no more justified in silencing the one than the one - if he had the power - would be justified in silencing mankind.
- John Stuart Mill

Sunday, November 02, 2008

Minor Incidents

Well I have decided to tag a Computer Science minor to go along with my Mathematics major. After this semester is over I will only have 4 more CS classes to take before I have completed the minor, this basically comes down to 1.3333... CS classes per semester. The classes I have to take are; Applications of Discrete Structures, Intro. to Computer Organization, Data Structures and Algorithms, and Operating Systems. Due to prerequisites I will be taking the fist two next semester, then Data Structures fall of next year, and finally OS my last semester (because this seems to be the most difficult of the 4 and I would rather not to have to worry about it while working on graduate school applications).

I came to this decision after realizing that there weren't any outside of major classes that interested me, other than Economics, Finance, or CS. Honestly, I find all these disciplines to be just as interesting and rewarding. However, what made me choose CS was the kinds of people that would be in the classes. In my experience most of the people in the Economics or Finance classes don't seem to have any interest in the subject and are only there because they have to take it for the major. In addition they constantly complain about the work and other consequential details about the class. While the CS majors are very adamant about their classes and willing to learn. Also there isn't as much complaining about the class (unless it is to say that they aren't learning enough or that it's not challenging enough).

In addition to the above issues there are some other personal "problems". Now that I think about it problems really isn't the most appropriate phrase to use. Here is the general overview: A little while ago (2-3months) stopped talking to one of my friends because I felt used. A few days ago I was pretty bored and lonely (most everyone I knew was out of town) and I considered giving them a call. After thinking about it I didn't mainly because I would feel that I was using them, and that's just something I refuse to do, even to someone I no longer care about. Well I care about them but it is basically at the same level I care about a complete stranger. The day after this happened I talked to one of my friends and basically what I remember from the conversation was this, " will constantly be filtering people in and out of your life. It sucks at time but it is just something you have to learn to accept."

Monday, October 27, 2008

Homecoming Weekend

Well I was not on campus, as a matter of fact I wasn't even in Gainesville, for homecoming this year. Instead I was attending the ACM ICPC Southeast Regional (a programming competition for college students). We took four different teams this year. It was my first time going and I didn't do all that well on the placement test so as a result I ended up on the 4th team. At the competition we managed to answer 3 of the 10 questions and finished 21st out of abut 62 teams. Also we beat the 3rd team. Our school's first team answered 5 questions and got 2nd place (the fist place team also answered 5 questions), while our 2nd team answered 4 question and I am sure that they were in the top 10. Overall I believe that we did very well, considering we were with out the aid of the C++ STL and Java API refernce sites which we were promised.
Any case, it is time to prepare for next year's competition. My goal is to be on the fist team and get 1st place.

Sunday, October 19, 2008

Comfortable in an Open World

Now when I use my laptop I mostly boot into Ubuntu Hardy (8.04). The only time I boot into Windows Vista (which I still think is a better OS than XP) is when I need to use MATLAB. However, this is becoming more of a rarity since I have started using Octave and have become quite comfortable with its interface. In addition I find that compiling and running programs is much easier under Ubuntu. I suppose I could set it so that it is just as easy under Vista but that would require some work. All of the applications I use on Ubuntu are Open Source, with the exception of Adobe, and this is only because I find that it is considerably better than any of the Open Source aternatives I have found thus far. I used to have WINE installed but removed it once I realized that I had no need for it sicne it could not install MATLAB and I'm not much of a gamer so really everything I need can be done with Linux compatable programs.

As far as programming goes I have started using Java. It isn't that difficult to pick up since I know C/C++ it just takes a little getting used to. I might go back and try to convert some of the solutions I did for SPOJ problems and convert them to solutions in Java (they are all in C++). Learning a new language really can't hurt since there are some problems I see and am like "I know how to do that but I can't fit the necessary data into as a long long (64 bits) is C++, if only I could use Java's BigInteger."

Next week is the South East Regional Programming Competiton for ACM. Wish me luck. I feel pretty prepared, I have a grasp of most of the basic algorithms we coverd. It is just coming up with the correct data structures to use that is giving me problems now, but that should soon be fixed.

Thursday, October 02, 2008

Post 100 and about 900 days later

Well this is post #100.
Unlike other post this one will be dedicated to someone (you will know who you are after reading).

I know you have done nothing to deserve what I am doing (well that's not entirely true but this isn't the place to discuss that). I just want you to know that it was a wonderful 3 years and a portion of my life I will not easily remove from my memory. In that time you became one of my best friends, if not the best friend. But that isn't enough for me anymore so I am saying goodbye.

Friday, September 26, 2008


First I would like to mention that the generalized statement in my previous post is incorrect. I shall in the coming days post the correct version with proof. Now for the real post.

Without you in my life, brightening the days
I might as well be blind, crawling in the dark
Searching for a light switch I'll never find

But there you are
And it's like God said, "Let there be light"
No, more like
"Let there be [her name]"

And now I'm obsessed
I might as well be blind
Because all I see is you
But that's alright by me
Since with you there what else is worth looking at?

Sunday, September 21, 2008

I Have Wireless

So I have finally managed to get my wireless card working with Ubuntu 8.04. You have no idea how happy I am about this. I have been wanting to really give Ubuntu a try but have always been reluctant to because of the fact that it wouldn't work with my wireless card and I would need an ethernet cable in order to connect to the internet. Now I know this happiness will not be too long lived because once I update to the next version of Ubuntu (which in my case will probably be 9.04 and not 8.10) I will most likely have to go through the same process again and hope that it still works on the new version.

On a more "depressing" note; I managed to finish only half of one my my 5 analysis homework problems. They all seem to be about connected sets. One of the funny things is that in Rundin for a set to be connected it must not be able to be written as the union of two separated sets. However, on Wikipedia, Mathworl, and one of my other analysis text they also say that the separated sets must be open sets. Now I know that if two open sets are disjoint they are separated so I don't see the real need for this extra assumption. In any case the problem I managed to solve was as follows.

Let A and B be two connected subsets of a metric space X. Show that is A and B have nonempty intersection then their union is also connected.

The second half of the problem asked us to state and prove a generalized version of this for the union of arbitrary connected sets. I came up with:

Let {A} be collection of connected sets. If for each F in {A} there exist a G in {A} such that the intersection of F and G is nonempty then the union of all the members of {A} is a connected set.

Saturday, September 13, 2008

Voting and Coding

Well as the title indicates, this post will be mainly about two thing; voting and coding.

Don't you just find it a little discouraging that when you turn 18 you are finally able to vote and be drafted into the military (assuming you are male). What really bothers me about this isn't so much the service aspect but rather the fact that when I turned 18 I was sent a card saying that I had registered for the selective service. Now I don't remember doing a damn thing for this, I'm not complaining, but still. On the other hand when I wanted to register to vote I had to go out of my way in order to do so. And you wonder why so few young people decide to vote. It's viewed as a burden, I mean if they can register for the service on their own they sure as hell can register you to vote, even if it's as an independent and then you have to go and change your party affiliation if you so desire.

This year I think I am going to take programming team practices a little more seriously. I guess it is because now I know that in most competitions I will be able to solve about one or two problems "easily". However, I would like to be able to do more and in order to accomplish this goal I will have to learn more algorithms (or at least the thought process behind them). At the most recent practice I learned a pretty efficient algorithm for finding the longest common substring between two strings. Before seeing the algorithm I would have been able to do this problem but my method would have been very inefficient and complicated to code.
Also I have finally found a blank CD for me to make a Linux boot CD. I am going to install Ubuntu on my portable hard drive instead of partitioning the hard drive on my desktop or laptop. I really don't have a problem with having Ubuntu being the main OS on my laptop but I am not sure how to go about installing MatLab on that system so I am going to avoid the potential problems. Also one of my classes works primarally in a Linux environment so having Linux on my comptuer will make things easier (although I could still do most if not all of the work under Windows if I really wanted to).

Thursday, September 11, 2008

"Low-Tech" But Creative I Must Admit

Just another thing you have to worry about in the world. When will people try not get ahead by screwing over others? Whoever it was that came up with the concept of money must be rolling over in their grave now thanks to all the problems it has caused through out history. I suppose if it wasn't money then it would be something else that would cause people to react in the same fashion.

Why can't we just go back to the bartering system? You know, when things were simple. I'll admit that this system has its flaws but personally I think that the advantages definitely outshine its pitfalls.

Well here is the article you have been waiting for.

Wednesday, September 10, 2008

Just Another Problem With America

A citizen of America will cross the ocean to fight for democracy, but won't cross the street to vote in a national election.
- Bill Vaughan

As if I needed more of a reason to vote. This quote is just so depressing but then when it gets worse when you stop to think about it and realize just how true it actually is.

Friday, August 15, 2008

Shopping Can Actually be Fun

Decided to do some last minute back to school shopping. Really all I needed was a new pair of shoes and a few other minor things. The only real thing I needed was shoes, everything else I could have bought once I got back to campus, but why not buy now instead of later.

Since I knew that I needed shoes, the first place we (Ann and I) went was to the shoe section of Sears since I had seen the shoes I wanted there before. The shoes I got were Adidas Samba's, I had actually been wanting a pair for the longest while but never got around to actually buying them. They only came out to be $42.99, and I just happened to have $40.00 cash in my wallet, so I ended up putting the other $2.99 on my credit card, I'm sure that I looked pretty weird.

After buying the shoes we just walked around the mall for a while before deciding that I could actually buy some more cloths. Really a fun experience, trying on everything and getting a good laugh at how ridiculous I looked or how amazing it was. The two things that stick out the most are the pink shirt that Ann wanted me to try on even though I told her that I would not buy it. I must admit though that it didn't look all that bad, however, I stand by my decision to not buy it. Then there was this set of brown shorts with white vertical lines, and another set of brown pants. Both were too big so I didn't have to put up much of a fight as to why I wasn't going to buy them. After all of this I just ended up buying a white button down shirts with grayish vertical stripes/lines.

This might not seem all that interesting to most of you but to the parties in attendance it was quite the memorable day.

Monday, August 11, 2008

Time Flies

Last night before going to bed I was talking to one of my friends on AIM. I hadn't spoken to them in a while so most of the conversation was about what we each had been up to for the summer. However, we managed to move to a totally unrelated topic and some of their comments left me just a little depressed. So I did what I normally do when this happens, I end the conversation, put up a witty away message and then go to bed.

Wham! I feel better in the morning and it's like the event never happened. Also when I woke up I was thinking about another math problem (similar to #2 in the previous post). After sitting in bed for a while reflecting on last night's conversation and trying to come up with a proof for this problem, I decided that it was time to go and eat breakfast. Then a few hours later I went over to Ann's.

Well I basically spent all day (well really 10.5 hours) with her. We played Guitar Hero 3, something I have so missed from my days in Holland. I convinced her to start playing on the hard difficulty setting. Things went a lot better for her once she got used to the added button, I think now all she has to work on is "reading" and getting used to the speed. Oh and she also needs to get comfortable with "pull ons and hammer ons". After the Guitar Hero session we went to get lunch at the same place we went for my birthday (Far East Cuisine I think). Then we basically messed around online until dinner.

Sunday, August 10, 2008

Extracurricular Affairs

Well by this time I am sure that just about everyone has heard about the John Edwards affair. If not, or you for some reason want to read more about it, just click on the previous link and it will take you to an article in the New York Times. Now I am not supporting this kind of activity but really why would you put something like this out when your family is in the public eye? To me it just seems like something that you would want to keep between yourself and your spouse. Regardless, what was he thinking? He is married and even has children. Luckily his two youngest children are not that old, so the kids they will interact with most of their lives will not remember this, but it will still be one of those "family secrets" you are ashamed of. As for his oldest child (who is at Harvard Law) good luck to her and dealing with this, since you know people will want to talk to her about it and how she feels.

Also this not only hurts him and his family but also a certain democratic candidate who happens to be running for president. It also doesn't help that Edwards chose to endorse Obama and not Hillary Clinton. I am sure that the McCain campaign will you this to their advantage when the time is right.

In any case it seems that democrats seem to take part in "extramarital activities", weather holding office or not. Kennedy, Clinton, and now Edwards, just to name a few. Let's see if (and hopefully not) Obama will keep the tradition good.

Saturday, August 02, 2008


This is the solution for problem #1 in my previous post.

Let , since is a Cauchy sequence there exist an such that if if Similarly since a subsequence converges to we have that when . Now let be the larger of and .

Now .

Here is the solution for #2 in my previous post (this one took a little longer for me to think of).

Let be a sequence in such that . Now from properties of we have that for all Now let , and since we have that for large enough. So since is complete. Additionally, is a limit point of each , so .

Wednesday, July 30, 2008

From the Integers to Infinite Series

In the upcoming fall semester I will be taking the first year graduate analysis class. Hopefully, this class will be more "rewarding" than the undergraduate analysis sequence I completed last year. The undergraduate sequence was not a total waste of time since I actually did learn some new things, but the class moved so slowly and the test were not all that difficult. I never really had to exert myself in order to obtain my A. As a result in the second semester I tried to get a 100% on every assignment and test. I almost achieved this goal, however, I did not make a small clarification on one of my proof thus resulting in me losing 1 or 2 point for the problem.

The graduate class will be using the same book as the undergraduate sequence. However, we will hopefully cover all of the sections. Last year the professor would pick and choose which topics he though were necessary and possible for the majority of the class to understand. As a result some of our proofs were longer than needed but I suppose knowing multiple ways to prove something isn't all that bad.

Right now I am reading through as many chapters as I can and working all the exercises. My only requirement is that I can only be working on problems from at most two different chapters and that I can only be reading one chapter ahead of the problems I am solving. So basically right now I am working problems from chapter 2 and 3, and reading chapter 4. I am almost done with the problems from chapter 3, but the ones from chapter 2 are going to take a little more time. I suppose that it has to do with the fact that dealing with topology is still a little "new" to me.

Tomorrow I will hopefully be able to do the following problems:

1) Suppose is a Cauchy sequence in a metric space , and some subsequence converges to a point . Prove that the full sequence converges to .
2) Let be a sequence of closed, nonempty, bounded sets in a complete metric space . Also and . Prove that contains exactly one point.

I will eventually get around to making a post about my REU in Michigan. Sorry to disappoint, but I just need some more time to better collect my thought on this topic so that I will have a post worth reading.

Monday, July 14, 2008


Well in my free time I have decided to learn how to use GIMP. For those of you that don't know, GIMP stands for GUI Image Manipulation Program. Basically it is an open source version of Photoshop.
Yesterday I started reading the online manual (which I should probably download to my computer sometime soon) and was somewhat insulted by the simplicity of the first few sections. However, I can see why they are needed. As of now most of what I know to do was discovered by playing around with the program and reading random portions of the manual.
Right now my goal is to be able to create a cool banner for the portion of this blog with the title. I already have a few done but none of them are "amazing" so they are not going to be used. I think the first thing I should find out is the necessary dimensions for the banner.
The program seems pretty straight forward so far, however, I would like to learn how to make manipulations to text.

Saturday, June 21, 2008

Short Computer Post

I don't really feel like making a complete post at this point in time so I will post a a few pictures of the new desktop.

This is a shot of it in use. Running programs include: Windows Media Player, Firefox, GoogleTalk, Google Desktop, Trillian, and ObjectDock.

This is a screen shot with all windows minimized or closed.

Finally, in case you were wondering I am running Windows Vista Home Premium. There is no way in hell I would EVER get a Mac or have their OS running on my computer. As a matter of fact I try to avoid all apple products, but sadly I have to use Quicktime Player every no and again. Anyway, I don't know when but I will be trying to dual boot Windows and Luinux sometime in the future.

Thursday, June 12, 2008

A New Take on Purity

Best xkcd comic strip ever.

Saturday, June 07, 2008

REU 2008 - Week 1

Don't expect an entry for every week of the REU but I figured that the first week was important enough to have its own.

When I first moved into my apartment I was pleasantly surprised by the size. My first impression was that it was way too small for four people to live comfortably. However, after spending some time here I quickly realized that I was mistaken. The roommates are pretty cool, well actually I have only met 2 of them, the last one will be arriving on Monday. The first one I met had just recently returned from Africa where he was helping install water filtration systems in a village. I don't remember the name of the country but it was a French speaking one. The other roommate is a year younger than me and it kind of shows in ways, mainly when we are working in groups (he is a member of my group in addition to being my roommate). The three of us that live here so far are all math majors and the one remaining roommate is an engineering major.

The research is going extremely well. At the beginning we would "play around" with the problems and find a solution. Then our mentors (I can't think of a better term for them, I guess advisers works but that makes it seem like we are PhD students) would present us with a paper which contained the result we had just discovered. You would think that this was disheartening but it actually was not. Having actually come to the conclusion ourselves made reading some of the proofs much easier since we had a better understanding of what they were doing and could relate some of their ideas to our own. However, we have so far have come across a result which we have not been able to find stated in any paper. I guess you could say we have our first theorem, and it's quite a wonderful feeling. We were surprised by the theorem actually. This is because based on the question we were answering one would expect the result to be complicated. However, it is quite the opposite. When we first saw it we were all skeptical and furiously searched for a counterexample but could not find one. After going through it again we were certain that it was correct. All that is left to do for this finding is to actually write up the proof of the theorem and the necessary lemmas.

Well I'll keep this one relatively short and end by saying that it seems like I will be going to the beach quite often (even though we have to climb over a "mountain" to get there). So far this week I have gone three different times.

Thursday, May 29, 2008

From Big to Bigger

I would like to start this post off by saying congratulations to all the 2008 graduates; high school, college, graduate school, medical school, etc. it doesn't matter. The road has been long and hard (some harder than others) but you have finally made it. Looking back on the last four or five (or more in some cases) years, wonderful memories rush to the forefront of you mind at incomprehensible speeds. Times spent with friends doing "stupid" things, things you regret ever happening but because they did you are a better person. (We all have things we regret it's just a matter of how we deal with it, so I don't want to hear any "I don't have any regrets about my life" bull s**t) So of you will be continuing your education or looking to work in academia, while others will be starting "life". Which ever category you fall into I wish you the best of luck.

A few days ago (May 22nd) I attended my siblings' high school convocation, well actually many of my friends were there but it would take too much time to list them, so I'll just list a few: Ann, Clara, Roland, and Jeremy. Now that the event is over I am glad that I decided to attend. Ever time someone I was close to won an award it made me proud since I would be able to say "I know them and we are great friends" in addition they deserved the award for all of the hard work they put forward both in and out of school. I can only imagine how their parents must have felt.

Today was my sibling's graduation. It's not until you have to sit through one of those as a nonparticipant that you see how fast they move. For some reason I remember my graduation taking forever, but then again I was anxious for it to all finally be over. The speeches given by the saluditorian and valedictorian were both quite good. The saluditorian is a good friend of mine and a funny guy so naturally there were some (well really many) hidden comments in his speech. The only part I regret is that my parents decided to show up only five minutes before graduation started so parking was hell and it was near impossible to find seating. We ended up sitting above the tunnel where all the graduates entered and left, so as my siblings were leaving they were able to see us. Also there was no way to get any good pictures of what was happening on stage because we were so far away. Oh well, being there is what really counts, and I managed to get a few good pictures.

Friday, May 23, 2008

Sum of Two Squares

I know that I haven't had a post about math or anything math related for a while, so I think it is time to change this.

Well the problem discussed here really isn't that difficult but it is interesting enough to mention. "Given an integer determine if can be written as the sum of two squares." For example if , however, if instead we had it can be shown that it is not possible to have where .

Sure you could try using "brute force" to solve this but that is boring and definitely not worthy of its own post. The necessary key insight is a theorem by Fermat. The theorem states that a prime number can be expressed as the sum of two squares if and only if . The proof of one direction is not that difficult but a proof of the other direction (that if then is the sum of two squares) requires a little more work. I don't feel like posting them here but feel free to look on Wikipedia, where you will find numerous proofs. The proof by Euler is quite straight forward but is quite long and split into many sections (your call on whether this is a good thing or not). My personal favorite is the first proof by Dedekind using Gaussian Integers.

Now another important fact to know is the following. If two integers, and , can each be written as the sum of two squares, then their product, can be written as the sum of two squares. The proof is just a basic exercise in equation manipulation, if you have not proven this fact for yourself I suggest you try to in your spare time.

Using these two facts the problem basically boils down to "factor ." Actually our task is even easier than this, we only need to find the prime factors, , of such that . Thus if factors as and for some , we have that and is odd, then can not be expressed as the sum of two squares.

Pretty simple, now writing a program to actually do all of these things is a little harder but not by that much.