Showing posts with label communication. Show all posts
Showing posts with label communication. Show all posts

Sunday, March 4, 2012

how to merge

In the modern world, the proliferation of automobiles as a means of transportation has given rise for the need of a special type of technique: a technique which will allow two paths of automobiles to join together, creating a single path. Especially difficult is the situation where the two paths are of automobiles traveling at different speeds—how can they safely and efficiently be combined?

In the South, we've developed a solution to this problem we call "merging." The basic idea behind merging is that drivers on the slower path and those on the faster work together to maximize their safety and their efficiency.

Step 1: drivers on the slower road who are "merging" onto the faster road accelerate as they approach that road until their speed closely approximates that of the faster road.

Step 2: now that these drivers are traveling at roughly the same speed as the faster road, they can insert themselves smoothly in between two autos on the faster road.

Step 3: in order for this to occur smoothly, both the merging driver and drivers on the faster road must be sensitive to the vehicles to their left and right, the respective speeds of those vehicles, and, crucially, the lines of sight of those vehicles. In particular, slight tweaking up or down of the speed of either the merging car or the car on the main road may be necessary in order for merging to occur with maximum smoothness. Of course, this sensitivity and cooperation is needed anyway in order for drivers on a multi-lane highway to interact safely. So, merging requires no techniques other than those required for safe driving anyway.

The great thing about "merging" is that is both safe and efficient. These two facts follow from a basic property of the relation between speed and distance: the relative distance a car travels in a given period of time is directly proportional to its speed. More speed, more distance covered; less speed, less distance covered.

When a merging auto is close in speed to the road on which it will merge, the procedure is maximally efficient because it necessitates at worst only minor changes in the speed of autos already on that road and, at best, no changes at all. The procedure is maximally safe because it ensures that the distance on the road required for cars to tweak their relative speeds in order to converge is minimal, so there is maximal flexibility in the avoidance of accidents between merging cars and those they merge with.

Contrast this with the suboptimal solution to this coordination problem which is apparently implemented in the northeast. This solution requires the driver from the slower road and the driver from the faster road to play very different roles. The slower driver plays a role called yielding while the faster driver plays a role called being an asshole.

Yielding just means "slowing down dangerously before moving into a faster stream of traffic." Because the yielding auto increases the difference between its speed and that of cars traveling on the road it wishes to join, it increases the distance needed for either itself or for those cars to adjust their speed enough to intermingle. This means both that the process is more dangerous (since there are greater distances on the road during the process at which there is risk of a collision), and less efficient (since it creates a greater risk the auto will enter the faster road at a less than average speed, necessitating the slowing down of the faster road).

These effects are exacerbated by the role played by drivers on the faster road of being an asshole. Being an asshole just means that whenever a slight tweak up or down in speed would allow the slower auto to merge smoothly, you instead accelerate into the space the slower auto would most naturally take, necessitating that they slam on their brakes, increasing the risk of accident to all parties and, crucially, trading off a risky gain in speed for one driver against maximizing the overall average speed of the road as a whole.

Of course, there are two situations under which the yielding + being an asshole would be safer and more efficient than merging. To find these situations, we simply apply our basic rule of the relationship between speed and distance again. Since we know that the combining of two streams is efficient if autos on the faster stream apply minimal breaking when a slower stream is combined, then one way to ensure that the yielding + being an asshole is relatively efficient is if distances on average between cars on the faster road were extremely long. This would ensure lots and lots of leeway for the converging auto to increase speed without danger of accident or slow down.

A second way to ensure that yielding + being an asshole were safer and more efficient than merging would be if the yield points both a) had a very long ramp before combining with the faster stream of traffic; and b) had very good visibility behind the yielding car so its driver could actually judge the distances and speeds of cars on the faster road before ending its yield. If this situation obtained, then one could ensure all the benefits of merging without the necessity of the cars on the fast road cooperating rather than being assholes.

As a matter of fact, neither of these situations obtains in the northeast. In fact, quite the opposite: highways are in general very very crowded, and on ramps are in general very very short.

I find this situation bizarre and confusing.

Saturday, April 16, 2011

from the pale king

The next suitable person you're in light conversation with, you stop suddenly in the middle of the conversation and look at the person closely and say, "What's wrong?" You say it in a concerned way. He'll say, "What do you mean?" You say, "Something's wrong. I can tell. What is it?" And he'll look stunned and say, "How did you know?" He doesn't realize something's always wrong, with everybody. Often more than one thing. He doesn't know everybody's always going around all the time with something wrong and believing they're exerting great will power and control to keep other people, for whom they think nothing's ever wrong, from seeing it. This is the way of people. Suddenly ask what's wrong, and whether they open up and spill their guts or deny it and pretend you're off, they'll think you're perceptive and understanding. They'll either be grateful, or they'll be frightened and avoid you from then on. Both reactions have their uses, as we'll get to. You can play it either way. This works over 90 percent of the time.

~ David Foster Wallace in The Pale King:

Tru Dat.

Sunday, February 20, 2011

quantum cryptography

Suppose I want to send a message to you in complete secrecy—is there an unbreakable code I could use?

First, notice that any string of symbols can be coded via a string of numbers, and any string of numbers can be represented by a string of 1s and 0s. So, for the remainder of this discussion, let's assume that the message is a sequence of 1s and 0s.

An unbreakable code is provided by the one time pad. This is a randomly generated sequence of 1s and 0s as long as the intended message. If both you and I have access to the same one time pad, then I can take my message and add it to the pad mod 2 (i.e., 1+1=0, 0+0=0, 1+0=0+1=1) before sending it to you. When you receive it, you subtract the one time pad from it to recover the message. If the signal is intercepted, however, it is impossible to decode, because it is completely random, i.e. it contains no information about the contents of the message.

Although a code using a one time pad is unbreakable, it is not necessarily secure. The one time pad must be written down somewhere and communicated from me to you. In the act of getting the one time pad to you, I expose it to interception by whomever we are trying to conceal our communication from.

Is there a completely secure means of establishing a one time pad for us to use?

Before answering this question, let's answer a more general one—is there a completely secure means of transmitting a sequence of 1s and 0s?

One answer is provided by quantum cryptography. Photons (and other quantum particles) have an odd set of properties. One of these, called "spin" has these useful features:

1. It can be measured at any orientation, but at only one orientation at a time.

2. When measured at a particular orientation, there are two possible outcomes ("spin up" or "spin down"), which can only be predicted probabilistically, and therefore constitute a source of randomness if no prior information about the photon's history is available.

3. If the photon is measured again at the same orientation, it will satisfy the same value.

4. If the photon is measured at a different orientation, then it's outcome will again be inherently probabilistic. Furthermore, if, after being measured at a second orientation, it is measured again at the first orientation, it will no longer satisfy the original outcome, but will have returned to behaving probabilistically.

So, suppose I want to send you a sequence of 1s and 0s. I could measure the spin of photons at a particular orientation. If I want to send a 1 and the photon has spin up, I let it stream to you. Likewise for 0. If the spin of the photon disagrees with the digit I want to send, I merely intercept it and prevent it from passing to you. If you know the orientation of my spin measurement machine, then you can measure the photons as you receive them and reproduce my message.

Any potential interceptor who does not know the orientation of our spin measuring machines will get a random signal if he attempt to measure the photons at the wrong orientation. Furthermore, you will know that he has intercepted the message since when you measure the photons at the correct orientation, they will behave probabilistically, instead of reproducing my [meaningful] message.

OK, but suppose the interceptor knows the orientation of our photon machines? Here is where a one time pad would allow us to still send a completely secure message. But how can I transmit the one time pad to you given that our communication channel has been compromised.

Now we reach the beauty of quantum cryptography.

Procedure for transmitting a secure one time pad, courtesy Simon Singh's The Code Book.

You and I use two orientations for our spin measuring devices. We can communicate these exact orientations over an unsecure channel if we'd like—I could simply call you on a telephone and tell you what they are, for example.

Now, I measure a large number of photons, randomly switching between the two orientations of my spin measuring device. You receive the photons and measure them with your spin measuring device, also switching randomly between the two. Obviously, you don't know the random sequence of orientations I used, so sometimes your choice of orientation matches up with mine, and sometimes it doesn't. When it does, you measure the same value for the photon's spin as I did; when it doesn't, you get an outcome which is random and meaningless.

Next, I contact you on an unsecure line (e.g. the telephone), and tell you the sequence of orientations I used. After each one, you tell me whether the orientation you chose at random matches with mine, or not. If they match, we keep that digit; if they don't we simply discard it. This produces a sequence of 1s and 0s that we both know, but are known by no one else. I know them because I measured them, you know them because you measured them. Furthermore, they are completely random because the initial measurement outcomes were random, my choice of orientations was random, your choice of orientations was random, and, consequently, the instances of match between these choices of orientation were also random.

This sequence of 1s and 0s can now be used as a one time pad to send a completely secure message.

What about our eavesdropper? He knows the two orientations we chose, because he can certainly tap our unsecure phone calls. He also knows the sequence of instances in which our choices of orientations matched up, so he knows which photons in the sequence established the one time pad. But he doesn't know from eavesdropping on our unsecure line the outcome of these measurements, so he doesn't know the sequence of 1s and 0s, so he doesn't know the one time pad.

But what if he had tried to intercept this pad-establishing sequence? Since both you and I chose our machine orientations randomly, he could not know this sequence while intercepting the photons. If he likewise chose a random sequence of orientations for his machine, then he would invalidate any of your measurements at a different orientation. But this won't help him decode the message I send—he'll simply

What's the best case scenario for our eavesdropper? He'll be able to decode those characters in my message for which all three of us chose the same orientation of measuring device (the agreement between you and me meant it was added to the one time pad, the agreement with him meant he knows the correct value and didn't convert the photon to gibberish). Assuming we're all choosing between 2 orientations at 1/2 chance, this should only occur 1/2(1/2)(1/2)=1/8 of the time. But you and I are only using digits when we've matched up, so our chances are removed from this equation. Ultimately, he'll potentially be able to decode 1/2 the characters in our message. However, after sending a single message via this method, we'll know there was an eavesdropper, since half the characters will be gibberish.

We can diminish the eavesdropper's ability to decode a single message by increasing the number of possible orientation we switch between. With 3 orientations, he should only be able to decode 1/3 of the characters, with 4, 1/4, etc. Of course, increasing the number of possible orientations means sending a significantly longer string of photons in order to establish the one time pad, but if the process is automated (and the intended messages sufficiently short), this trade-off in time might be trivial compared to the gain in security. In principle, we can reduce the percentage of characters the eavesdropper could decode (again, from the first message sent, since after that, we'll know he's eavesdropping) indefinitely.

Tuesday, May 1, 2007

the tyrrany of the media

A nation full of bees: they work work work all day long, and at the end collapse into their hexagonal chambers. There, ensconced in warmth, they are fed dripping elixir through long feeding tubes, winding from their queen's porous udders down to their mouths, and as they drift into a chemically-induced haze their eyes focus only on small CRT monitors embedded in each cell wall. There they receive the "official story"; there their minds are spoonfed. This is how it happened, and this is what you should think of it. And a thousand drowsy bees murmur "yes, that's what happened; yes, that's what I think of it." For variety, on some days slightly different messages are piped into each chamber. The next day, busy at work, first one bee voices the opinions displayed on his monitor, then another the opinions displayed on hers. In repeating the views they have been fed they feel important, they feel right. They think "I'm arguing; I'm debating; I have my own opinion." Once one has tasted this elixir, once one has viewed the tiny monitor, one can never become a queen.

Tuesday, April 24, 2007

strife among comrades

These palisades high, we scale in concert; these rivers deep, we ford with clever synchrony. Drenched half-way up our thighs, laughing in comaraderie, each slogging minute floats on the breeze as chaff. And sullen gravity's awesome pull, its base, cumbersome chains, can ne'er tie these spirits to the hollow earth. But long in company, we on occasion grow short in temper, and the bitterness of goals as yet unreached turns upon the open face of joy and darkens it with jealous spite. But to triumph was never for the one, and the wise man must bite his tongue until his mouth runs thick with blood. Amongst comrades, even these clouds pass. Amongst friends, a timely blink may mask this passing shadow. These grains of sand upon the seashore of the past, who can count such trivialities? With eyes turned forward, they crunch beneath the feet unnoticed.

Monday, April 16, 2007

the waggle dance

Communication begins with genetic evolution. The most primitive strategies for channeling information are forced upon society by its individuals' DNA. Only later does social evolution take over; here convention reigns supreme. But we who do not dance, we whose signifiers do not measure the signified, but rather indicate it arbitrarily, how can we know the world? Are our signs not too burdened by our prejudice? Are not our signs limited, rather than liberated, by society's caprice? Oh, to dance again, to tell the "truth," unencumbered by the distortions of collective hallucination!