Sunday, May 03, 2015

[foqmkvcm] How many trial divisions?

When testing a random integer for primality, first try dividing through by some number of small primes before moving on to the Miller-Rabin algorithm.  How many primes should be tried to minimize the total expected running time for a given size integer being tested?  This seems a tricky theoretical problem involving the running time of modular exponentiation and the density of primes, as well as a practical implementation optimization challenge.

Empirically, that number seems to be in the thousands for RSA primes.

Saturday, May 02, 2015

[lrgprzjt] 4 map projections

The central map is, say, Winkel tripel, which leaves empty space in the corners.  In these corners are small auxiliary maps, probably a different projection, covering the areas with high distortion on the main map: views from the north and south poles, and from over the Pacific Ocean.

This does practically accomplish projecting onto a plane the entire surface of the earth with low distortion, albeit being not connected, and in a one-to-many mapping.  It is curious that 4 maps suffice, not needing 6 as in the vertices of an octahedron or faces of a cube.

Inspired by a classroom map which did exactly this, but omitting the Pacific view.

Monday, April 27, 2015

[dwqjanwz] 12 tribes

Place 2 of the 12 vertices of a regular icosahedron at the north and south poles of the earth.  A third vertex on the prime meridian, though there are two ways to do this.

Where do the twelve points end up?  If given complete freedom of rotation around the north-south pole, can the other points hit somewhere interesting?

The points define centers of 12 pentagonal spherical patches arranged like a dodecahedron.  Can those areas be made to coincide with something interesting?

Inspired by: air travel makes transportation between any two points on earth equally easy, and technology makes communication the same, so it no longer makes as much sense for political boundaries to be defined by geographical physical features.  But suppose we do still want to partition the planet into regions for some reason.  Geometry would be elegant and precise.

[imxscmnf] Function call syntax

A brief survey of syntax used by different programming languages to express calling a function:

Calling a one-argument function:
f x
(f x)
f(x)

Calling a two-argument uncurried function:
f x,y
f(x,y)
(f x y)

Calling a two-argument curried function:
f x y
((f x) y)
f(x)(y)

Calling a zero-argument function:
f
(f)
f()

Intriguing but not implemented as far as I know is a Lisp-like language that prefers currying and partial application like Haskell.

Thursday, April 23, 2015

[nxtkenva] Avoiding being manipulated by victim politics

"You are victim.  You are being oppressed." is a common and often very effective technique for political propaganda.  How can you recognize and avoid being manipulated by such propaganda?

One possible way is to reason about the better world being advocated by "joining us".  Is it self-consistent?  Who will do the tasks, hold the roles, currently forced upon the "victims", assuming society will still demand that someone do those tasks or be those roles?  Or, how will society function without anyone in those positions anymore?

Often the propaganda will encourage a deliberate ignorance about such questions: "As victims, it is not our responsibility to deal with such questions. Let the oppressors deal with them." Scientifically, manipulation that encourages people to embrace ignorance is psychologically interesting given we are naturally a thinking, curious species.

Another curious feature of political movements based on inducing a victim mindset is that they are often decentralized, e.g., no charismatic leader.  People join the victim mentality and spread it peer-to-peer to their friends, making it very difficult to resist: you face ostracism from your social group for resisting the propaganda.

[wxhnyuye] Israeli elections here

The Israeli elections of 2015 made abundantly clear that peace in the Middle East is being thwarted by internal political strife within Israel: war wins votes.  Playing up "Us versus Them" encourages people to vote, and in particular, to vote conservative, the party which ended up winning.

Interestingly, this mirrors accusations that the timing of Hamas's attacks against Israel are also due to politicking within their (secretive) leadership.

It would be naive to assume that this isn't also happening in the United States.  Of the many casualties on both sides of the many wars we engage in, who among the dead were mere pawns sacrificed in furtherance of a struggle for internal power within this country?  Needless deaths.

Does this represent a fundamental flaw in democracy?  Can we implement safeguards to prevent it?  It bears a similarity to an economic externality, where a decision affects more than those who participate in the social choice function making it.

Curiously, it seems very difficult to spot this happening from the inside.  From the inside of a democracy, a majority might actually believe -- falsely -- that a given war is justified.  Only when observed from the outside, when we see it going on in another country, do the machinations become easily visible.

Saturday, April 18, 2015

[atrvrtqr] Game of Wands

Many, including the author Rowling (!), are unhappy that Hermione ends up with Ron at the conclusion of Harry Potter.  But it's just a piece of fiction, so others can fix it (as soon as copyright expires in the far, far future).

Better would have been if the characters are put on the trajectory that strongly suggests Hermione will end up with Harry (arguably the series already does this), but then surprises readers by tragically killing her off in the final battle: Voldemort finally gets defeated, but at what cost?

The survivors gaze at the giant crater where Hogwarts used to be, a physical parallel to the hole they feel in their (and the readers') hearts.

Previous tragic ending.

Friday, April 17, 2015

[vkwozuxl] Blues mashup

Given that many blues songs follow the 12-bar blues chord pattern, creating mashups of lyrics should not be too hard.  Find some interesting juxtapositions of songs.

Inspired by the "Four Chord" song by Axis of Awesome.

Thursday, April 16, 2015

[dotvtisb] How varied are birds?

Did the most recent common ancestor of all of today's birds live before or after the asteroid impact?  This seems the principled way of establishing whether birds are dinosaurs.

Monday, April 13, 2015

[zypheoxn] Keyboard as hand warmer

Laptop keyboards have the unexpected feature that they are hand warmers: the heat from the computer leaks out the keyboard.  This is especially useful in a cold environment: typing with cold fingers is very unpleasant.

Make this feature official: provide a UI to control keyboard temperature.  Depending on the settings, the computer might rev up the CPU to do busy loops or mechanically adjust how much heat goes to the keyboard versus how much to (say) fans out the side.  This seems hard.

Provide this feature somehow to desktop keyboards.  Perhaps tie it into a liquid cooling system in the case.  This also seems hard.

Sunday, April 12, 2015

[mmcqiash] Using jazz to oppress

"Weaponizing Mozart" described how classical music is being used to make the "wrong" kind of people, the lower classes, feel unwelcome from some place.  I have noticed jazz being used in a similar way at a restaurant seeking a "classy" clientele.

The tremendous irony is that jazz was invented by the very lower social class now being targeted to feel unwelcome, namely African-Americans.  Given that jazz is a contemporary music form, a recording might even find its way to be used against the very performers in that recording, a weapon, a signal to indicate "keep out -- whites only".

(But is this new?  The upper classes have always employed the lower classes to be entertainment.)

Does this help explain the dearth of African-Americans at swing dances? DJs at dances are certainly instructed to play only "classy" swing tunes.

[zsnsfdwz] Dance, monkey, dance!

Each class of society employs the social classes below themselves to provide entertainment, everything from sports to music.

Who then do the lowest classes employ for entertainment?  Hypothesize that the answer is animals.  This provides a model that can predict for whom animal-based entertainment such as dogfighting and cockfighting will be popular.

Thus, movements to ban such entertainment are not actually about preventing cruelty to animals but are instead class warfare in action: those who have enough wealth or status to purchase and enjoy entertainment from lower classes are committing oppression against those who aren't, attempting to deny them entertainment.

Of course, the interesting paradox is that those who strongly advocate against animal cruelty in entertainment, stereotypically the bleeding-heart liberals, also tend to feel strongly and be vocal about not committing cultural oppression on others.  Why do they not see the paradox in their own behavior?  (Doublethink.)

One possibility is believing the fallacy that what I find entertaining you will also, so there is no harm in eliminating your favorite genre of entertainment: substitutes will be equally or sufficiently satisfying.  But this seems naive: everyone can look around them and see people enjoy different things (but never questioning why there are such differences).

Another possibility is that a set of beliefs, even if paradoxical, defines a social identity, and social group membership depends on continuing to believe the paradox.

Saturday, April 11, 2015

[xybffmrr] Good cop bad cop

There are two contradictory viewpoints about the police as an institution and how the institution induces police brutality.

One viewpoint is, the institution has many safeguards to weed out bad people, so is mostly populated by good people who want to do good for society.  No set of safeguards are perfect, so some bad cops do make it through, and given police by the nature of their profession end up in high pressure situations with little margin for error and high stakes, both the mistakes by good cops and the malice by bad cops become unnaturally magnified.

The other viewpoint is, the institution of policing preferentially selects for bad cops, or causes good people to become bad via the Lucifer Effect.  The overarching mechanism is that society does not want police to do good: it instead wants police to maintain order.  And maintaining order necessarily means maintaining the stratifications of society, keeping down the lower classes.  Police that accomplish maintaining order -- by whatever means -- are preferentially hired, not fired, and promoted.  For the most part, society, especially the upper classes, are willing to look the other way so long as order is maintained.  (All these cameras are beginning to make it difficult for society to look the other way.)  Police forces hire heavily from the military, and military training is of course about learning to suspend the natural instinct for compassion and to obey orders to kill enemy soldiers without hesitation.

(We've expressed these viewpoints in terms of "good" and "bad", which might be philosophically shaky ground.)

It is important to establish which viewpoint is correct in order to properly formulate policy.  It might be that both mechanisms are occurring, but we need to know which is the stronger effect.  I strongly suspect the latter is the stronger effect: as good as the people within a police force might hypothetically be, they cannot escape the incentives society places on them.

If the latter viewpoint is true but we formulate policies assuming the former to be true (wishful thinking), it will be a waste of time and effort.  No additional safeguards to weed out bad cops or to prevent bad behavior will be effective, because society will counterbalance it, somehow, with more incentives or mechanisms to maintain order.  We predict the oversight of police will do "one hand giveth while the other hand taketh away" for the net maintenance of the status quo.  (Previously, predicting lynching.)

If the latter viewpoint is true, then the correct course of action seems a wholesale dismantling of the current institution of police, and rebuilding it from scratch with entirely different goals and incentives.  I'm not sure how the new institution should operate, though one step might be to ban ex-military from police forces.

[rjmfajpu] DoSing driverless cars

A self-driving car will, when in doubt, err on the side of safety: not moving.  Those mechanisms can therefore likely be fooled by an adversary to make the car forever not move: denial of service.  Perhaps a radio to fool the car's radar.

A human driver would eventually realize he or she is gettin' punked and ignore the distraction. But driverless cars are not expected to have a human passenger be able to override it, because the human might not even know how to drive.  Perhaps a remote operator for unusual situations, though the communication channel could be jammed by the adversary.

Friday, April 10, 2015

[ntqhgtdh] Comparing Wikileaks CableGate and cables.csv

The complete collection of cables published as a SQL dump by Wikileaks ("Cable database in searchable format - for developers (updated!)") has substantial differences from cables.csv whose password was divulged by David Leigh in his book WIKILEAKS: Inside Julian Assange's War on Secrecy. Here are some scripts to compare the two, assuming you have both sources. (cables.csv from z.7z on cryptome.org .)

The methodology was to reformat the CSV to look like the SQL dump, perform some normalization, then compare the two dumps. The scripts find 5189 cables which differ, though this likely still includes many trivial formatting differences.

Technically, one interesting difference is that the CSV contains timestamps at minute resolution, while the SQL dump has the timestamps "fuzzed" to a resolution of one day: all messages are at midnight. However, often (but not always), the timestamps are also present in the header text of both sources.

More substantially, the SQL dump has quite a few redactions, often replaced with "XXXXXXXXXX" or ellipses "...".

(See also previous post about Cablegate.)

[nllmamas] Larger tribes

The story goes, humans have evolved not to be able to function well in tribes of size larger than about 100.  Suppose we wish increase that number through eugenics: we argue that the ethical problems of eugenics are outweighed by the fact that this instinctive behavior is the root cause of tremendous conflict in the modern world and is drastically preventing the forward progress of the human civilization.  We will need to work in teams larger than 100 to build starships.

How would we do this?  What genes code for "tolerable tribe size"?

What would human society freed of tribalism look like?  Perhaps a Borg hive.

Perhaps the eugenics has already been done: a master can command more than 100 slaves.

[zufztltm] King mountain

Monterey Montreal

(Royal mountain)

Wednesday, April 08, 2015

[evmbozjg] 7 segment Hamming

The segments of the common seven-segment numerical digital display are just enough encode 4 bits of data using the Hamming (7,4) error-correcting code, correcting and detecting up to 1 error.

[ermtkvyo] Divorces and welfare

Hypothesize that some marriages break up due to the stress of economic hardship.  Correlate the size of the social safety net, welfare, with the divorce rate.

[dqfewwgx] Man in search of a vision

Hypothesize that society produces at an appreciable rate highly capable people who do not know what to do with their abilities, and that the success of institutions and endeavors depend critically on wooing these people to join.  If so, we would expect intense competition for these people, something far more insidious and vicious, with no-holds-barred psychological warfare, than we see in the labor market.

Is such competition occurring but somehow invisible?  Or it could be that the hypothetical assumptions are wrong.

Inspired by, many prominent institutions seem to anchored by a few very capable people.  What would the world be like if they had applied their talents elsewhere?