Thursday, August 27, 2020

A Better Way to Implement Affirmative Action: Competency Exams Instead of Competitive Exams will Automatically Ensure Proportionate Reservation

A Better Way to Implement Affirmative Action: Competency Exams Instead of Competitive Exams will Automatically Ensure Proportionate Reservation

The following article that came in the news today reminded me once again of this old idea.

Maharashtra government wants reservations ceiling raised beyond 50%

The Maharashtra government told the Supreme Court on Wednesday that the 50% ceiling on reservation fixed nearly 30 years ago by a nine-judge SC bench required reconsideration by an 11-judge bench as 70-80% of the population belonged to backward classes and it would be unfair to deny them proportionate reservation.

The current system in India for selecting people from the university/college level onwards is to conduct intense, extremely stressful competitive exams, rank all the participants and allow them choice of branch or job based on their rank. But, the total positions are partitioned beforehand based on caste. Needless to say, this causes a huge amount of social friction, immense amounts of stress and many cases of burnout and suicides.

An immensely better way to implement affirmative action is to have competency exams instead of competitive exams. A competency exam is designed to ensure that a person who achieves more than the passing score, is very likely to have the necessary background preparation or competency required for the position being applied for.

Since there will always be far more competent candidates than the positions available, ALL passing candidates are admitted into a pool of eligible candidates and from this pool, candidates are selected at RANDOM.

The laws of statistics, in particular the law of large numbers, will automatically ensure that candidates are selected proportionate to their caste representation in the general population. The same system will also automatically ensure that people belonging to marginalized groups other than caste are also proportionately represented, such as gender, wealth/family income, etc. Also, all the social friction and needless stress is eliminated.

Thursday, July 23, 2020

A Minimal Python Implementation of Conway's Game of Life

I was incredulous that the simple rules of John Conway's Game of Life could result in such complex behavior, providing many analogies to Biology, Physics and Economics. So, I wanted to check it for myself. Unfortunately, most code available online has a lot of bells and whistles that obscure the simplicity of Conway's rules. So, here is a minimal implementation in Python. Being small, it is easy to verify that the program does implement Conway's rules faithfully, and introduces nothing else.

Download link:
import numpy as np
from scipy import ndimage
import matplotlib.pyplot as plt

n  = 100   # grid size
t  = 1/24. # simulation update interval in seconds
pT = 0.1   # percentage of cells initialized to True/on

# randomly initialize a boolean grid, with more off cells than on
G = np.random.choice([True, False],n*n,p=[pT, 1-pT]).reshape(n, n)

# neighbor weights for convolution
W = np.array([[1,1,1],
              [1,1,1]], dtype=np.uint8)

fig = plt.figure()

    plt.matshow(G, fig.number)
    # find the Live Neighbors around each cell using convolution
    LN = ndimage.convolve(G.view(np.uint8), W, mode='wrap')
    # update grid based on Conway's rules using boolean operations
    # G = G*((LN==2)+(LN==3)) + np.invert(G)*(LN==3)
    G = G*(LN==2) + (LN==3)

A simple experiment that can immediately be carried out, is to see what happens when Conway's rules are ever so slightly tweaked. Say what happens if the 'overpopulation limit', 3 is changed to 4, or the 'reproduction number' is adjusted. Depending on your worldview/weltbild, the results will remind you either of 'Intelligent design' or the 'Anthropic principle'.

Verifying Correctness

As per Wikipedia, the rules of Conway's Game of Life are:

At each step in time, the following transitions occur:

  1. Any live cell with fewer than two live neighbours dies, as if by underpopulation.
  2. Any live cell with two or three live neighbours lives on to the next generation.
  3. Any live cell with more than three live neighbours dies, as if by overpopulation.
  4. Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction.

These rules, which compare the behavior of the automaton to real life, can be condensed into the following:

  1. Any live cell with two or three live neighbours survives.
  2. Any dead cell with three live neighbours becomes a live cell.
  3. All other live cells die in the next generation. Similarly, all other dead cells stay dead.

The above rules translated into pseudocode:

if C==1 AND ((LN==2) OR (LN==3)):
    C' := 1
else if C==0 AND (LN==3):
    C' := 1
    C' := 0

are equivalent to the Boolean expression:

C' := C AND ((LN==2) OR (LN==3)) OR (NOT(C) AND (LN==3))

or equivalently (using * for AND and + for OR)

C' := C * ((LN==2) + (LN==3)) + (NOT(C) * (LN==3))


C' := C*(LN==2) + C*(LN==3) + NOT(C)*(LN==3) 
   := C*(LN==2) + (LN==3)*(C + NOT(C))
   := C*(LN==2) + (LN==3) ∵ (C OR NOT(C)) is always True.

Wednesday, May 20, 2020

#Automation: Sending Signals Over Wires.

Crystal oscillators are a piece of automation that are ubiquitous but barely noticed. They are the basis of both computers and the internet. In computers they play a role analogous to the prime mover in a factory, and in networking/communications they do the code keying-in at magically fantastic speeds.

When telegraphy was invented, signals over wires were manually keyed in with telegraph keys, with an average speed of about 150 characters/minute. No wonder telegrams cost so much, which in turn spawned a new language form: telegraphese.
A typical telegraph key.
Today the internet depends on network interface controllers which use crystal oscillators to do the keying in, at about 750 million characters/minute (100 Mbits/sec).
The metallic cubical box, to the left of the large chip houses the crystal oscillator on this 25 Mbits/sec networking card.
The metallic box opened, showing the quartz crystal slice.

Wednesday, April 8, 2020

Mathjax Test

\(\LaTeX\) and MathJax test

\(\LaTeX\) and MathJax test

A test of \(\LaTeX\) export to MathJax.

Maxwell-Heaviside equations:

\begin{aligned} \boldsymbol{\nabla} \boldsymbol{\cdot} \boldsymbol{E} &= \frac{\rho}{\epsilon_0} & \boldsymbol{\nabla} \boldsymbol{\cdot} \boldsymbol{B} &= 0 \\ \boldsymbol{\nabla} \times \boldsymbol{E} &= -\frac{\partial \boldsymbol{B}}{\partial t} & c^2 \boldsymbol{\nabla} \times \boldsymbol{B} &= \frac{\boldsymbol{j}}{\epsilon_0} + \frac{\partial \boldsymbol{E}}{\partial t} \\ \end{aligned}

Their solutions:

\begin{aligned} \boldsymbol{E} &= -\boldsymbol{\nabla} \phi - \frac{\partial \boldsymbol{A}}{\partial t} \\ \boldsymbol{B} &= \boldsymbol{\nabla} \times \boldsymbol{A} \\ \end{aligned} \begin{aligned} \phi(1,t) &= \int\frac{\rho(2,t-r_{12}/c)}{4\pi\epsilon_0 r_{12}}\,dV_2 \\ \boldsymbol{A}(1,t) &= \int\frac{\boldsymbol{j}(2,t-r_{12}/c)}{4\pi\epsilon_0 c^2r_{12}}\,dV_2 \end{aligned}

Maxwell would have approved of these, BUT not Heaviside who thought it was "best to murder the whole lot", i.e. the scalar and vector potentials (\(\phi\), \(\boldsymbol{A}\)).

Wednesday, February 12, 2020

A Heretic's Guide to Modern Physics: Theories and Miracles

A Heretic's Guide to Modern Physics: Theories and Miracles

This article by W. A. Scott Murray was originally published in the June 1982 issue (pg. 80) of Wireless World.

Link to plain html file: Theories-and-Miracles--Scott-Murray-June-1982.html. This is still the best way to read a text article (zooming in/out re-typesets the entire article). Download the file and open in any browser to read.


The phenomenon of the radiation of light and radio energy is a "miracle" — a well-established physical occurrence for which science can offer no physical explanation. Modern technology uses these radiations and others every day without understanding them. Progress toward understanding such things effectively came to a halt in about 1920, after which fundamental concepts in physics began to become confused and mutually contradictory. This lack of progress may have been due to one of two possible factors. Either Nature is too mysterious for us to understand, so that it is not worth the bother of trying, or our fundamental thinking may have taken a wrong turning 50 years ago. There are historical precedents both for such errors and for conservative pressures against correcting them. Nevertheless, enough material now exists to warrant a major re-think, based on a return to the earlier philosophy of realism in physical science which reflects the underlying simplicity of Nature.

Many thousands of professional radio engineers can design television transmitters, and almost anyone can build a radio receiver, but there is nobody who can explain in a plausible and watertight way how radio energy comes to be transferred from the Crystal Palace transmitting tower to the H-aerial on the roof of my house. This transfer of energy — the radiation process — is miraculous, if we define a "miracle" as a physical occurrence for which we can offer no physical explanation. (I'll just say that again: a miracle is a physical occurrence for which we can offer no physical explanation). It is just over 100 years since James Clerk Maxwell gave us a good working description of what happens — the equivalent of saying that if you lie in hot sunshine you will get sunburned — but he did not explain the radiation phenomenon; and nobody has explained it since.

Here, then, is a fine example of modern technology in action. We know how to build a radio transmitter and we can calculate very accurately what will happen when we switch it on. Something will travel from transmitter to receiver at the speed of light, and we shall be able to detect its arrival and make whatever use of it we please for our convenience and entertainment. But except that it may consist of physical energy, or at least that it may carry physical energy with it, we have no idea what it is that does the travelling.

Confronted with this true statement of our human ignorance, ninety-nine people out of every hundred will probably say they do not care. The radio is for listening to, not wondering about; wondering about such things is a job for scientists. But now we come to the crunch, for I have to make a similar report to you about the attitudes of the scientists themselves. Nine out of every ten physicists today would also say they didn't care — they are far too busy to be bothered with such abstract, impractical matters. On the other hand, the one physicist in ten who does care about such things is likely to be seriously worried.

If one were to identify and question this minority, their consensus view would almost certainly be that vast gaps exist in our knowledge of physical phenomena that take place not only in complex laboratories and remote galaxies, but also "right on our doorstep" — of which domestic radio radiation and sunlight are commonplace examples. From a purist point of view it is a pity that our progress in understanding such things should have come to a grinding halt in about 1920. (The fundamental basis for atomic energy was laid by Einstein in 1907, and that for the laser in 1917.) Of the new concepts which have arisen in physics since that time very few, if any, have dealt credibly with fundamental matters. I include in this category the major speculative adventure of the 1930s, which failed amid general confusion and is one of the main topics to be examined here.

There would seem to be little doubt that progress in fundamental physics, as opposed to technology, has not kept pace with contemporary progress in other branches of science during the past fifty years or so. It should have done, in view of the number of physicists at work all over the world, but it hasn't. Every now and then, it is true, some new hypothesis seems locally promising and is hailed as a triumph; but when one seeks to apply it elsewhere it does not fit, and it leads one sooner or later to a logical impasse. Nowadays, for reasons that we will explore in due course, we no longer reject a failed hypothesis as we should, but instead we tend to retain it on the pragmatic basis that it may prove more useful to have wrong concepts than no concepts at all. From that point it is very easy to forget that they are wrong concepts — scientifically disproved — and instead to go on building upon them as if they were true and valid: an elementary mistake, surely, but one which we go on making.

There are countless examples of this trouble in modern physics, so that it is the rule rather than the exception. The cumulative effect of such errors has been confusion on a majestic scale. We are left with a tangle of separate, uncoordinated, and very often mutually-exclusive concepts. "Sometimes light behaves as waves, sometimes as particles", it is said, yet the concepts of electromagnetic light-waves and particles (photons) are mutually exclusive. Our picture of the physical world has become less clear, rather than more clear, with the passing years. This, I submit, is evidence of a lack of progress. In the 1980s we have to admit that we have not yet found answers to some simple but important questions which were asked as long ago as 1920, and even earlier.

Now when you have been searching diligently for something for fifty or sixty years and failed to find it, it may be sensible to pause and consider whether there might not be some reason for the failure. In our present case two possibilities are more likely than others: either the thing we are looking for doesn't exist, so that we are mistaken in looking for it, or we are looking for it with the wrong kind of spectacles. Let us examine these two possibilities in turn.

There is a doctrine of modern physics, whose origins we will identify later and criticise, which says that scientific theories are limited in their application to providing descriptions of physical events, and are intrinsically incapable (in an absolute sense) of explaining them. According to this doctrine, questions of the nature "what happens?" may give rise to descriptive answers — in numerical detail, of course — and are legitimate questions, whereas questions of the type "how?" or "why?" cannot be answered by science and are therefore improper questions which should not be asked.

To take an example, experiments show convincingly that all negative electrons are identical in their behaviour — "indistinguishable" in the approved jargon — and that short of its complete annihilation the physical properties of an electron never vary in any way; one never comes across bigger or smaller electrons, or parts of an electron. Now: to the question "Why is the structure of an electron so phenomenally stable?", current doctrine returns the answer that the mass of the electron is so small that its structure must be quantum-indeterminate, which means that the question of its mechanical stability does not arise. That question is a non-question, an irrelevance that does not require an answer.

For convenience of reference I propose to call this the Doctrine of Haziness: "Microphysical entities are hazy, and one should not ask old-fashioned questions about them". Personally I am very suspicious indeed of this doctrine. It seems to be just a little too flexible in its application to be intellectually honest. For instance, in another example,

Question: Why are the wavelengths of the spectrum lines from a gas in a discharge tube so precisely defined?
Answer: Because the permitted energies that electrons can assume within the atoms are precisely quantized.

Question: Oh — I thought it was the electron's angular momentum that was quantized?
Answer: That is also true. Both energy and angular momentum are precisely quantized.

Question: If that is so, then the position of an atomic electron must be precisely determined. How far is it from the nucleus?
Answer: We cannot tell you that, because of the Uncertainty Principle of Professor Heisenberg. We can only tell you where you are most likely to find it.

Question: So its energy and momentum are in fact not precisely determined?
Answer: That is so; they may take on any values within Heisenberg's limits.

Question: Then why are the spectral wavelengths, which you now say are dependent on indeterminate energy and momentum, themselves precisely defined?
Answer: Your questions presuppose that the atom has a mechanical structure. Our modern theory is a mathematical theory, not a mechanical theory. Hence the questions you ask are meaningless.

Question: But I thought you said the mathematical theory dealt with energy and angular momentum. Are these not ordinary mechanical quantities?
Answer: You are wasting my time. It is a matter of statistics. Look up the theory in any textbook.

You will have noticed the testiness of tone which arises characteristically at that point in the discussion. We shall look into that little "matter of statistics" and form conclusions about it which are not entirely conventional. As I said earlier, the doctrine of haziness seems a shade too convenient to be true. It enables its adherents to wriggle out of logical impasses by sheltering in mysticism, a particular mysticism which as we shall see is linked directly to an unexpected and, as I shall assert, erroneous and quite unjustified denial of the Law of Causation. These are deep waters which can bear being looked into. The doctrine of haziness also offers comfort to the lazy physicist (or shall we say, the too-busy physicist?). Current theories suggest that Nature may be stranger than our forbears thought, for human understanding. If so, we should not be surprised that we have made so little progress recently. (I need hardly emphasize that if this defeatist attitude should become held generally — and it seems to be gaining ground — it must spell the end of the philosophical road for physical science.)

The other possible explanation for our failure to achieve that steadily-improving understanding of the working of the physical world which human instinct (and previous experience in physics, and current experience in other disciplines) suggests we ought to be achieving, is that there is something there to see but that we have been looking for it with the wrong spectacles. We cannot see radio waves or electrons with the naked eye, of course, but we infer their existence from the readings of our instruments. Our "electron spectacles" are not the instruments we use, but the scientific theories with and against which we interpret our observations. A current theory is an expression of a contemporary attitude of mind.

We can be, and historically often have been badly misled by our theories. To take a classically familiar example, in times past the motion of the planets across the night sky could be described to any desired degree of accuracy on the basis of the Earth being the dynamic centre of the universe. It could be explained — that is, accounted for rationally with a minimum of underlying assumption — much more readily by means of a Sun-centred theory. From experience we have come to believe that the more closely a scientific theory reflects the mechanism of the physical world, the simpler will its concepts appear and the wider will be its field of application. In this example, planetary astronomy had been bogged down for a thousand years under the geocentric theory, and progress had virtually stopped. Further advance depended on the rejection or overthrow of the geocentric theory and its replacement by the alternative which is still in use today. And what an advance that proved to be! One of its earliest consequences was Newton's law of universal gravitation.

We may perhaps read that experience across into the area of fundamental physics where our recent progress seems to have been surprisingly, and disappointingly, slow. Slow progress does not prove that anything is wrong with our current theories and doctrines, but it raises that possibility. It is possible that some of our fundamental thinking may have been on the wrong lines (and by wrong lines I mean lines which do not accord with those of physical Nature). If so, then much of the elaborate, self-generating and untested structure of mathematico-physical theory that has been built up during the past fifty years may turn out in the end, to have been irrelevant, if not actually misleading. I am suggesting that the time is now ripe for a critical review of modern physical theory, much of which has not been of a type to inspire confidence.

There was for many years a powerful body of opinion which in the teeth of all the evidence for the heliocentric theory maintained that the Earth, as the abode of Man, must be the centre of the physical universe. To such opinion no factual proof was convincing: one can neither prove nor disprove an Article of Faith. Thus the ancient polarisation between churchman and scientist tended to continue. Yet it is a feature of modern physics, unexpected but explainable, that in its philosophy it is more akin to a religion than to a classical science. Mysticism has returned in a big way. It seems that in the fundamentals area we are dealing with matters of faith and doctrine, dogma and heresy, so that formal experimental proofs are no more to be expected in fundamental physics nowadays than in a theology. There may even be resentment against anyone who presumes to question the One True Faith; but this time the conservative Establishment is likely to be found within the ranks of science itself.

The significance of that remark will become clear when I declare my main thesis, which is that physical science made a sequence of errors during the 1930s from which it has never recovered. I am in good company in this, since that view was to a greater or lesser extent shared from the early days of Quantum Theory by Einstein, Planck, von Laue, and Schrodinger, all of whom were central in the original arguments. Theirs was a "realistic" view, which in the climate of the times did not prevail against the novel, mystical doctrines of Bohr, Heisenberg, Dirac, and others. The last-mentioned became established and remain formally accepted today. But attitudes may now be changing after fifty years: at any rate I hope so. I propose to identify some of the errors in the 1930's doctrines, show that they were indeed errors, and show how they came about. To my physicist colleagues I say, If your faith is not strong enough to withstand such criticism you should read no further, for I have no wish to cause you offence. To the layman I say, Here for your entertainment is a real-life, up-to-date version of Hans Andersen's famous story of the King's New Clothes.

To sum this up: every scientific theory is somebody's particular pet. Rather than attack the established theories of physics — which would force their doting owners to rush to their defence, and lead to quite unnecessary altercations — I propose to examine a selection of miracles. A miracle, you will remember, is a physical occurrence for which we can offer no physical explanation. There are plenty of miracles to choose from, so we can afford to be selective. We shall find that our miracles have a certain hallmark about them, from which we can deduce not understanding, perhaps, but clues towards understanding. The nature of current theories will become clearer, so that we shall discover when it is safe — philosophically safe to use these theories, and when dangerous. When fully developed this technique should enable us to judge the physical credibility of any new hypothesis, providing us with a critical faculty which in recent times has been woefully lacking.

The first miracle we shall examine will be the one I mentioned at the opening, namely the mechanism of the transmission of light energy through empty space. Our first philosophical milestone will be consequential and closely related to it: an understanding of the true function of "waves" in modern physics. We shall have to go back some 200 years in scientific history to find a suitable starting point. Our route will take us from Newton to Heisenberg: via electromagnetic theory and the acute distress it suffered when denied an aether; via practicable photons, quantization, non-existent matter-waves, and a restricted Principle of Indeterminacy; and ultimately to an affirmation that the Law of Causation is obeyed in physics not only statistically but in all circumstances. In each of these areas I will present ideas for your consideration which although far removed from conventional scientific doctrine are yet strictly in accord with the findings of experiment. These ideas will add up eventually to a self-consistent whole, but not yet, I regret, to a fully-developed Theory.

All that I have to say is very simple, and indeed I hope to show how simple Nature really is when the dust of man-made confusion has been swept away. William of Occam said that fundamental assumptions should not be multiplied unnecessarily, and I am a follower of William of Occam.

Saturday, February 8, 2020

On Teaching Mathematics

Mathematics is a part of physics. Physics is an experimental science, a part of natural science. Mathematics is the part of physics where experiments are cheap.Vladimir Igorevich Arnold

That insightful opening line of Vladimir Arnold's essay: On Teaching Mathematics, is the attitude towards mathematics that has motivated me the most to learn it.

Saturday, April 6, 2019

Gott ist der große Ingenieur.

Gott, der große Ingenieur. ('The Ancient of Days' by William Blake.) Douglas Adams' character, Slartibartfast the Magrathean, seems to be based on the 'Ancient of Days'. He is the chief designer of planet Earth, and is especially proud of designing the fjords of Norway.

Gott ist der große Ingenieur, means God is the great Engineer or దేవుడు మహా యాంత్రికుడు

Conversely, it also means the great engineer is God and it is this latter interpretation that I prefer. Becoming a great engineer is the closest to the idea of God that one can hope to attain. 

No amount of rituals, chanting mantras, or meditation on Brahma[n] is going to get anyone closer to God. Understanding how the world works using the methods of science and applying that knowledge with engineering to make the lives of people around us better, is the way to godliness. To make real changes for the better, it is necessary to understand both the physical world and, more importantly, the social world, and it is these issues that I want to explore in this blog. 

Personally, I believe the trio of great electrical engineers: Michael Faraday, Nikola Tesla and George Westinghouse have done so much to ease humanity's existence that they deserve all the honor that is unnecessarily wasted on the many false, made up, imaginary Gods who amount to no more than a Russell's teapot

By my deeds, I honor them. V8, or more appropriately, E8!

Follow by Email

A Better Way to Implement Affirmative Action: Competency Exams Instead of Competitive Exams will Automatically Ensure Proportionate Reservation

A Better Way to Implement Affirmative Action: Competency Exams Instead of Competitive Exams will Automatically Ensure Proportionate Rese...

Blog Archive