Wednesday, July 25, 2007

Responsibility and credit

Events in life result because of deterministic and non-deterministic sequence of actions. Taking credit for deterministic actions is an easy thing and hence not really interesting. Here I am talking about personal credit, not credit given by society because of being the medium for events. According to karma we can take credit for non-deterministic actions but it is usually hard for most to be good accountants. It takes experience, courage and many more hard qualities which grow by practice to be good accountant.

A subtle but important point to realize is that we are only playing a role of verifier in the system (Nature if you may think so) where some sequence of actions result in events. Since we do not explicitly know who plays the role of prover we cannot take "complete" credit (personal) for events even if we believe in karma. Believing in G-d (I am not talking about belief in after-life or being religious etc., which are only some efficient tools) is probably the optimal choice for the role of prover, who plays a key role in the events.

One important point is that we need to assume the prover and verifier are both honest for the completeness requirement of the system. It is necessary that the verifier is honest for the system to be sound. One can imagine that if there were an all-powerful bad-guy then honest verifier will not allow him win!

Sunday, July 15, 2007

Principle of abundance

Modern science laid the universal foundation for rational materialism. Though materialism might be incompatible with several religious beliefs true materialistic rationality can not mislead us in our search for understanding the universe. It is important that it should be true and rational materialism. In fact given the complex structure of the society our survival is currently based on, it is probably the optimal choice to take on. This is because we can then work on complexity of the universe since we can concretely measure (and hence share) our understanding of the universe in terms of "material". To efficiently study the complexity the asymptotic view of amount of resources needed and several "on average" analyses like amortized analysis have shown to be very useful for e.g. in understanding nature of computation which has contributed to understanding universe.

The key to be effective in studying complexity is to be smart enough to care about details and mature enough to have a macroscopic perspective. If a complexity theorist gets too involved in non-asymptotic details he might not be able to make any real contribution. If he is not careful enough with the details of his proofs and assumptions he will be wasteful of resources. Working on non-asymptotic details like creative engineering is an evolving profession like that of practicing law, medicine, programming where as more and more complexity is revealed it becomes more and more important. To work based on asymptotic behaviors it's important to have an abundance perception of the universe in terms of time, life, opportunities, possibilities etc. along with finiteness. If we do not work in finitistic set of assumptions things might turn out to be too abstract to be useful some times.

It is important to understand that the abundance is finitely measurable and is not free which makes the process interesting and safe.

Tuesday, July 10, 2007

Streaks of thought: Streak 9

Proving lower bounds for complexity (defined in terms of resources needed) of problems is known to be hard. Lower bound on a resource is the minimum amount needed to solve the worst of the instances of a problem. Hence usually worst case analysis is needed to prove lower bounds. The intention of such worst case analyses is mainly to install signs to control traffic of exploration for saving energy and being effective.

Such effort should not be confused with immature and dumb "but what ifs". Immaturity is usually flagged by non-productiveness of thought process. Dumbness is hard to be flagged especially because it's not as penalizing as immaturity for surviving.

Sunday, July 08, 2007

MEXperience

I had learnt somethings from my experience building mex files for C-MATLAB interaction. Below I list some helpful points to keep in mind in cases of frustration:
  • "mexing" in Linux/Unix requires a new setup of compilers.

  • Make sure you have compatible gcc with the MATLAB version installed.

  • Sometimes commenting lines of code using '//' might produce errors. Using '/*....*/' is safe.

  • mexing on 32-bit Linux produces .mexglx executables and those are not executable on 64-bit Linux machines which need .mexa64 executables.

  • mexPrintf statements can make your program really slow.

  • Having too many "mx.." statements in the C-code might make the code run slower possibly because you are just repeating what MATLAB might already be doing without your C-code. Remember MATLAB does use some of its built-in C-code for speeding up certain operations. As an example if you have to handle structures in your C-code use "mx.." statements to pass parameters but use the "struct" variables in the C-code not mxArrays.

  • Initially try to balance of how much of your code you want in C-style and how much in MATLAB. After you get familiarized with "mex" code try to code most of it in C and then use MATLAB as an "interace" for experimenting with your code.

  • If building huge systems which you will probably do only after getting familiarized with "mex" forget MATLAB and use development tools like Visual Studio etc. for building and debugging then just add the interface. Debuggin on smaller projects can be handled effectively using mexPrintf which later have to be minimal.

Wednesday, July 04, 2007

Spiritual materialism

Recently I attended a spiritual retreat organized by Brahma Kumaris World Spiritual Organization at Peace Village in upstate NY. The retreat I attended was titled "My Self, My Work and My Life". This one was special because the theme was to discuss how to optimize your gains from life. The speakers and audience bounced around the ideas of how to "align" universal values (like to be peacful, loved, happy), thoughts and actions to maximize subjective gains and hence optimize overall gains.

Such exercises can provide us with insights that can help us to be creatively materialistic. It is not completely impossible to be creatively materiaslistic without spirituality but it can certainly help and make things lot easier. An analogical post that actually motivated the theme of this post is this.

Update: Added a picture I took at Peace Village to support my ending sentence of the post. 3:56 PM