Tuesday, December 22, 2009

Analysis and Combinatorics

We often hear about how all mathematics is interconnected, but rarely see clear and simple examples of such connections. In this post I want to show one example in which theorems developed in Calculus are used to solve a range of combinatoric problems.

To begin lets consider the following problem. For any natural number K what is the number of ways it can be written as a sum of powers of two, if we allow each of them to be used only ones? Lets suppose that the number of ways is a(k). It is obvious that a(1)=1, a(2)=1. Lets define a function:

f(x)=a(0)+a(1)x+a(2)x^2+....
a(0)=1

It is easy to see that if a(k) is defined this way then it is also true that:

f(x)=(1+x)(1+x^2)(1+x^4)(1+x^8)......

This is true because if we open the brackets we will get that x^k appears exactly a(k) times. Now lets multiply f(x) by (1-x). It is easy to show that:

(1-x)f(x)=1

You show this by looking on a finite multiplication and then taking limit. However, now we got that:

f(x)=1/(1-x)=1+x+x^2+x^3+x^4+.....

This is true because this is the formula for the sum of the geometric series for any 0<1. style="text-align: center;">F(n)=F(n-1)+F(n-2) , F(0)=0, F(1)=1
f(x)=F(0)+F(1)x+F(2)x^2+....

Lets look on the following multiplications xf(x), x^2f(x). Because of the recursive formula we get:

f(x)(1-x-x^2)=F(0)+(F(1)-F(0))=1
f(x)=1/(1-x-x^2)

The only thing left to do is to calculate the series and we are done. This part is left as an exercise for the bored reader. The important thing is that the same idea works for any different series - this is not something that is true only in a specific case. As such this is indeed an example of how mathematics is interconnected and how calculus that is the study of infinite can be used to solve finite combinatoric problems.

Sunday, December 20, 2009

Gabriel's Horn

I didn't write anything about paradoxes for a long time, so here is a little something. Lets look on the volume we get by rotating the graph of the function y=1/x, for x>1. The object we get is called Gabriel's Horn. It is easy enough to show that its volume is finite and in is equal to pi. If we cut the horn in any finite point a we will get that the volume is exactly:If we now take the limit when a goes to infinity we will get that the volume is indeed pi. However the surface area is infinite. For any finite a we will get that it is exactly:


But the limit of this expression is infinity. Now that we know this , we can go on to the description of the paradox. Suppose that you want to paint the Horn with finite amount of paint. Obviously, it is not possible because the surface area is infinite. But you can fill it with a finite amount of paint. Lets now suppose that Horn is made from a transparent plastic. In this case, filling it with paint is the same thing as painting it.

As a result we get that it is both impossible and possible to paint the Horn with finite amount of paint. So which one is true? The solution is in fact rather simple. Firstly lets look on the graph of y=1/2x. Obviously this is again Gabriel's horn, but in a scaled down version. Lets put it inside the original while it is still filled with paint. In this way we painted it from the outside. How did we do it? The answer to this is in the distribution of paint. The thickness of paint is given by g=1/x-1/2x=1/2x. And this is the whole trick. We can paint even an infinite surface, the only thing we need to worry about is allowing the thickness of paint to approach zero in a way similar to this example (we need the integral of the paint distribution to be finite).

Friday, December 18, 2009

Collecting and storing books

For a long time buying books was considered at the very least practical. As long as it was economically sound, having a nice small library at home was without doubt a useful thing. However is this still true now? Naturally, I am not talking about buying fiction (this is after all a math blog).

To better illustrate the question, lets consider the following example. About a year ago some friends of my grandfather gave me a good multi volume encyclopedia. Obviously it is not something that is expected to be used everyday, but I didn't open it even once in all this time. The reason for this is simple - if I want information about some specific subject, it is easier for me to search in the Internet. It is almost certain that there will be an article on this subject on Wikipedia, or some other place.
To a certain degree the same is true even for my math textbooks\notes. Frequently enough I prefer to search on the Internet for a specific definition or proof of a certain theorem. Unfortunately, this is often less successful than searching for staff one can find in an encyclopedia.

As a result we get the following situation - while we have lots of available books it doesn't seem practical to invest money in buying them. This is especially true about buying new editions of books we already have, or books that cover the same topic but use different approaches. This is especially true considering how overpriced some books are.
A possible solution to this is downloading books (for free). While not all books can be downloaded for free from the net, it is possible to find good books on any given topic. For example there is currently a collection of over 600 math books available on bittorent. There is also a nice collection of calculus books on the same site. The only problem with those collections is that they will not remain available forever. In other words, it is a good idea to download it even if you don't need it right now.

This however brings us to a second problem. While it is possible to download lots of books from the net, we also need some way to organize them so that it will be possible to use them. Another problem is keeping an up to date backup (you wouldn't want to lose 10GB of books suddenly would you?).
I must admit that I don't feel that I managed to make any serious progress in solving either of these two problems. For backup, I long ago decided that burning my files to CD or DVD is not a good idea. It becomes difficult to keep track of the backups, and also the discs tend to be damaged so it is not very safe. Another option, is to keep a copy of your files on the web. I personally use Google Docs. It can only be used for pdf files up to 10mb, so some books I cannot upload, but it is really reliable and the way it is build makes organizing books relatively easy. Some times ago I tried to use Scribd for storing some of the large books I have. Unfortunately, it didn't work. They check the files that you upload, and if they notice that you have books that are copyrighted they will delete them. I also tried to use DivShare, but it is rather unreliable and overall not something I would recommend.

In the end the decision whether to have a digital book library or not is a personal one. In my case I decided to do it out of pure love for books. I just cannot say no to an opportunity to have a library. I do hope however that I will manage to make use of all those books I collected...

Tuesday, September 22, 2009

My library

Over the years I made a little online collection of math and other books. In order to organize and manage this collection better, as well as to share it with other people, I decided to post links to all these books here, on my blog. I hope that you will find this collection of links useful. As of now it is rather small, but I plan to add more books. There is a surprising number of such books available online for free - but it takes time to find them. Some If you have a problem with your book linked from here, please let me know and I will remove the link immediately.
Since most of these books are available for free on the author page, I just linked those pages. In some case, the book is on a site that has no connection with the author. In such a case it is possible that it is an illegal copy - use it on your own risk. I provide the links for educational use only.

If you want to recommend a link for addition, you can leave a comment. In order to keep this post as tidy as possible I will not publish the comment, but I will consider adding the book(s). In order for a book to "qualify" it must be about math, physics or programing and it must be large enough (that is, not an article but an actual book). If a link a broken please leave a comment about it, I will try to fix it if possible.



Math:
1. Elements of Abstract and Linear Algebra - E. H.Connell (author page)
2. Foundations of Combinatorics with Applications - Edward A. Bender, S. Gill Williamson (author page)
3. Graph Theory 3rd Edition - Springer-Verlag Heilderberg (order / author page)
4. Algebraic Topology - Allen Hatcher (author page)
5. A Problem Course in Mathematical Logic - Stefan Balaniuk (author page)
6. Multivariable Calculus - George Cain and James Herod (author page)
7. Calculus - Gilbert Strang (author page )
8. Linear Methods of Applied Mathematics - Evans M. Harrell II and James V. Herod (author page - this book has a rather nasty license)
9. Complex Analysis - George Cain (author page)
10. Linear Algebra, Infinite Dimensional Spaces, and MAPLE - James Herod (author page)
11. Linear Algebra - Jim Hefferon (author page ) This book has complete solutions of exercises.
12. The Geometry and Topology of Three-Manifolds - William P. Thurston (author page)
13. Introduction to Probability - Charles M.Grinstead (author page)
14. Elementary Linear Algebra - Keith Matthews (author page) This book has complete solutions of exercises.
15. Understanding Calculus (author page - this is an online book, you can download it for 5$)
16. Elementary Calculus: An Infinitesimal Approach - H. Jerome Keisler (author page)
17. Combinatorics - Russell Merris (link)
18. Real Analysis - Royden (link)

Programing:
1. Dive into Greasemonkey (author page)
2. SQL server 2008 (link)

General:
1. Flatland: A Romance of Many Dimensions - Edwin A. Abbott (link - there are lots of other books on this site)

Bittorent links:
1. Mathematics - a collection of over 600 math books on different subjects.
2. Calculus Book Folder - a small collection of calculus books. Alternative link.
3. 100 Great Problems of Elementary Mathematics - link.
4. Mathematics As a Science of Patterns - link.

Sunday, September 20, 2009

Storing files on the Internet

This post is a response to a comment that was left on my post Google OS is already here. I don't usually post responses to comments in such a way, but the answer to this comment ended up being rather long (I though initially that I can split it into two comments, but in the end it is almost as large as two regular posts) . Also, while the initial comment was about Glide, in order to properly answer the points raises I needed to give a little summary of the ways I use to share and store files on the web. This post can be thought of as a list of services that provide the functionality that is provided by Glide, but are not "packed" in an online OS. (This obviously brings us to the following question - Why use many services if there is one that provides all that functionality? The answer to this will be given in the end of the post).

Firstly, concerning the main point of the comment, I agree that Glide has features that a remote desktop doesn't have. I didn't say it clear enough in the previous post so I will say it in this one - the part that Glide cloned from Windows is the visual aspect. The functionality that it has is close to what one would expect from an online OS, but the problem is the "frame". As I see it, Glide attempts to easy the transition from other operating system to itself, but by doing so it is bound to compromise on the visual aspect and thus on the user experience. With this in mind lets look on the features Glide provides that were mentioned in the comment and what alternatives to them are available (if any).

The first point to consider is compatibility. I must say that I have been using Linux for about 3 years and I never had a problem opening any file I got my hands on. I did have some problem with a .gbi file a few weeks ago, but in the end I found a way to open it is well. In the latest Linux distributions there is more then enough support for main file formats, and unless you happen to live in a country with draconian copyright laws, there is no problem to install support for many other file types. In Ubuntu, there is an official package that installs all the needed programs. Besides, there are sites (like Google Docs and DivShare) that automatically convert files to a format that most devices don't have a problem with. If your files are on the web anyway, it doesn't mater what site they are on exactly. All you need to do is to send a link.

The second point is synchronization. I never had real need for synchronizing files between many computers. However, I am aware of some programs that allow easy synchronization as long as the operating system is the same. For Ubuntu you have a nice program called Ubuntu One. It offers a free 2GB online storage that is automatically synchronized across all of your computers (right now it is in beta, but I doubt it will stay like this for a long time). I don't think that it is a good idea to use it for large files, but as long as the files are small enough (lets say under 5mb) it is a perfect solution. For Windows, Diino offers similar functionality. They provide much more space (100GB and more), but it is a paid service.
It is also worth mentioning that Picasa allows to sync albums. The free account is rather small, only 1GB, but as you are probably aware it is possible to buy more storage space. I personally prefer not to sync files across computers, but to store them on the web and if I need them to access them on the web. In this way, my files are scattered around my computers, but they are all available on the web. Although, even there they may be on different sites. For example right now my files are distributed in the following way:
1. Google Docs - for small documents. Most of my documents are well within the size limit.
2. DivShare - for large Documents and Video/Audio. This site provides 5GB of free storage (you can buy more). It works well for storing large (but not huge) files.
3. Picasa and flickr- for photos. They both don't reduce the photo quality and allow an easy enough privacy management.
4. Photobucket - for photos that I use on my SU blog. Photobucket is excellent for monitoring bandwidth use, so since the photos I post on SU are usually small, it is a perfect solution for me.


The third point is accessibility. As you all know it is possible to use Glide from any device that has an Internet connection and a browser. Thus, all your files are always accessible from any computer with an Internet connection. But using an online OS is not the only way to get this. This is another thing that I apparently didn't say clearly enough in my previous post - my example with a phone. It is well known that it is possible to store files on a mobile phone. But you can do more than this. It is possible to install an operating system on it. A modern mobile phone can act as an USB drive. And it is possible to boot a computer from such a disc and thus it is possible to install a full operating system on the phone. Then, for example, if you installed Ubuntu like this, you can add it to your Ubuntu one account and all your files will be synchronized. In addition to this, you don't need an Internet connection to use the OS. This means that all the programs you have on your computer are always with you. The only downside to this is that you need to connect the phone to another computer to use the OS, while Glide is possible to use from the phone itself.

I was asked in the comment: "How would you share a 1GB video with someone in a distant location when you were traveling with your mobile phone away from all of your computers?" - The answer to this depends on the location of the file. If it is on my phone, I would probably use Filemail. It allows sending files up to 2GB for free. If I have the file somewhere on the net, I would just send a download link. Obviously, if the file is only on my computer I would have no way of sending it, but I try to have an online copy of all the important files I have on my computer. The fact that my files a scattered around the web makes it a little disorganized, but I don't think that this is a bad thing. Moreover, did you hear about a site named eggdisk? They offered a really nice online storage service and delivered it for sometime. But then one day (without any warning), they stop providing the service, turned the site into ads and didn't even allowed the people to get their files. Because of this case I prefer to keep my files scattered like this around the web.


The forth and last point is integration of services. About this I agree completely. Right now the level of integration between Google services is rather lacking. However, it is probably worth mentioning that too much of integration will effectively force the user to use only the services provided by Google. But this is just a remark, I most certainly hope that the level of integration will increase. This point is, I think, an important one for those who want a system "that just works". Because of this, Glide is better for those who need to use an online OS for work.

To wrap it up, for different people and situations different solutions are needed. For me Glide fails to be anything else but a remote desktop. Since I don't want my staff to be in only one location on the net, I cannot use Glide in a way other people do effectively. Also, because of this I prefer to use all the services I mentioned in this post, and I am always looking for new sites that provide functionality useful to me. However, since this leads to a loss of time, there are people who prefer their files to be centralized and they want to have one simple way to access them all. For such people an online OS like Glide is clearly the perfect solution. Even the fact that it clones Windows appearance is only a bonus to them.

Friday, September 18, 2009

Indescribable numbers

This post is an attempt to explain what the term indescribable number means. Unfortunately, while this is a relatively well know term I frequently see it being misused. To understand it, we must firstly look on the proof that such numbers exist. It is a rather basic proof from set theory. What we need to do is to define two sets:

A={all the mathematical symbols and all the letters}
B={finite words in A}

Now, it is obvious that A is finite. B is not finite but it is only countably infinite (this is the smallest infinity). Therefore, B is smaller than the set of all numbers - R. Since all the possible descriptions are in B we conclude that there are numbers in R that cannot be described at all. Moreover, if you take away all the numbers that can be described the size of R will not change (this is a basic theorem in set theory). From this we can conclude that in fact most numbers are indescribable. This is a perfectly valid example of nonconstructive proof.

Unfortunately, this simple and short proof (I didn't proof all I said, but it is all just basic theorems of set theory) does little to explain what an indescribable number is. Lets consider some examples. For the first example, look on the following set:

C={words in A shorter than one hundred letters}

It is obvious that C is finite. Therefore there is a maximum number described by C. The next integer number (lets call it Y) is thus "the first integer number that cannot be described in 100 letters". But this description is less then 70 letters long. And this means that this number should be in C. Obviously this is a paradox. We got a number that is both in C and not in C.

Here is another example of a similar problem. It is possible to proof that if you randomly choose a real number the probability of it being an indescribable number is 1. So lets randomly choose a number (since we are choosing only one number we don't need the choice axiom). Naturally we get an indescribable number. Well, lets call this number "indescribable number 1". In the case you didn't notice I just gave a description to an indescribable number.

What really is going on is just an indexing problem. It is important to understand that both B and C are just sets of index numbers. If we have such a set we can use it to index another (in our case the set R). Mathematically, description as it was used in those examples is just a function from B to R (or from C to R). But the way we apply the indexing is arbitrary - we can choose any function we want. Lets first look on the 100 letters case. When we defined the set C what we really defined is the pair (C, f). In this pair f is a description function that for any x in C returns a specific number in R (I suppose that all the words in C describe some number, but you can do without it). Since we cannot define Y without firstly defining (C,f) the word ""the first integer number that cannot be described in 100 letters" is assigned by f to some random number. Then when we got a description for Y, we basically created a new pair (C, g). In this pair g is a new function that agrees with f on all C except for one word - ""the first integer number that cannot be described in 100 letters". To this word it assigns Y. For us this may seem illogical, because we think about meaning of words. But in this proof meaning is not important - the words are just a way to index.

With this in mind, lets consider the second example. In this case the number we choose belongs to a set R\f(B). When we gave it a description all we did was to change f in such a way that now this number belongs to f(B). It is obviously not a problem to do such a change (if we wanted to change the function for an infinite amount of values it might have been a problem, but for one index it is always easy to do).

So, what is an indescribable number? After all, we just saw that it is possible to describe any random number. The answer to this is actually simple. Mathematically it is a number that was not indexed by the function f. In normal language it means that it is a number that wasn't described. Form a normal person point of view this is a weird definition, but mathematically it actually makes a lot of sense. The basic idea is that while we have the option to choose any function f, we can only choose one and we cannot change our choice to another function latter on (this is because we need our language to be consistent). Under this conditions it becomes obvious that both examples are just a misunderstanding of what an indescribable number is. You cannot take a number that is not described and give it a description, because the description is already in use and you can have only one number for one description .
But then, what is the point in saying that such numbers exit? It is after all obvious that there are numbers that are not described as of now. Unfortunately this is not what the theorem is about. The point of this theorem is not to say that there are numbers that we didn't describe. This theorem says that no matter what function f we use there are always numbers that are not in f(B). In other words, there are always will be numbers that we didn't describe even if we used all of B for the purpose of such description.

Wednesday, September 16, 2009

Google OS is already here

As you all probably know Google recently announced that they are going to build a natural extension to Chrome. Obviously, a natural extension to a web browser is an OS (and no this is not a joke). Well, I wonder when I will get to use this.... I just hope I will manage to restrain myself from installing the first beta version available to the public.... Sometimes I feel that I love installing software a bit too much. But anyway, lately I feel that the final release of Google OS will be more of a formal step than anything else. The reason for this is that the services provided be Google are already close to being a real on-line OS. Before explaining what that means, lets look on a typical online OS. For example, Glide. If you look on it (here is a little video), you will see that it is basically an attempt to clone a regular OS on the web. The reason I am saying this is simple - just look on the way it looks. It is just like Windows. Obviously some details are different, but the overall idea didn't change. And this is a problem. There is no reason for an online OS to look like a regular OS - the whole point in the transition to online OS is to find a new concept, a new look for the OS. Moreover, the system offered by Glide is nothing more than an remote desktop. The only advantage it has over a normal system is the fact that it is available from any computer with Internet. But this is not enough for a system to be an online OS. Actually, if you want you files to always be available, you can install an operating system on you mobile phone, and then you will be able to use it on any computer with an USB port- even an Internet connection is not needed. Obviously this is better than what such an "online" OS offers.

Google on the other hand is close to making a real online OS. Even now their web services cover most of the things we expect from an OS. To better understand this point lets look on what we expect to get with an install of Windows and attempt to find the corresponding functionality in what Google currently offers. Naturally we will be only looking from the end user point of view.

The most obvious thing we get when installing Windows is "My Documents" folder. In the two latests releases there are attempts to further divide this folder into pictures, documents music and videos. Google provides us with Google Docs, YouTube, Google Video and Picasa Web Albums. Each one of them is meant for only one type of content and they are much better for managing your files that what you get with a default installation of Windows. (I don't know any good place to store music online, but I am sure that there are ways to do this as well, although it is not provided be Google). It is important to remember that while right now Google doesn't do mass file storage, there are sites on the Internet that do just that, and there are rumors flying around the Internet for years about Google storing 100% of our files. Besides, any really large files (like video longer that what you can put on YouTube) you probably don't want to store on the net because getting it from there takes a bit too much time with current Internet connection speeds.

The second thing we get is Office (and notepad, for those who use it). It is not provided be default but it is a basic enough product. Google gives us Google Docs which are for most users a good enough replacement for Microsoft office. Also if you don't like Google Docs you can use other products like Zoho for example. On this note, it is also possible to do light photo editing on the web. While I don't know about sites good enough for professional graphic design, I do know about a nice site for simple graphic editing - FotoFlexer.

The third and final step is communication. This is not something provided be Windows, but the reason we buy computers is to be able to communicate with other people. Since we are talking about an online OS, things like communication become something that is only natural for an OS to provide. And Google does just that. We get Gmail, Blogger, YouTube, Google Video, Google Docs and etc.. All of these products are either build for communication or have the option for collaboration like Google Docs. Right now we view them as services but for an online OS, those are major components.

The only thing Google is missing right now is a "frame". In order for all those services to become an OS we need something that will put them together and offer them to the public as an OS. The building of this frame is being done in three stages. The first stage is the links to other Google products that appear on the Google main page. Those links make all those services connected and easy to reach from each other. The second stage is the browser. The browser has a lot of importance. The way it works and looks is extremely important for an online OS (the reasons should be obvious). For this we now have Google Chrome. Did you notice that by default it has only two lines of menus compared to Firefox five lines? It is obvious that the developers attempt to make it even look like a frame, like the status bar in Windows.
The third and final stage is the Kernel. It is rather pointless to have two OS on one computer in the same time. If we are too use Google OS from Windows (or a Linux distro) we are basically using one OS to connect to another. This is something that needs fixing and Google is now doing just that - they are making a desktop component for the online OS, a component that will remove the need to use two OS in the same time. The only thing that this component needs to do is to boot up, start Google chrome and connect to the Internet. This simplicity is also the reason why they say that the OS is a natural extension of the browser. All it has to do is to make the browser start without anything else on the computer. Obviously, this also means that all the configurations that are needed to be done for the computer to work will be done from inside the browser (at least I think so). Doing this will require a lot of work on Google Chrome, but with Google resources and the help from the Linux community this project will almost surely receive, doing this all in a reasonable time is perfectly possible.

Update:
There was an interesting comment on this post that caused me to write another post about Glide and the functions it provides. The post is titled Storing files on the Internet.