No way. Given just a differential, just a pair of connections, there's no way for a circuit to tell which is which.
If you had access to phase information about the grid, you might be able to do it, but as the mains frequency isn't terribly constant, you would not be able to rely on predicting this. Your device would have to get information about the present phase angle of the mains from someplace.
However, if you do have a real earth-ground reference from some place, you could build a circuit to look at the voltage of each supply line with respect to ground. One will be a small drop below the full 120 (or whatever the local mains supply) whereas the other will be slightly above ground. (Neutral return current vs your neutral run's resistance). This would just let you know which leg was 'hot', and you could swap your output polarity accordingly.
A Second Thought
If the power supply has only four connections with the world, two from the mains plug, and two to output the DC, there's no way I can think of that you could deterministically set output polarity based on plug orientation.
BUT
if you're willing to make your otherwise simple supply a lot more complex, you could conceivably make it so that if you pulled the plug and flipped it, and plugged it back in straight away, the output would flip.
Here's the idea: You stuff some kind of micro-controller in the box, that monitors the line voltage, and determines when rising-crossing-zero (or some other phase point) happens on one of the legs. You'd have to reference this to the midpoint of the two supply legs via a voltage divider. The micro could then anticipate when the next such phase point would occur. Now you'd also have to put some kind of super-cap in the box and pick a low power micro that could live off the super-cap long enough for the user to flip the plug. When power comes back, either the anticipated phase change happens when you expect, or half-way between. Half-way between means the user flipped the plug, so your micro flips the output polarity.
Of course, that still would be problematic. If the thing had been unplugged for a while, the micro would be dead, and you'd have to make an assumption about what the output polarity should be. Finding a micro that could last maybe 10 seconds on a cap's worth power while actively chugging away could be easier said than done. Last and not least, this would really only be a novelty gadget.
Am I correct that the faster processor draws more power (and thus
dissipates more heat) under a computational load?
Not necessarily. There are two major components of power dissipation - static power (the power you burn when the chip is on) and dynamic/switching power (the power burned when the clock is running). While running the same chip at a higher frequency will result in more power dissipation, a chip may have a static power dissipation that is too high when combined with the faster clock rate to meet the bin requirements for the faster rating.
If so, is the power under computational load approximately
proportional to the rated/clocked frequency? In other words, inasmuch
as the one processor is clocked 8 percent faster than the other, does
it run about 8 percent hotter under load? Another way to ask the same
question is to ask: does each processor process about the same
quantity of data per unit of energy? or, if battery powered, can each
accomplish about as much before its battery dies?
For a given chip running identical calculations, the dynamic portion of the power consumption will be proportional to the clock frequency. The total power dissipation of the processor will increase a bit less than 8% for an 8% increase in clock frequency due to the static power dissipation.
When not under load, do the two processors idle equally cool, or are
there practical or theoretical factors that make the one idle cooler
than the other?
If you had two identical chips idling, the one with the lower clock frequency would dissipate less power. When the chips are idling, the static power becomes a much larger portion of the active power dissipation, so any differences there would be more noticeable.
Even if the processor's price were not determinate, might one prefer
the slower processor merely for the sake of cooler operation and
extended battery life?
Possibly, but again, you have a lot less of a guarantee that this would be the case. If you bought chips with different rated TDPs, then you could safely make this argument. Otherwise, you're at the mercy of the binning algorithm and the consistency of the manufacturer's process. Also, note that we're talking about power dissipation, not energy consumption. A faster processor may be able to complete a computationally heavy task faster, and switch to a low power idle mode sooner than a slower processor.
Would the answers differ for embedded processors?
Yes. The static power dissipation is most significant on the bleeding edge processes that Intel, TSMC, IBM, and Global Foundries use. Embedded processors are often optimized for low static power dissipation and use larger processes where static power dissipation is a much smaller portion of power dissipation. The variation at those larger process nodes is much less, so microcontrollers are much less susceptible to variation in power and frequency performance.
Best Answer
Yes, it is related.
In early TV implementations, it was not easy to remove all of the AC line ripple from the DC power circuits that drove the CRT, and this resulted in a slight variation in intensity from top to bottom. It was found that if the vertical frequency of the TV signal was the same as the power line frequency, these intensity variations would appear in the same location on every vertical sweep, effectively causing them to "stand still" on the screen, and this was much less objectionable than having them drift up or down.
There are also sources of RF noise that are related to the power line frequency, and the visual artifacts caused by that kind of noise also stand still on the screen.