Thursday, October 08, 2015
Sunday, December 11, 2011
Novel way of explaining binary counting to absolute beginners
Binary is explained very well on thousands of excellent web pages out there, so this is just a snippet of an idea that I think is novel. I just thought of a cool way to teach someone to count in binary, by just swapping the digit "1" for "9" and back, as follows:
A) Replace all the "1"s with "9"s;
B) Add 1 as you would in familiar decimal counting
C) Then change all "9"s back to "1"s.
For example, starting with say 1011
After step A) we have 9099
After step B) we have 9100
After step C) we have 1100
The goal is to very quickly just skip the step of actually writing any "9"s at all, and just know to treat the "1" as the "9", i.e. in binary, the "1" is the last digit. Works for any base.
A) Replace all the "1"s with "9"s;
B) Add 1 as you would in familiar decimal counting
C) Then change all "9"s back to "1"s.
For example, starting with say 1011
After step A) we have 9099
After step B) we have 9100
After step C) we have 1100
The goal is to very quickly just skip the step of actually writing any "9"s at all, and just know to treat the "1" as the "9", i.e. in binary, the "1" is the last digit. Works for any base.
Thursday, December 01, 2011
Perhaps nature does not use the square root of negative one
I've recently finished reading "Introduction to Smooth Manifolds" by John M. Lee, which I highly recommend if you want a solid and readable introduction to some aspects of differential geometry, Lie groups and Lie algebras, and a whole lot more. (I must be honest and admit that I think I would probably learn just as much as I did the first time if I read it a second time.)
Thoughts on quantum physics: The use of complex algebra in quantum physics is puzzling because sqrt(-1) does not make sense in our "classical" "real world". However, it may be as simple as accepting that complex algebra is just isomorphic to whatever the algebra is of the quantities that quantum physics is modelling. In other words, nature doesn't take the square root of negative one, but whatever is going on works in the same way as if it did.
Tuesday, March 01, 2011
A proposal for improving the Wikipedia's utility
Wikipedia is wonderful. But when trying to use it for mathematical or other highly technical subjects, there is a problem. The topics tend to be correct, but contain too much material aimed at experts in the specific topic. Too much of the terminology in a given article requires reference to defining articles, that themselves have the same problem, and so it is very time consuming, and often leaves the user unsatisfied.
A proposal:
Allow the user to rank their own "satisfaction" with any article, and store this with their profile.
Also, for each article or article section, specify the prerequisite articles.
Develop a suggestion system that suggests the best path from the body of articles that the user is already satisfied with to the article on the topic that they require to understand.
In other words, instead of the user having to work backwards from the article that they require to understand, allow them to work in a more natural forward progression, similar to the way the topic would be covered in a text book or a teaching course.
Tuesday, November 03, 2009
Theoretical Minimum - Physics
iTunes-U has lectures from Stanford called "The Theoretical Minimum".
I've watched 3 of the topics so far (about 10 lectures per topic, about 90 minutes per lecture). I am enjoying them. Topics so far:
I've watched 3 of the topics so far (about 10 lectures per topic, about 90 minutes per lecture). I am enjoying them. Topics so far:
- Classical mechanics
- Quantum theory
- Quantum entanglment
My highlights from Classical Mechanics:
Principle of Least Action. Deriving the Euler-Lagrange equations from the principle of Least Action.
Noether's Theorem: differentiable symmetries (i.e. smoothly parametrised transformations that leave the Action invariant) imply conserved quantities, e.g. x->x+ε for linear momentum, θ->θ+ε for angular momentum, t->t+ε for energy.
Derivation of Hamiltonian formulation (used Legendre transformation L+H=pv). Liouville's theorem: flows in pq phase space are divergence free (like incompressible fluid flow).
Electromagnetic example: particle in magnetic field: guage field needed for Least Action formulation; guage invariance and guage transformations.
Principle of Least Action. Deriving the Euler-Lagrange equations from the principle of Least Action.
Noether's Theorem: differentiable symmetries (i.e. smoothly parametrised transformations that leave the Action invariant) imply conserved quantities, e.g. x->x+ε for linear momentum, θ->θ+ε for angular momentum, t->t+ε for energy.
Derivation of Hamiltonian formulation (used Legendre transformation L+H=pv). Liouville's theorem: flows in pq phase space are divergence free (like incompressible fluid flow).
Electromagnetic example: particle in magnetic field: guage field needed for Least Action formulation; guage invariance and guage transformations.
From Quantum Entanglement:
Definite highlight from quantum entanglement is Bell's theorem, and the violation of locality: Making an "observation" of one component of an entangled system instantaneously determines the outcome of the other component, irrespective of their spatial separation. I.e. the one component affects the other component instantaneously, and notably: faster than the speed of light!
Note: I also highly recommend the Quantum Mechanics lectures from Oxford by James Binney.
Tuesday, May 13, 2008
How cells represent their environment
This book was recommended to me: "An Introduction to Systems Biology" by Uri Alon. I have just started on it.
I like this idea from it: think of each transcription factor (TF) as a variable. The cell represents its environment (both external and internal) by means of these variables.
Background:
The value of the variable that represents the environment is the proportion of TF in the active state.
Thus, the millions of real environment variables are projected onto a smaller parameter space: the number of distinct TFs.
E.Coli has 300 TFs, according to Alon. That's quite a small parameter space compared to the physical environment.
One comment: the kinetics of the TFs and the chemical species with which they interact is modulated by the physical environment, so the above view is simplified.
I like this idea from it: think of each transcription factor (TF) as a variable. The cell represents its environment (both external and internal) by means of these variables.
Background:
- A transcription factor is a protein that is either active or inactive. Some aspect of the environment will cause a molecule to be either active or inactive, e.g. a small molecule may bind to the TF, and cause the TF to undergo a conformational change. When active, it binds to a specific site on the DNA and causes transcription, which results in the production of a specific protein, which performs a function appropriate for the level of the environment variable.
The value of the variable that represents the environment is the proportion of TF in the active state.
Thus, the millions of real environment variables are projected onto a smaller parameter space: the number of distinct TFs.
E.Coli has 300 TFs, according to Alon. That's quite a small parameter space compared to the physical environment.
One comment: the kinetics of the TFs and the chemical species with which they interact is modulated by the physical environment, so the above view is simplified.
Saturday, December 16, 2006
Real-time ray tracing


My last adventure the interesting places in the universe of maths and software engineering involved real-time ray tracing. I took an existing demo from the JOGL (Java OpenGL) code, and converted it from the ARB shading language to the OpenGl shading language (GLSL). The demo shows a glass rabbit, which you can interactively rotate. Minimalistic ray tracing is done to create the effects of fresnel reflection variance, and chromatically variant refraction. The ray tracing is minimalistic, since only 4 rays are traced per fragment, and they are only traced to a cube-map texture.
First, I extended the the original demo by making the indices of refraction variable, as well as making the fresnel factors variable. Thus in real-time you can make the object become invisible (index = 1 ), or totally reflective (i.e. appears silver coated).
Then, once I got it going in GLSL, I extended it by adding colour filtering to both the reflected and refracted components. Now you can change the "glass" colour. Setting reflective to red, and transmissive to blue looked really cool too.
Aesthetically, taking such a minimalistic approach to ray tracing works fine, since in real-time ray tracing, each frame is transient, so there is "no time" to spend finding the flaws due to the gross simplification.





