Thursday, May 23, 2019

[dpechwkd] Limited astronomy

Block off the parts of the day in which it is too light out to see stars.  The times of dusk and dawn change througout the year and depends on latitude.

Block off a chunk of the year because it's too cold to be outside at night.  One could formulate a model of this based on latitude.

Block off a chunk of the sky which is too close to the horizon, perhaps obscured by terrain, buildings, trees, pollution.  As a simple model, one can view only within a cone of a specified angle around the zenith.

Block off a chunk of hours that you'd rather be asleep than stargazing.

Narrow to the subset of astronomical objects that are bright enough.

Given all these constraints, what portion of the celestial globe are you able to observe at some point during the year?  Which points at what time?

This could be an app.

Wednesday, May 22, 2019

[pudujsxx] Ultimate slideshow

Create a program that displays a slideshow of every possible picture for given image dimensions.  This is easy: just enumerate all the (w*h*24)-bit numbers, assuming 24-bit color.  Of course, it will take a very long time, much much longer than the age of the universe, to run through the whole slideshow.

One could be more fancy and enumerate YUV420, or even things like all pictures which compress at least a given amount with a given image compression algorithm like JPEG.

To prevent the slideshow from being boring, let's require that successive frames tend to be different from each other.  So, display all possible pictures in a pseudorandom order.

Also, it would be nice to be able to calculate when a specific image will come up in the pseudorandom order.

These two features suggest using encryption.  Enumerate all w*h*24-bit numbers in normal order, then apply encryption as a pseudorandom permutation among w*h*24-bit numbers, mapping to an image.  (Things become trickier with more complicated image formats.)  Decryption of a given image would give you its slide number, when it will come up in sequence.

The most common block cipher modes of operation don't work: In ECB, similar input images will have similar outputs.  Consecutive slide numbers will typically have many identical blocks of bits, and identical input blocks map to the identical output blocks.  With CTR, we use the same initialization vector for each encryption (typically a big no if security were a concern, which it is not for this application) because the output image must be the same size as the input image so we don't have space to store the IV.  Because we would therefore be XORing the same stream each time, similar input will map to similar output.  For the same reason, stream ciphers also don't work.

CBC, again with a fixed initialization vector (probably the zero block for simplicity), will have inputs with the same prefix encrypt to the same output prefix.  If the numbers are encoded big-endian, then this will result in many similar consecutive output images.  However, little-endian would work, because the least significant bits change the fastest among numbers in order.

We could also build our own large block cipher, for example using the Feistel construction, with block size equal to the image size, then use it in ECB mode.

Tuesday, May 21, 2019

[oemcdacs] Language divergence as defense

Language naturally diverges, accumulating idioms and usage differences of separated populations.

This makes it hard to eavesdrop, easy to detect foreign spies, hard to rule a freshly conquered region.

General idea: heterogeneity makes things harder to attack.  What systems induce heterogeneity, people all doing things slightly differently?

Back in the day, Linux installers were bad or nonexistent, so people installed Linux by following rough directions.  Nowadays the style is still present in Slackware, Linux from Scratch.  People are bad at writing and following directions, so this probably resulted in everybody's system being slightly different.  Are such systems more difficult to attack en masse?  After getting in, taking control seems it would require expensive manual interaction to deal with the quirks of each system; it can't be done reliably by a script.

Similar idea in Stack Randomization.

Future post: divergence in social dance.

Monday, May 20, 2019

[chfzdvhx] Megaparsecs per light

The light year is a convenient unit for astronomy because it tells us not only a distance but also how far back in time one is looking.

Now that we have a good estimate for the age of the universe, let's say 14 billion years, a distance expressed in light years also tells us how old some objects like distant galaxies are: just subtract from 14 billion.  For example, a galaxy 9 billion light years away cannot have stars older than 5 billion years, so no sun-like star in it can have left the main sequence portion of its lifespan yet.

Nevertheless, despite this convenience, astrononers seem to like to use parsecs and megaparsecs when talking about distances.  But parsecs are less convenient when we also want the age of something, a problem which we now attempt to alleviate:

Much like how a year can be turned into a unit of distance by multiplying by the speed of light, we can turn a distance into a unit of time by dividing by the speed of light.

parsec/light = parsec/c = pc/c = 1.0292713e+08 second = 3.26 year

A megaparsec/c or Mpc/c is a million times more.

The age of the universe is 4230 Mpc/c.  The age of the earth is 4.5 Gyr = 1400 Mpc/c.

Express your age in parsecs per c.  10 pc/c is a milestone.

Express the astronomical Julian Day in parsecs per c.

Sunday, May 19, 2019

[yheqsptm] Identity politics (not) ending itself

If identity politics is politically effective, then you have deeper problems with your society, typically social inequalities allowing demagogues to manipulate the populace by promising the lower classes more.  Can those problems be fixed through identity politics?

We hypothesize not, because fixing them is not in the best interest of those who gained and maintain power through identity politics.

Inspired in part by King's criticism ("racial nightmare") of identity politics in "Letter from Birmingham Jail".

Saturday, May 18, 2019

[zrzashma] Rook en passant

Consider modifying the rules of chess so that when castling, if the rook starts under attack, or moves through a square that is attacked, it can be captured en passant kind of like a pawn.  This mirrors the prohibitions on the king from castling while in check or castling through check.

(Note that, unlike pawn en passant, a rook can also be captured on its original square as well as its passing squares.  Also unlike pawn en passant, any piece can capture the rook.)

Or, since the rook can normally safely fly through attacked squares, the rook can be captured only if its origin square was attacked.  But I don't like this too much: the castling move is inspired by moving inside the castle, not on the battlefield, so the rook move during castling is not its normal "outdoors" move by a chariot but a delicate and vulnerable indoors move.  We could also easily imagine a chess variant with a different starting position in which the piece that swaps with the king during castling is not the rook.

Alternatively, modify the rules so that there are no prohibitions of the king castling while in check or through check.  This would simplify the game.

Friday, May 17, 2019

[ykqmkuft] Voronoi cities

Draw the Voronoi diagram of the N largest cities in a country, for various values of N.

I think it won't matter that much if two large cities are near each other, as the reader can mentally combine the Voronoi cells into one representing the megalopolis.

Cities represent centers of influence, e.g., commercial and cultural.

Thursday, May 16, 2019

[zdoktiye] The redefinition of the parsec and the (possibly) new value of pi

Originally, the parsec in astronomy was defined in terms of a right triangle with one vertex having an angle of 1 second of an arc = 1 arcsecond = 1/3600 of a degree.  (The other two vertices had angles 90 degrees and 89+3599/3600 degrees.  It was a very skinny right triangle.)  The ratio of the length of the short leg to the long leg of the triangle was tan(1 arcsecond) = tan(pi/(60 * 60 * 180) radians).  This ratio gave the (old) conversion factor between the astronomical unit and the (original) parsec.

Nowadays, as a result of a 2015 International Astronomical Union resolution (according to Wikipedia), that right triangle has been thrown away, and the conversion factor between au and parsec is defined to be exactly pi/(60 * 60 * 180), which is what one would get from the above tangent expression if one defined tan x = x exactly (where x=pi/(60 * 60 * 180)).  The approximation tan x ~= x is good for small angles but exact only at x=0.

Here are the old and new conversion factors.  We underline where the digits start to differ.

Parsecs per Astronomical Unit
old 0.00000484813681113334... tan(pi/648000)
new 0.00000484813681109535... pi/648000

Reciprocal of above, the more common conversion factor:

Astronomical Units per Parsec
old 206264.8062454803... cot(pi/648000)
new 206264.8062470963... 648000/pi

Another way of looking at it is the parsec got longer by about 0.0000016 au.  The au is defined to be exactly 149597870700 m, so the parsec got longer by about 241756 m (242 km).

Are there any astronomical measurements being made in which the difference between the old and new parsec matters?  Maybe things involving interferometry, e.g., VLBI or LIGO.

The right triangle calculation above assumes space is flat and light travels in straight lines.  Of course, general relativity says space is not flat and light curves, affecting parallax measurements.  How much error does the assumption that space is Euclidean induce in distances measured by parallax?  How does that error compare in scale to the scale of the change in the definition of a parsec?  (What are the most important sources of space-bending with regards to the parallax?  Earth, Sun, Sagittarius A*, Dark Energy?)

We might also have light bending due to refraction caused by the varying densities of the not quite perfect vacuum of space.

Just for fun, we could keep the right triangle but redefine the angle that defines the parsec: no longer 1 arcsecond but arctan(pi/(60 * 60 * 180)) radians or 0.9999999999921651... arcsecond, or 00.59 59 59 59 59 59 38 04 03 09 53... arcsecond in base 60.

Incidentally the Taylor series (Maclaurin series) for arctangent converges quickly for these small angles, and is useful for computing the approximate difference between the exact and small angle approximation.

And finally just for fun, we could keep the right triangle and its vertex angle of exactly 1 arcsecond, but redefine pi, specifically the pi used to convert from degrees (1/3600 of a degree in our case) to radians.  Let MP mean old pi, the mathematicians' traditional value of pi.  The new conversion factor stays the same (new) value given above, 0.00000484813681109535... pc/au, now calculated as MP/(60 * 60 * 180).  Then, we want a value of pi such that

tan(pi/(60 * 60 * 180)) = MP/(60 * 60 * 180)

We solve for pi, and get pi = arctan(MP/648000) * 648000, or

pi = 3.141592653565179456360176669261077433...

We have underlined where the digits start to differ from the old value of pi.  The new value value of pi is smaller by about one part in 128 billion (1 part in 128 * 10^9), or 0.00000000078%.

The IAU's new definition of the parsec leading to a change in the value of pi is very reminiscent of Indiana defining pi to be 3.2 by fiat, which also was a result of a geometric construction that only "worked" when pi had the value 3.2.

First the IAU came for Pluto.  Then they came for pi.

Wednesday, May 15, 2019

[xgqfnznw] Moon phase and position

The moon's phase and right ascension in the sky defines, by the geometry of the earth, moon, sun, and background stars, a unique day of the year.

Because a given moon phase only occurs a few times a year, a particular phase and position among background stars probably won't reoccur for many years.  How often does the moon return to approximately the same given position and phase?  The moon's orbit is complicated: lunar precession.  Possibly relevant: Metonic cycle, saros.

One cannot easily take a photograph of the moon among background stars because the moon (or the sun) is too bright.  Best would be to simulate it.  Draw a diagram for a given date.  Recreate the sky on a given special date, maybe for a letterhead.

The moon travels across the background stars at about one moon diameter per hour (units program: "circle / siderealmonth * 31 arcminute", where 31 arcminute is the diameter of the moon).  How faint of stars must be included in the background of a real-time simulation to provide enough texture to notice movement?  How big should the moon be magnified?

Tuesday, May 14, 2019

[lwrzujfd] Helicarrier

Why aren't there airborne aircraft carriers in real life, as depicted in The Avengers, Dr. Who "The Sound of Drums", and elsewhere?

The inspiration was, aircraft carriers already have nuclear reactors on board for power, so the huge amount of power needed to lift a helicarrier could easily be provided by a slightly larger reactor.  The amount of nuclear fuel it would have to carry on board to provide that power would also not be an issue, because nuclear fuel is very energy dense.

Benefits of a helicarrier:

  1. It is a vessel that can transport a large number of aircraft and a runway to anywhere they are needed, just like an ocean-bound aircraft carrier.
  2. It can be stationed anywhere, not just in oceans.
  3. It can travel faster through air than an aircraft carrier can through water, so it can be deployed more quickly.
  4. Because it is high up, an attacker would need to battle gravity even to reach it.  Its higher speed will also make it a little more difficult to attack.

This video calculates (possibly incorrectly, because it omits the significant benefit of the ducts around the propellers as seen in the movie) that the exact design seen in The Avengers doesn't provide enough lift (by only a factor of 10), but more propellers, larger propellers, and faster propellers should be able to lift an aircraft carrier.  The latter two factors provide quadratically more lift.

Difficulties:

  1. Takeoff and landing near propellers which are producing a huge amount of wind might be difficult.  We can easily imagine things going wrong and planes getting sucked into the huge spinning blades.
  2. Nuclear reactors don't like hugely variable power demands, so there might be some issues in getting rid of heat when the reactor is running but its power is not needed.  This difficulty might be exacerbated by wanting to avoid heat-seeking missiles.

If the Mythbusters had infinite resources, this is a movie myth they should tackle.

Monday, May 13, 2019

[iupddfbx] Eclipse shadow bands simulated by snowflakes and a street lamp

I observed shadow bands moments before the August 2017 total solar eclipse, on a white shower curtain I had placed on the ground.  (Interestingly, I did not see them after totality.)

This winter, I saw a similar looking phenomenon in the shadows that large snowflakes cast on the ground (conveniently white and featureless ground covered in fresh snow).  The light source was an LED streetlamp with no diffuser, so its array of LEDs cast an array of very sharp shadows.

The shadows of the snowflakes moved rapidly linearly across the ground and look like eclipse shadow bands.  The snowflake shadows moved so rapidly as to appear indistinct.

We make this note because the appearance of eclipse shadow bands is hard to convey, and they are hard to film.  Total solar eclipses are rare; snow is more common, though snow with snowflakes large enough to cast shadows is kind of rare.

Sunday, May 12, 2019

[xgaqjchh] How deep is your gravity well?

Express the depth of a hole in terms of the velocity needed for a projectile launched straight up from the bottom to reach the top of the hole.  For holes not very deep, we assume gravity remains constant.  We ignore air resistance, even though that is a pretty bad idea at high velocities.  Some useful formulae:

v = sqrt(2*g*h)
h = v^2/(2g)

1 cm = 0.44 m/s
1 cm = 1 mph
0.40 inch = 1 mph
1 inch = 1.6 mph
5.1 cm = 1 m/s
1 ft = 5.47 mph
1 m = 9.91 mph
1 m = 4.43 m/s
1.01 m = 10 mph
3.34 ft = 10 mph
6 ft = 13.4 mph
10 ft = 17.3 mph
4.08 m = 20 mph
13.4 ft = 20 mph
5.1 m = 10 m/s
29.9 ft = 29.9 mph
10 m = 14 m/s
19.6 m = 19.6 m/s (where 19.6 = 2 gravity)
100 ft = 54.7 mph
120 ft = 60 mph
39 m = 100 km/h
334 ft = 100 mph
99 m = 100 mph
100 m = 44 m/s
510 m = 100 m/s
1 km = 140 m/s
1 mile = 397 mph

Some cute numerical coincidences: 1 cm = 1 mph; 1 m = 10 mph; 20 m = 20 m/s; 30 feet = 30 mph.

For the gravity well of the earth itself, the critical speed is escape velocity, 11 kilometers per second or 25000 miles per hour.  This is coincidentally 1 earth-circumference per hour.  Escape velocity "works" even if you are initially traveling tangentially the surface, though ignoring air resistance is then even more stupid.

Incidentally, escape velocity is (only) (sqrt 2) times the orbital velocity, independent of attitude.  So 2x kinetic energy, though we probably need the rocket equation to compare the fuel needed.

Saturday, May 11, 2019

[wjvipqnk] Base 9.x or 10-epsilon

Pick a fractional base between 9 and 10: 9 < base < 10.  A number written in that base looks like it's in base 10 decimal (because it uses the digits 0 through 9) but isn't.  For example 1/2 written in base 9.5 is 0.471174006660144931361358614588...  Here is some PARI/gp code:

? \p1000
? base=9.5;x=0.5;for(i=1,30,x=x*base;d=floor(x);print1(d);x=x-d)

Many (most) ordinary fractions look irrational.

You might be able to tell it's not base 10 because the digit 9 occurs less frequently than expected.  However, this could be concealed by choosing a base very close to 10.  For example, 1/2 in base 9.999 is 0.499938912222668420772584737231 . It approximates 0.5000 for as many nines there are in the base after the decimal point.  There are some patterns that persist longer, but eventually it looks random.  1/2 in base 9.999999999 = 0.499999999938888888948888888818500000115688888699835555883178666063808640026415359006307736218805374454874664379695541795287272213500649931128973335432...

Consider chopping off the prefix that looks nonrandom to conceal that it was a rational number.  If you know the base, computing the continued fraction on the remaining digits might be useful to recover the original fraction or something like it.  Not sure what this might be useful for.

Friday, May 10, 2019

[gugzzaqh] Doing tasks at exponentially varied frequencies

Number the tasks 1, 2, 3,... N.

Day 0: Do all tasks.  On following days, do all tasks except those directed to be skipped.

Day 1: Skip tasks 2, 4, 6,... (multiples of 2).

Day 2: Skip tasks 4, 8, 12,... (multiples of 4).

Day 3, 5, 7,...: Same as day 1.

Day 4: Skip tasks 8, 16, 24,... (multiples of 8).

Day 6, 10, 14,...: Same as day 2.

Day 8: Skip tasks 16, 32, 48,... (multiples of 16).

Day 12, 20, 28,...: Same as day 4.

Day (odd)*2^n: Skip multiples of 2^(n+1).

It's important to number tasks starting at 1 not 0 because task 0 would always be skipped: 0 is a multiple of everything.

The skip multiple for a given day depends on the number of trailing zeros in the binary representation of the day number.  Count Trailing Zeros (CTZ) or Find First Set.

If the skip multiple is larger than the number of tasks, you end up doing all tasks, not skipping any.

We used F(n) = 2^(n+1) as the skip multiples.  Any sequence that grows multiplicatively could be used instead, e.g., 3^n or n!.

Motivation was design of an experiment in which interesting things might happen with subjects interacted with frequently, or with subjects interacted with rarely.  We wanted a range of interaction rates, but skewed toward high frequency.

Example application: watering a collection of plants, with some plants watered more frequently.

We could also consider interaction rates not decaying exponentially, but that would require a different bookkeeping method.

Thursday, May 09, 2019

[efkabuai] Always have an escape plan

We consider a situation in which an internet site anticipates that it might disappear from its current address, perhaps because of censorship.  In preparation for potentially moving to a yet undecided location, we propose a method of preemptively publishing "digital breadcrumbs" (referencing Hansel and Gretel) on its current site as a way for users to find the next location if or when the site moves.  The site encourages users to save a local copy of the breadcrumbs.

The published digital breadcrumbs consist of two parts: a public key and the specification of a deterministic pseudorandom word generator including its random seed.

As an example, we'll specify digital breadcrumbs for this blog.

Here is the public key for this blog, with fingerprint 2C95 B41D A4CE 7C5F 0110 C27A 561D DCBA 1BDA E2F7:

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1

mQENBFUrkNQBCADRc2ia1qpiS8wwrsqnPQpUoGY8DC1+tyRs6xGTqkkdxADLkS6f
VPuSkMktr0D/NmUmyCVSPkITYMeDlZ09eG2DIl33zS5ZpxTLgbHau8o8QB2cXw4f
ldwDrt5UmQwc8jF6vwKqoXyxPxJIb59fxCQ5s6llurnUI9MdlhDMyRQ0rFHkXu8G
JX+49zisWep7ZLZRT7/zdlKNlw2mriMTavOajCXtfR4WnFbQ8oYBkYLJPZFk4bi6
p4pyX9/nwcKCF2yIs7d3GqkYuuYSpp3gBdK+rAmYAj52cWEm08dtgurkDbh9rD/t
ykiDqHxh2oCou63Tnjt9qrCdjy7f0AstS7qZABEBAAG0PEtlbiAoaHR0cDovL2tl
bnRhLmJsb2dzcG90LmNvbSkgPGRldm51bGxAa2VudGEuYmxvZ3Nwb3QuY29tPokB
OAQTAQIAIgUCVSuQ1AIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQVh3c
uhva4vddMQgAuDcuimghGXzhazv/S86oCfZ3vtwqh5aZzW8N3rz/0tB0o+hZjgCv
imu/N0m1Hv8IdFOexeHa6SgCuDg8xmRCSiFYgumDi6cQy9XCH4+mCfn5oiu1mmrg
leBnV4gRF0u5m7i4pzoBsdbRU0mmKUnRUV4KKkVEsOpZla48AOdkX4SaRGq8sPft
BRbUUoJf4/HVbZKLvJGqau270NbtHoM+AOe+Pk8X6AaPBl5vA6vep7zxRJayFiBm
mlxN6vU8FoH5sBYTdCrN84h0kQDtFszVoYXl1QEF0ek3LjlrEVJvXBJRGy4ZLnv5
juR7vPk1LhLcq28078ucnHo6Hh3uslFnHrkBDQRVK5DUAQgApksDkc2/iTCaFXbm
o1Ojb9VyOITquEzBjMMY/K58MuSKqw6X3PkzsIWVoUO1binlIWtoBHc8ooeWm2Ve
uhardx1SmpGE17UJZRwe+bPI6AXzGM2vFpa7JZTbFY90rgqIWOVrPbBL2+bZds54
ySX6xuVl70H5+NsJIqcqFH5bHoLQtzLfoqLQrIK4Azmv/2NP/nAVySECznyyQT0n
i25RNgiOjUwfKx2M4ICavQ/T1Of9YhnVSP3Cpz9+kDFV7VKiGCBKSSsahQbLOL3u
4dkG9QKY5vjU+dkjziZehHdNQrI9tMthCSopeLsUZ/ooQTj5IozdRTxVryxSbZKR
Tp0TDQARAQABiQEfBBgBAgAJBQJVK5DUAhsMAAoJEFYd3Lob2uL35CQH/RzXJVor
znGnWE/YPtb3qAFMit0APhOT0WWXCASJYjjzOJDMghjN70kqgPvmdjAL182wBVVz
pjEbZBtPDcEx9YYfKiRC3qCygiSjdKRLfSwHmzFeYzGM6DI4GIsJW+1q8+iA2DUs
lXLuyw8TJjH7jvY/cMhM6IzzdZQNnsaSZ9whCKM0t4yWDSxZ/cLk+ezPwEBJQmNR
+dOCvmLy3PbUlLOxN18gVezyFpHy0Bj6UGQ+hyTj2fp4tKiD9LF4iHsOYJdNcHrH
+CJJajhOKYmAB3RexlHunlLqAiLoGrcJUehi9hO4QnC52VvKa+2AryUKhQPPOZwa
iMz2Xdl91SRrAb8=
=mOe7
-----END PGP PUBLIC KEY BLOCK-----

Messages signed with a site's public key should contain the text Serial: NNN where NNN is a string in the format of a Debian software package version number, roughly epoch:version, where the epoch: is optional and version is a dotted number string.  (Inspired by the serial number of DNS zone records.  Some sites use serial numbers like 20190228 to ensure the serial number monotonically increases.  This would be nicer if dots were allowed: 2019.02.28.)  These serial numbers can be compared as version numbers as specified by Debian.  Having comparable serial numbers establishes a total ordering on messages, useful if later messages need to invalidate older messages.

Here is the first message signed with our public key, giving an example serial number.  This message is otherwise uselessly empty.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Serial: 0.2015.6
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEVAwUBVeD8B1Yd3Lob2uL3AQI1kwgAmUIKTr6rfffyceIsOL2UJ/Zw+bcdsdHt
xlzRVAQUocCZVEMhnloRN6bj2PsEMWtO9PxN4y46EBmVImjPYRTPa3FRdVoB7tL9
Lo/ExpoQ93tkz/zMrhC3siq2dwe2FxehqIU1diqEORT3FKs3D7Zbvb3qunifzihH
QoXOgEg6sQQzjKmUzMpwbt3SV86cpYLNE5GK9aaJLaYKf9yC7FQ9YnA8Dd/pVqBb
OCk4PHW/iRhzbPJhBHTLmL4hBH1rVIqZvXPq4msa13tHxQce+2owzoyCQD9PXPyx
TUFzDCJzoz7eDM12oyBbXRHvyWroT6khavrn/meaWofiKvB9ytAwpQ==
=ZyLY
-----END PGP SIGNATURE-----

We leave unsolved the standard hard problems of Public Key Infrastructure: what to do if your private key is compromised, what to do if you lose access to your private key.

We now turn our attention to the random word generator.

To combat yet unknown countermeasures an adversarial censor might deploy, the digital breadcrumbs provide only hints toward the many possibilities where the next site might be.  Exactly how generated random words specify the site's next location is deliberately left unstated in order to flexibly route around the yet unknown censorship: perhaps DNS, perhaps it should be used as a web search term, perhaps a key into some censorship-resistant medium.  It is the responsibility of the user, the recipient of the breadcrumbs, to try things and figure it out.  The infinite stream of random words provides many choices in case some of the earlier words are not available (perhaps due to censorship).  The public key allows the user to verify, perhaps even in an automated fashion, that he or she has found the right new site.

(Previous vaguely related idea: search the entire internet for the latest "message" signed by a public key.)

(Unfortunately, the random words won't directly be usable as addresses for things like Onion hidden services or Freenet CHK because for those, you don't have the ability to choose your own address.  Freenet KSK might be usable, at least until spammers overwrite it.)

A cryptographically secure pseudorandom number generator (PRNG) is not strictly necessary; however, we use one in the sample implementation below because cryptographic primitives are standardized so widely available and easily portable.

Two unrelated entities (perhaps even adversaries) can use exactly the same random word generator, perhaps because they chose the same seed.  We expect this is only to be a slight inconvenience because their different public keys can be used to distinguish them.  They can also choose different words in the same random stream.

Here is the random word generator for this blog, suggesting a template for others.  The random word generator is implemented in Haskell, similar to this stream cipher example.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

{- This code is public domain. -}
{- Serial: 0.2019.1 -}
{-# LANGUAGE PackageImports #-}
module Main where {
import "cipher-aes" Crypto.Cipher.AES as AES;
import qualified Data.ByteString as ByteString;
import Data.Word (Word8);
import Data.Maybe (catMaybes);
import qualified Crypto.Hash.SHA256 as SHA256;
import Data.Text.Encoding (encodeUtf8);
import qualified Data.Text as Text;
import qualified Data.List as List;

url :: String;
url = "http://kenta.blogspot.com";

main :: IO();
main = putStr $ catMaybes $ map filt27 $ to_bytes $ aes_stream
$ AES.initAES $ SHA256.hash $ encodeUtf8 $ Text.pack url;

aes_stream :: AES.AES -> [ByteString.ByteString];
aes_stream key = List.unfoldr (Just . (next_block key)) zero;

next_block :: AES.AES -> AES.AESIV ->
(ByteString.ByteString, AES.AESIV);
next_block key iv = AES.genCounter key iv 1; {- Although we ask
for just 1 byte, genCounter will return a full 16-byte block. -}

{- Initial counter value -}
zero :: AES.AESIV;
zero = AES.aesIV_ $ ByteString.replicate 16 0;

to_bytes :: [ByteString.ByteString] -> [Word8];
to_bytes = concat . map ByteString.unpack;

filt27 :: Word8 -> Maybe Char;
filt27 z = case mod z 32 of {
0 -> Just ' ';
x | x<=26 -> Just $ toEnum $ fromIntegral x + fromEnum 'a' - 1;
_ -> Nothing;
};
}
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEVAwUBXDtUc1Yd3Lob2uL3AQLb1QgAzeb/UebCk4cb0nSXdMSaSWwItxSbOvXK
qzBqE8EwCsg/uz3ry5MB24nFUd0puO9LqEy0okebCdZqj5qWdPK/PnLZj5Zx+ZG2
sUHNSe7pn6gfJfL9+JDoVLRJaJt2Cn/c4KUT2uC7Xsig6RAhKcIKMytCnU8jDG2P
S60Qdp3rk/GqgK6gHViTrLjckUAuV5nID+pxWzqE3Rx753w0W3wK/5f+giovWizk
CTuPkYGv7eFzO9zPN9tLo4na+MfaKskFpJ3PsAQFpJbcIM+RH80HNhJ06i0jjHuX
Rf2IcPnaBwtLYqjHK8WJ1dnhK2wHVLq2wD0/zNmCs1QPcm1Rbv9E6g==
=DL7c
-----END PGP SIGNATURE-----

Prose description of what the code does: The seed string http://kenta.blogspot.com is hashed with SHA-256, (yielding f78183140c842e8f4a550c3a5eb5663a33706fc07eeacc9687e70823d44511c4), which is then used (unsalted) as a key for AES-256 in counter mode (CTR) to generate a stream of bytes.  The counter starts at the zero block and increments as a 128-bit big-endian integer.  We read each AES output block as bytes in big-endian order.  Each byte is truncated to its least significant five bits (i.e., modulo 32), then encoded into letters by the following substitution: 0=space, 1=A, 2=B,... 26=Z.  Values 27 through 31 are ignored, encoding to nothing.  (They might be useful for future extensions.)  Occasionally there may be two or more consecutive spaces, a rare occurrence which currently has no special meaning but may be useful for future extensions.  For reference, our random word stream begins: d efkabuai yqwrmhspliasmvokhvwhvz fdvhdwhoxkcqfujilomqjubxfzjtug ...

This idea is similar to and kind of an elaboration of the Document ReFinding Key also deployed on this blog which helps in finding, via a search engine, new addresses of individual posts (for which you have an old URL) should this blog move.  Rather than associating just a single random word with an internet resource, we now associate an infinite stream of random words.  The template above can easily be extended to arbitrary URLs, such as those of individual posts.

The technical details were inspired by a mechanism used by some computer virus to call home and update itself, using a deterministic pseudorandom word generator to generate internet domains, one of which the virus author would anonymously purchase and post update code.

[jeokbovb] Binomial 52

Choosing k cards randomly from a deck of size n=52 is a common operation.  Elegant values of k are the factors of 52.

For example, we imagine arranging the 52 shuffled cards in a rectangle face down and flipping over one row or column (or something like that: one card per row, etc.).

52 choose 2 = 1326
52 choose 4 = 270725
52 choose 13 = 635013559600 ~= 6e11
52 choose 26 = 495918532948104 ~= 5e14

Or half the deck:

26 choose 2 = 325
26 choose 13 = 10400600 ~= 1e7

Permutations would be larger by a factor of k!.

Perhaps we care about multinomials, for example, dividing the 52 cards into 4 piles of 13 (as done in bridge).

If we include the 2 jokers, 54 has richer possibilities of rectangle shapes: widths 2, 3, 6, 9, 18, 27.  A 48-card deck, 12 cards per suit, also has lots of divisors.

Previously, 12 choose 6.

Wednesday, May 08, 2019

[zdgvaulk] Good weapons in BOTW

We list some good weapons in Legend of Zelda Breath of the Wild.  The main criterion of "good" is attack power, but we also include weapons with special features (e.g., elemental) or which work well in selected special situations.  This list is of course subjective.  The motivation is to simplify the task of choosing which weapons to keep and which to throw away with limited inventory space.  In general, don't throw away these good weapons.

Inspired by the observation that the royal broadsword and lizal tri-boomerang are similar in attack power despite looking very different.

The weapon statistics are given as attack * durability = product, where the product signifies the total amount of use you get out of the weapon.  Numbers in parentheses are for special situations.  For ancient and guardian weapons, the first number in parentheses is with 1.8 multiplier of ancient proficiency, and the second number is with an additional 1.5 (for ancient weapons) or 1.3 (for guardian weapons) multiplier when used against guardians.  (Side note: All guardian weapons, even low level ones from Minor Tests of Strength, can take out a guardian stalker leg in one strike.  In comparison, the master sword, despite its full power against guardians, requires two hits per leg.)  For dragonbone weapons, the number in parentheses is with the 1.8 multiplier for the "bone attack up" set bonus.  The special situations of the master sword are described elsewhere by others.  Some mining weapons have a special bonus against all talus except luminious.

We give baseline statistics only; later in the game you will start receiving lots of modifiers (which again makes difficult the question of whether one weapon is better than another).

One-handed weapons

  • master sword 30(60) * 40(188) = 1200(11280)
  • scimitar of the seven 32 * 60 = 1920
  • royal broadsword 36 * 36 = 1296
  • royal guard's sword 48 * 14 = 672
  • ancient short sword 40(72)(108) * 54 = 2160(3888)(5832)
  • dragonbone boko club 24(43) * 18 = 432(774)
  • lizal tri-boomerang 36 * 27 = 972
  • guardian sword++ 40(72)(93) * 32 = 1280(2304)(2976)
  • savage lynel sword 58 * 41 = 2378
  • demon carver 40 * 25 = 1000
  • spring-loaded hammer 1 * 80 = 80.  Does knockback after 4 hits, so durability effectively 20.
  • meteor rod 10 * 32 = 320
  • blizzard rod 10 * 32 = 320
  • thunderstorm rod 10 * 32 = 320
  • flameblade 24 * 36 = 864
  • frostblade 20 * 30 = 600
  • thunderblade 22 * 36 = 792

Two-handed weapons (heavy weapons)

  • iron sledgehammer 12(48) * 40 = 480(1920).  4x against most talus, mine ore in 1 hit.
  • royal claymore 52 * 40 = 2080
  • stone smasher 42(84) * 40 = 1680(3360).  2x against most talus, mine ore 1 hit.
  • boulder breaker 60(120) * 60 = 3600(7200).  2x against most talus, mine ore in 1 hit.
  • edge of duality 50 * 35 = 1750
  • ancient bladesaw 55(99)(148) * 50 = 2750(4950)(7400)
  • royal guard's claymore 72 * 15 = 1080
  • dragonbone moblin club 45(81) * 24 = 1080(1944)
  • ancient battle axe++ 60(108)(140) * 25 = 1500(2700)(3500)
  • savage lynel crusher 78 * 35 = 2730
  • double axe 18 * 52 = 936.  Nice durability, chop trees in 1 hit.
  • windcleaver 40 * 25 = 1000.  Ranged attack.
  • korok leaf 1 * 25 = 25.  Knockback
  • great flameblade 34 * 50 = 1700
  • great frostblade 30 * 40 = 1200
  • great thunderblade 32 * 50 = 1600

Spears (polearms)

  • royal halberd 26 * 50 = 1300
  • lightscale trident 22 * 70 = 1540
  • ancient spear 30(54)(81) * 50 = 1500(2700)(4050)
  • royal guard's spear 32 * 15 = 480
  • dragonbone moblin spear 15(27) * 25 = 375(675)
  • guardian spear++ 20(36)(46) * 35 = 700(1260)(1610)
  • forked lizal spear 18 * 28 = 504
  • savage lynel spear 30 * 45 = 1350
  • drillshaft 14 * 50 = 700. Nice durability, mine ore in 1 hit, but disappointingly no bonus against talus.
  • flamespear 24 * 50 = 1200
  • frostspear 20 * 40 = 800
  • thunderspear 22 * 50 = 1100

Bows

Statistics given as attack * durability = product @ range.

  • royal bow 38 * 60 = 2280 @ 20
  • great eagle bow 28x3 * 60 = 5040 @ 40
  • golden bow 14 * 60 = 840 @ 40.  Zoom
  • ancient bow 44(79)(118) * 120 = 5280(9480)(14160) @ 50
  • royal guard's bow 50 * 20 = 1000 @ 30
  • dragonbone boko bow 24(43) * 30 = 720(1290) @ 20
  • steel lizal bow 36 * 50 = 1800 @ 20
  • savage lynel bow 32x3 * 45 = 4320 @ 20

Shields

Statistics given as defense * durability = product.  Caveat: both of these values are complicated, and their product is not really the best statistic for conveying the total usefulness of the shield.

  • hylian shield 90 * 800 = 72000
  • royal shield 55 * 29 = 1595
  • daybreaker 48 * 60 = 2880
  • ancient shield 70 * 32 = 2240
  • royal guard's shield 70 * 14 = 980
  • forest dweller's shield 30 * 18 = 540.  Collect arrows that stick to it.
  • guardian shield++ 42 * 20 = 840
  • savage lynel shield 62 * 20 = 1240

Some nice references

Discussion

Challenging way to play the game: avoid using some or all of these good weapons.

What are the best renewable weapons that don't require combat to acquire?  This is a little bit of a fuzzy question in cases in which you have to first fight through or avoid many enemies to get the weapon for free.  What weapons are (subjectively) relatively easy and convenient to get for their attack power?  The champions' weapons require combat to first acquire, but later acquisitions are relatively easy.

Among all the farming tools, there's a bit of a missed opportunity in not providing a scythe which is especially effective at cutting grass (to pair with axes which are effective on trees).  Maybe it would auto-collect anything discovered in the grass.  I guess we'll just have to continue to use the Master Sword instead.

Late in the game when good replacement weapons are plentiful, consider a strategy of always using your best weapons first (not saving them).  Then, you will less frequently have to make difficult decisions about what weapon to throw out when your inventory is full.

Although this list of good weapons is already impressively long, the game could have been made more interesting by making even more normally weak weapons strong in special situations.

[ozxdldnd] Scientific astrology

Astrology posits that the planets and other astronomical objects affect our lives.

This is mostly false.  But create a publication in the style of an astrological horoscope that captures the tiny tiny bit that is true.

The most obvious way the planets affect us is gravitationally, exerting minuscule accelerations.  Compute the amount and direction of acceleration toward each body day to day.  Vector sums of subsets might also be useful, perhaps omitting sun and/or moon.  Although magnitude is easy to express in terms of g, direction in the sky is not, at least in ordinary language.  Astronomers use right ascension and declination.  At very low resolution, a constellation gives a direction, but constellations aren't visible during the day.

One could also express the sum of gravitational forces in terms of the amount and direction of shift to the earth's orbit they will cause today.

The tiny accelerations of the moon and sun do cause macroscopic tides.

An even tinier force the planets exert is radiation pressure through their reflected light.

Planetary motion is not spherically symmetric, so they emit gravitational waves.

These are the fundamental forces of unlimited range.

Asteroid impacts can affect our lives, e.g., mass extinction.  Include in the horoscope whether there will be a large asteroid impact today.

[lvlpjunt] Best random bytes

Here are some bytes, values in the range 0..255:

181 4 243 51 249 222 100 132 89 125 137 179 117 74 190 159 29 111 96 186 137 59 168 76 237 23 172 133 131 51 153 21 74 252 131 4 58 184 162 195 168 177 254 111 220 131 219 57 15 116 168 94 67 156 123 74 120 4 135 54 61 250 39 104 210 32 46 135 66 175 31 78 83 5 156 96 17 188 51 123 202 177 188 145 22 136 69 138 70 10 188 114 47 124 78 51 198 213 168 163 139 183 233 220 203 42 99 67 49 243 200 77 245 47 18 15 131 110 88 46 234 164 160 137 144 64 202 74 129 57 74 182 216 253 14 253 244 211 160 44 235 201 62 12 66 100 218 188 213 40 182 81 184 207 52 27 111 130 54 199 1 4 220 1 254 50 53 47 51 42 94 159 123 218 30 191 246 161 190 63 202 34 19 7 222 160 98 65 247 170 129 194 193 252 189 222 162 247 220 51 24 131 138 46 175 245 243 178 210 79 74 118 63 172 184 130 253 254 23 15 211 177 247 128 249 172 206 65 121 127 40 5 194 70 120 94 146 149 112 35 95 207 143 123 202 62 163 59 77 124 96 165 230 51 227 225

The bytes are the first 256 digits of sqrt(0.5) in base 256.  The first digit behaves as expected: 181^2 = 32761 ~= 2^15.  (Of course, one can compute many more bytes.)  We propose this sequence as a "gold standard" for randomness.  If you can find nonrandomness (especially non-normality) in these bytes, then it will have huge repercussions on other numbers like pi.

Digits 0 and 255 are 2 of the 104 digits that do not occur in the first 256 digits, but all digits do eventually occur, and are conjectured to occur equally often because of normality.

Is there a digit extraction algorithm (like BBP for pi) for this square root, allowing calculating a digit without having to calculate earlier digits?  If so, it would be a random number generator that one can fast forward.

Previously, writing various square roots in various bases.

[kbuzmuii] Version numbers for release candidates, betas, alphas

Consider a policy in which software version numbers must always end in ".1".   This allows having beta version numbers that sort nicely with releases.  For example, in decreasing order:

  • 57.1 = what would have previously been called released version 57
  • 57.0.2.1 = release candidate 2
  • 57.0.1.1 = release candidate 1
  • 57.0.0.2.1 = beta 2
  • 57.0.0.1.1 = beta 1
  • 57.0.0.0.2.1 = alpha 2
  • 57.0.0.0.1.1 = alpha 1

We use 57 as a example for a release version; real software often has a dotted digit string here.

All the releases associated with release 57 start with 57, in contrast to other schemes which might use 56.999.x as beta versions prior to 57.

Next, we consider a bugfix release coming after 57.1 and release candidates and betas prior to it:

  • 57.1.1 = bugfix release 1 for 57.1
  • 57.1.0.n.1 = release candidate n for bugfix 1
  • 57.1.0.0.n.1 = beta n for bugfix 1
  • 57.1.0.0.0.n.1 = alpha n for bugfix 1

The next bugfix release is 57.2.1 and so on.  But suppose 57.2.1 introduced a controversial new feature which people don't like (bad idea for a bugfix, but it happens), so 57.1.1 becomes the last version before a fork, acting like a major release, getting its own series of additional bugfixes, perhaps backported:

  • 57.1.2.1 = bugfix 2 for 57.1.1
  • 57.1.2.0.n.1 = release candidate n for bugfix 2 for 57.1.1
  • 57.1.1.1 = bugfix 1 for 57.1.1
  • 57.1.1.0.n.1 = release candidate n for bugfix 1 for 57.1.1
  • 57.1.1 = bugfix release 1 for 57.1 that has taken on a life it's own

All of the above follows a traditional software release versioning style in which the numbering of the RCs, betas, and alphas are completely independent from each other.

But here is a different style in which RCs can have betas themselves, etc., i.e., recursive.  This versioning style requires targeting what features and bugfixes go into what releases, though that is typically required for any software development.  Here we list versions including various simultaneously active branches of development:

  • infinity.20190301.1 = (active) a nightly built from trunk
  • 57.1.1 = first bugfix release for 57.1 (future)
  • 57.1.0.1.1 = RC 1 for 57.1.1 (future).
  • 57.1.0.1.0.1.1 = beta 1 for RC 1 for 57.1.1 (future).
  • 57.1.0.1.0.1.0.20190301.1 = (active) alpha 20190301 for beta 1 for RC 1 for bugfix 1 for 57.1.1 (active)  Perhaps we know 57.1 will ship with a bug, so the bugfix is already being worked on despite 57.1 not being released yet.
  • 57.1 = upcoming major release (future)
  • 57.0.2.1 = release candidate 2 for 57.1 (future)
  • 57.0.2.0.2.1 = beta 2 for release candidate 2 for 57.1 (future)
  • 57.0.2.0.2.0.20190301.1 = (active) alpha 20190301 for beta 2 for release candidate 2 for 57.1
  • 57.0.2.0.1.1 = beta 1 for release candidate 2 for 57.1 (past)
  • 57.0.1.1 = release candidate 1 for 57.1 (past).  Perhaps we found some big problems with this RC1, necessitating having some more rounds of beta.
  • 56.9.1 = bugfix 9 for 56.1 (future)
  • 56.9.0.1.0.20190301.1 = (active) alpha for bugfix 9 for 56.1.  This supports the latest released version of the software (namely 56.8.1).
  • 56.8.1 = bugfix 8 for 56.1 (past).  This is the latest released version.
  • 56.1 = major release "56" (past)

The general idea is, the more zeroes in a version number, the more alpha quality it is, and users just need to know this.  It is reminiscent of the adage, "don't use software with a zero in the version number". "Users just need to know this" occurs in other version schemes as well, e.g.,

  • the meaning of various tags, e.g., -rc2, -alpha9
  • even numbers are releases; odd numbers are development
  • versions *.999.x are development

Previously, we applied the same idea to just numbers.  Then, instead of ending with .1, numbers ended invisibly with 5.

Further thought: what if instead of requiring version numbers to end with .1, we required them to end with .0, and then used the empty string as a "digit" that sorts before zero?  Version strings will be shorter, but look bizarre with multiple periods in a row.  But versions with such multiple periods are never released.

We repeat a previous example:

  • infinity.20190301.0 = (active) a nightly built from trunk
  • 57.1.0 = first bugfix release for 57.0 (future)
  • 57.1..1.0 = RC 1 for 57.1.0 (future).
  • 57.1..1..1.0 = beta 1 for RC 1 for 57.1.0 (future).
  • 57.1..1..1..20190301.0 = (active) alpha 20190301 for beta 1 for RC 1 for bugfix 1 for 57.1.0 (active)  Perhaps we know 57.0 will ship with a bug, so the bugfix is already being worked on despite 57.0 not being released yet.
  • 57.0 = upcoming major release (future)
  • 57..2.0 = release candidate 2 for 57.0 (future)
  • 57..2..2.0 = beta 2 for release candidate 2 for 57.0 (future)
  • 57..2..2..20190301.0 = (active) alpha 20190301 for beta 2 for release candidate 2 for 57.1
  • 57..2..1.0 = beta 1 for release candidate 2 for 57.0 (past)
  • 57..1.0 = release candidate 1 for 57.0 (past).  Perhaps we found some big problems with this RC1, necessitating having some more rounds of beta.
  • 56.9.0 = bugfix 9 for 56.0 (future)
  • 56.9..1..20190301.0 = (active) alpha for bugfix 9 for 56.0.  This supports the latest released version of the software (namely 56.8.0).
  • 56.8.0 = bugfix 8 for 56.0 (past).  This is the latest released version.
  • 56.0 = major release "56" (past)

Next we permit eliding the final ".0".  This is a very special case because normally the empty string is distinct from zero.  (Side note: because we have invented a digit that comes before zero, we could start numbering betas etc at 0 instead of 1.  However this would make confusing this elision of the final zero.)

  • infinity.20190301 = (active) a nightly built from trunk
  • 57.1 = first bugfix release for 57 (future)
  • 57.1..1 = RC 1 for 57.1 (future).
  • 57.1..1..1 = beta 1 for RC 1 for 57.1 (future).
  • 57.1..1..1..20190301 = (active) alpha 20190301 for beta 1 for RC 1 for bugfix 1 for 57.1 (active)  Perhaps we know 57 will ship with a bug, so the bugfix is already being worked on despite 57 not being released yet.
  • 57 = upcoming major release (future)
  • 57..2 = release candidate 2 for 57 (future)
  • 57..2..2 = beta 2 for release candidate 2 for 57 (future)
  • 57..2..2..20190301 = (active) alpha 20190301 for beta 2 for release candidate 2 for 57.1
  • 57..2..1 = beta 1 for release candidate 2 for 57 (past)
  • 57..1 = release candidate 1 for 57 (past).  Perhaps we found some big problems with this RC1, necessitating having some more rounds of beta.
  • 56.9 = bugfix 9 for 56 (future)
  • 56.9..1..20190301 = (active) alpha for bugfix 9 for 56.  This supports the latest released version of the software (namely 56.8).
  • 56.8 = bugfix 8 for 56 (past).  This is the latest released version.
  • 56 = major release "56" (past)

Instead of the confusing empty string, we could also use a string like PreRelease which sorts before zero: 56.9.PreRelease.1.PreRelease.20190301.  The more repetitions of PreRelease in the version, the more alpha quality it is.  Or, any string (e.g., alpha, beta, rc) with the unusual convention that all non-numeric strings sort before zero, and all non-numeric strings sort equal to each other.

Previously.

Tuesday, May 07, 2019

[hvyhgffd] The golden ratio and the square root of 125

phi = (1+sqrt(5))/2 = sqrt(5)/2 + 1/2 = sqrt(5)/sqrt(4) + 1/2 = sqrt(5/4) + 1/2 = sqrt(5*0.25) + 1/2 = sqrt(5*0.25*100*0.01) + 1/2 = sqrt(125*0.01) + 1/2 = sqrt(125)*sqrt(0.01) + 1/2 = sqrt(125)*0.1 + 1/2 = sqrt(125)/10 + 1/2 = sqrt(125)/10 + 5/10 = (sqrt(125) + 5)/10

This is useful for directly calculating the digits of phi in base 10 because it doesn't need the final division by 2 that the original formula requires.

1.618033989 = phi
11.18033989 = sqrt 125

Apply the quadratic formula to 5x^2 - 5x - 5 = 0.

Monday, May 06, 2019

[bqprfnym] Stars brighter than Mars

Identify the stars brighter than the least bright planet (among those visible to the naked eye) at its least brightest, namely Mars.  We somewhat arbitrarily pick this threshold because the goal is to create a guide for casual naked-eye astronomy from urban areas with a lot of light pollution.  Planets are fun to observe because they wander.

This should be easy, though variable stars might make deciding whether a star is brighter than the threshold a little tricky.

Even without variable stars, figuring out exactly which stars are brighter than the cutoff magnitude might be tricky, needing apparent magnitudes to high precision.  However, astronomical photometry can be very precise, as demonstrated in the discoveries of exoplanets by transits. 

I couldn't find a reliable source giving the minimum brightness of Mars.  Among other factors, its brightness is going to slightly vary depending on the weather there.

[jcexjdfy] 2,3,5-balanced smooth numbers

Among smooth numbers, numbers of the form 2^x * 3^y * 5^z seem especially aesthetically smooth, because those first 3 primes don't seem as weird as primes 7 and larger.  Which exponents (x,y,z) are nice?  We propose the following, which attempts to maintain a balance between the exponents according to the size of their bases.

Start with a positive integer N.
Let c2 be the largest power of 2 less than or equal to the given value N.
Let c3 be the largest power of 3 less than or equal to the given value N.
Let c5 be the largest power of 5 less than or equal to the given value N.
Form the product c2*c3*c5.  It is roughly O(N^3).

Below are the unique elements of the sequence formed as N grows.  We see the bakers' favorite number 12 and Babylonians' favorite numbers 60 (not 30) and 360.

How can this sequence be computed efficiently?  What is its asymptotic growth rate?

1 2 6 12 60 120 360 720 3600 10800 21600 43200 129600 648000 1296000 3888000 7776000 15552000 77760000 233280000 466560000 933120000 2799360000 13996800000 27993600000 83980800000 167961600000 839808000000 1679616000000 5038848000000 10077696000000 30233088000000 60466176000000 302330880000000 604661760000000 1813985280000000 3627970560000000 18139852800000000 36279705600000000 108839116800000000 ...

The following primes are one greater than a number on the list:

2 3 7 13 61 21601 43201 15552001 466560001 13996800001 ...

43201 is a permutation of the digits 01234.

Here is the same idea applied to 2^x * 5^y:

1 2 4 20 40 80 400 800 1600 8000 16000 32000 64000 320000 640000 1280000 6400000 12800000 25600000 128000000 256000000 512000000 1024000000 5120000000 10240000000 20480000000 102400000000 204800000000 409600000000 2048000000000 4096000000000 ...

Here is the same idea applied to 2^x * 3^y, suggesting a subset of the Pierpont primes.

1 2 6 12 24 72 144 432 864 1728 5184 10368 31104 62208 124416 373248 746496 1492992 4478976 8957952 26873856 53747712 107495424 322486272 644972544 1934917632 3869835264 7739670528 23219011584 46438023168 92876046336 278628139008 557256278016 ...

[zmnsotct] Circuitous versus direct route

Start at one point on a circle and go, along the circle, to the farthest point on the circle from where you started.  You travel a semicircle.  Then consider the same endpoints, but take a shortcut through the center of the circle.  You travel the diameter.  The ratio between the length of the route staying on the circle versus going straight through is pi/2 ~= 1.570796327, which we'll call the semicircle constant.  (2pi/4 if you like 2pi, but 4 is more complicated than 2 in the denominator, and division by 2 matches well with the concept of a semicircle, so pi is better than 2pi in this situation.)

This constant of proportionality remains the same comparing routes on versus through spheres, and (I think) for all higher dimensional hyperspheres.

Sunday, May 05, 2019

[gwulsqjy] Pulsars

Pulsars presumably beam from their north and south magnetic poles.  But in order for them to appear to pulse to an observer, their axis of rotation must not be aligned with their magnetic axis.  What determines the magnetic poles of a neutron star?

One could have imagined the centrifugal forces of rotation somehow causing the axes to move into alignment, but clearly that is not happening.  One can also imagine the centrifugal forces causing magnetic poles to move to the equator, though we would still need a mechanism to choose which points on the equator.  Maybe random.

If the neutron star is part of a binary system, its rotation axis could change as matter accretes from the companion: the angular momentum of the system gets transferred onto the neutron star.  How quickly after seeing a supernova have we seen its pulsar?  And certainly we have seen pulsars that are not part of a multiple star system.

Maybe the rotational axis of a neutron star is determined by some anisotropy of its supernova.

Is the fact that the beams of a neutron star are not at its rotational poles similar to how sunspots on the sun tend to form at middle latitudes (butterfly diagram)?

Saturday, May 04, 2019

[nbwxzynq] Human I/O

Humans have two pretty good input interfaces: vision and hearing.  High bandwidth and good sensitivity.

Humans have two pretty good output interfaces: voice and fingers.

A typical video game system uses vision and fingers (though they also use a lot of sound).  Create electronic games exploring the other 3 possibilities of choosing one from each interface.  (We can't say "video" game if it doesn't use video.)

Probably not to shun an interface entirely, but use it sparingly.  Perhaps it mostly uses sounds and voice, but there is a display and some buttons, which are used sparingly.  So it can't be a game purely on Amazon Alexa.

Karaoke uses mostly sound and voice, especially if you've already memorized the lyrics.  It is kind of the ultimate in exercising the full range of human hearing and voice.  Buttons to select a song.

Co-op multiplayer video games have players using voice and hearing in the natural way to communicate.  This could be a model for a single-player game: the other "player" you are cooperating with is an AI which talks and listens like a human.

I'm surprised game controllers don't have microphones built into them for some voice control.  Speech is useful (among other things) for selecting among a large number of items.  Push a button to speak to avoid the creepiness of an always-on microphone.  Inspired by how much time it takes (how many buttons you need to push) to change armor in Zelda BOTW.

Do we want AI measuring the tone of your voice?

[owovmdnv] Worshipping stability, status quo

Consider a society in which the masses of people believe that the ways people acquire, maintain, and exercise power in their society are pretty terrible, but they nevertheless do not do much to undermine or correct those issues in their society.

Inspired by criticism of theocracy.  In a theocracy, power is acquired by claiming to be ordained by God, then maintained by punishing as blasphemy those who would dispute that.  Suppose that, despite officially being a theocracy, the masses of people believe that the claim of divine ordination is bullshit -- no one is actually being fooled -- but nevertheless, no one disputes it either, but -- surprisingly -- not because of the threat of punishment.

At first, this seems incredibly irrational, as power obtained (especially power obtained through terrible means) is often terribly abused, so it would seem the victims of such abuse would have reason to complain about the power structures of their society.

What the masses of people really believe in is the benefits of stability.  They tolerate lies, bullshit, and abuse in return for stability.  Economically, it's not that unreasonable:  War (e.g., civil war) is costly.  Uncertainty is costly.  If there are established initial property lines, the Coase Theorem can efficiently move them to wherever is optimal.  History has some prominent examples of culture flourishing during long periods of stability, despite the government being abusive or inducing quite a bit of abuse to maintain the status quo, typically through class structure.

It's a strange world:  The rulers emit lies that those ruled don't believe; the rulers know that their subjects don't believe them, yet they keep emitting the lies, perhaps expending considerable effort to do so, for example, in ceremony.  It's a world where things are not what they seem to be, everyone knows it, and no one wants to change it.  (Try explaining this to a child.)

Are there, or have there been, real societies which function like this?  On one hand, people lying and conversely understanding that people are lying to you seems innately human nature.  On the other hand, people getting brainwashed into believing a lie also seems human nature.

Should such a society change?  We would need to calculate the net present values of status quo versus an alternative, including things like the cost of uncertainty (change once may make more change afterward more likely).  Are people and societies acting rationally in changing or not changing?

We can easily imagine path dependence: a society is at Pareto-dominated local maximum, but it's hard to leave it for the Pareto superior state because you have to go down first, maybe a civil war.

If change is warranted, can some societies transition more smoothly than others?  Democracy is supposedly good for peaceful transitions of power.

Power corrupts.  All autocracies abuse power.  Even democracies seem biased toward maintaining the status quo, probably through the masses of people directly preferring stability, instead of indirectly achieving it through worshipping a false god.  (Though democracies seem to also create their own false gods.)

It could be a tradeoff: A highly autocratic, highly abusive society might offer very long periods of stability, but the cost of transitioning to a different societal organization when change becomes needed is very high.  In contrast, some society in which change is easier (maybe a democracy, but that might not be true given its above-mentioned preference for status quo) has to pay for that ease of change with the cost of uncertainty.

[xoqqrdai] Procedurally generated full universe

We may be close to being able to procedurally generate a somewhat realistic entire static universe, e.g., the ultimate open-world game.

Minecraft as well as many other games already demonstrate procedurally generating an Earth-like world.  We assume that that degree of realism is good enough, because it's a game (though we would need to transform Minecraft onto a sphere or a cube).  We need to simulate other bodies in the solar system, though those don't seem to be too difficult and techniques to procedurally generate similar such bodies likely already exist.

To procedurally generate other star systems, we need a probability distribution over types of stars, and over possible layouts of stars and planetary bodies within a star system.

To keep things simple, we are procedurally generating a static universe, so we don't have to simulate orbital mechanics, or planetary, stellar, or galactic evolution.  Nothing moves (other than the player): everything is nailed down.  (What about day-night cycle?  Mobs come out at night.)

To procedurally generate a galaxy, we need a probability distribution over layouts of star systems in a galaxy, e.g., bright stars concentrated in spirals.  We also want to put gas and dust between star systems, because nebulae are pretty.  Astronomers have measured all these things.  We also want a model of the way things are, or can be, at the centers of galaxies, around its supermassive black hole.

Comets, rogue planets?

Trying to model how astronomical things like nebulae look from different angles, even for a static universe, might be difficult: naively, it would be a simulation of light interacting with vast amounts of diffuse material in space.

Do we want some instances of colliding galaxies?  If so, we'll need to procedurally generate things like starburst regions and active galactic nuclei.  Going back a bit, do we also want some instances of planetary bodies colliding (or having just collided)?  Although it's a static universe, it need not be a snapshot of its steady state, though the latter would be easier.

To procedurally generate collections of galaxies, we need a models of how galaxies are organized into clusters and superclusters, then into sheets and filaments and voids.  Although astronomers have observed and measured these structures, I haven't yet seen models which can generate synthetic examples of such structures.  It's probably not too difficult.

And then at the largest scale, the universe is uniform, so this is easy.

Saturday, April 27, 2019

[xjdgijlv] Multiple password attempts in parallel

If you've stretched a password so much that checking even one attempt takes a while, provide a UI so that the user can type a second (or more) attempt while a previous one is still computing.  This eases the pain of typos and "I forgot which password I use here".

You are limited by the number of cores but modern computers have many.  Possibly also by memory if you are using a memory-hard password hashing function.

Typos also could be mitigated by having the user type the password multiple times and checking that they match before hashing.

[kehadclm] Keep the rebels poor

Some people want to rebel against the government because the government is keeping them poor.

The government keeps them poor as a means of control, to keep them from rebelling.

In this feedback cycle, it seems everyone is acting rationally.  The cycle seems inescapable.

How common is this situation?

We see this in third-world enclaves within first-world countries: Native American reservations, Gaza strip.

[wnuwwdvo] No bra

We enumerate some ways the "no bra" trope occurs in fashion and film:

  • Low-cut neckline, showing top of breasts (though this style is often paired with a bra)
  • Showing skin between breasts, several ways:
    • Plunging neckline
    • Inversion of plunging neckline with gap in fabric between the breasts extending downward, typically also showing belly
    • Cut out between breasts
  • Crop top, showing underboob
  • Large arm holes, showing sideboob

There's a geometric completeness in the above: all possible sides.  Continuing the theme of geometry, next we explore along the front-to-back axis:

  • Thin materials showing the shape of nipples poking through.
  • Sheer or lacy material, e.g., wet T-shirt.
  • Nippleless or open tip, showing just the nipples.

The above 3 incidentally are also styles of bras themselves.

The following is similar to above, showing skin between breasts.

  • Open back, showing lack of bra strap across the back

Tropes that require movement:

  • Bouncing
  • Leaning over (gravity causes unsupported breasts in loose clothing move differently than bra-supported breasts)

Wednesday, April 24, 2019

[eeedycua] Tangent reflects cotangent

By definition:

cot x = 1/(tan x)

It's far from obvious from the definition that the shape of the tangent and cotangent functions are very similar, just reflected and shifted.  Usually taking the reciprocal of a function results in a very different shaped function, for example f(x)=x versus g(x)=1/f(x)=1/x.

The precise reflection and translation relationship between cotangent and tangent is

cot x = tan(pi/2 - x)

which is not an identity one sees very often listed among trigonometric identities.

We can set the right hand sides equal:

1/(tan x) = tan(pi/2 - x)
tan x = 1/(tan(pi/2 - x))

We can shift everything over by pi/4, resulting in a somewhat more symmetric-looking equation.

tan(pi/4 + x) = 1/(tan(pi/4 - x))
tan(pi/4 + x) = cot(pi/4 - x)

The period of tangent (and cotangent) is pi (not 2pi) so we could create other similar identities.

What other functions look similar to their reciprocal?  Of course a^x.  Any others?

Friday, April 19, 2019

[iizdyjbk] Some possibilities for decimal time

  1. Seconds of an epoch - E.g., Unix time
  2. (Day of epoch).(decimal portion of day) - E.g., Julian Day (JD)
  3. (Year of epoch).(decimal portion of the year) - Nonuniform because of leap years.  2019.00411 is noon on January 2, 2019.
  4. (Month name).(decimal portion of month) - Nonuniform because months are different lengths.  March.0484 is noon on March 2.
  5. (Day of month).(decimal portion of day) - Day of month starts at 1 not zero.  February 2.5 is noon on February 2.
  6. (Day name in week).(decimal portion of day) - Tuesday.5 is noon on Tuesday.

Leap seconds make most of these nonuniform.  An epoch-based counter based on TAI would be nice.

There are many other possibilities, e.g., decimal hours and minutes.

Incidentally, there are 10080 minutes in a week, nearly a perfect power of 10.

Inspired by supposedly metric countries which still do 24 hours in a day, 60 minutes in an hour, etc., which is just as bizarre as 5280 feet in a mile, 12 inches in a foot.

[hvswliwv] Cosmological constant as gas mileage

Dark energy induces a small but positive value for the cosmological constant:

lambda = 1.1056e-52 m^-2 = 2.6005e-52 miles per gallon (mpg) = 93.621 micrometer / cubic light year

After consuming a cubic light year of gasoline, your car has traveled only 93 micrometers (3.66 mil) (3.66 thou).

= 3.2483 mm/parsec^3 = 3248.3 km / kpc^3

Can we make sense of dark energy expressed in mpg?

Dark energy, tiny yet pervasive, is the dominant component of the universe, and will become even more dominant over time.

Thursday, April 18, 2019

[nzfpggsk] Type annotations on operators

In Haskell, one can assert the type of an identifier in an expression by attaching a type annotation with "::".  For infix operators, one can attach such a type annotation by rewriting it in function notation: surround the operator with parentheses and move it from infix to prefix position:

three :: Int;
three = ((+)::Int -> Int -> Int) 1 2;

It seems impossible to attach a type annotation to an operator while keeping it in infix notation.  This is a bit problematic because a common use of an infix operator is to use many of them in series, e.g., 1 + 2 + 3 + 4, but it is awkward to rewrite a long series of uses of an infix operator into prefix notation.

ten = (+) ((+) ((+) 1 2) 3) 4

Tangentially, for addition, we could do foldl' (+) 0 [1, 2, 3, 4], but fold won't work with operators like (.), ($), or (>>=) which take operands of many different types within a series expression.  Previously: syntactic fold and fold (.) via Data.Dynamic.

The motivation was, if one is using a polymorphic function or operator, it may be pedagogically helpful to attach a type annotation at the point of use so the reader knows what "version" of a polymorphic function is being invoked.  The annotation gives the concrete types at the point of use, rather than the polymorphic type with type variables that library documentation will give you.

A nice (hypothetical) IDE could do type inference to figure out the type at the point of use, then display it as a popup.

Tuesday, April 16, 2019

[vyqbccbx] No two-square initial pawn move

Consider a chess variant in which the two-square initial pawn move is eliminated.  More moves happen before pieces start interacting with each other.  Openings become less sharp: less often will a move force a narrow set of good responses.  This allows opening theory to become more varied, seeking a similar goal as Chess960: prevent opening theory from causing the death of the game through book draws.

Of course, we could still also additionally shuffle pieces, as Chess960 does, behind our slower-moving pawns.

Previously: random placement of pawns as an alternative to Chess960, and hypermodern openings.

[gdicgeoz] Inverse conversion constants

1 inch = 0.0833 foot
1 foot = 0.33 yard
1 foot = 0.00018939 mile

1 second = 0.0167 minute
1 minute = 0.0167 hour
1 hour = 0.0417 day
1 day = 0.14 week
1 day = 1/365.2425 = 0.0027379070 gregorian year
1 month = 1/12 = 0.0833 year

1 ounce = 0.0625 pound (exact)
1 pound = 0.0005 ton (exact)

We provide one significant digit more than the number of digits in the integer constants in the forward direction.  This is kind of bogus because the integers were exact.

The inverse conversions between the US fluid volume units {tablespoon, fluid ounce, cup, pint, quart, gallon} are powers of 0.5.

1/2 = 0.5 (exact)
1/4 = 0.25 (exact)
1/8 = 0.13
1/16 = 0.0625 (exact)
1/32 = 0.0313
1/64 = 0.0156
1/128 = 0.07813
1/256 = 0.003906

1 teaspoon = 0.33 tablespoon

For both metric and imperial units, their forward conversions are exact integers.  But metric shines in its inverse conversions also being compact exact decimal constants.

1 gram = 0.001 kilogram (exact)

[aeebwcrh] Jupiter moons clock

Create a clock in which the hands represent Jupiter's Galilean moons orbiting around Jupiter.  The fastest hand (Io) rotates around the face every 1.8 days and the slowest (Callisto) 16.7 days, so it is much slower than a normal clock.  Previously, planets.

The inner moons Io, Europa, and Ganymede are in 1:2:4 resonance: can this be cleverly illustrated?  Also, the resonance causes the moons' orbital speeds to vary from if they were orbiting alone.

More sophisticated: the clock shows where the moons appear when viewed from earth (e.g., indicate earth is permanently in the direction of 6 o'clock), so incorporates corrections for the variations in viewing angle caused by the movement of the earth, and delays due to the speed of light.  This would probably be very difficult to construct purely mechanically.

Also indicate eclipses, when moons, particularly Io, disappear into and reappear out of Jupiter's shadow.  Note that Jupiter's shadow is not always directly behind Jupiter from Earth's point of view (if it were, eclipses would be identical to occultations).  The earth is separated enough from the sun to get an angle on Jupiter's shadow cylinder or cone.

Saturday, April 13, 2019

[rioazxio] Fun vaporizing a city

The evil villain muses, "There's nothing more fun than vaporizing a city."

Someone from the Manhattan Project responds, "What about vaporizing two cities?"

Friday, April 12, 2019

[lejnsnaj] Parity of fairy chess pieces in higher dimensions

We previously defined movement of higher dimensional analogues of orthodox chess pieces.  We now consider some fairy chess pieces, paying special attention to parity (colorboundness).

The ferz moves one hypercube in any direction a bishop can move, the colorbound subset of king moves.

The wazir moves the complement of ferz, the king moves that the ferz cannot do.  Two notes: the wazir has some possibly surprising space diagonal moves, like the higher dimensional rook previously defined.  The wazir necessarily alternates colors each step, consistent with 2D.

I think the knight, previously defined, similarly alternates colors each move, like in 2D.

Consider a piece which jumps to any hypercube reachable by two consecutive wazir moves, not necessarily in the same direction.  Obviously avoid moves constructed from steps that cancel each other out.  By the above mentioned parity property of the wazir, this piece is colorbound.  In 2D, it is a ferz + dabbaba compound.  We can subtract the ferz moves to define dabbaba.  This might be equivalent to two wazir moves in the same direction.

Jumping to the destination of two ferz moves in the same direction gives the higher dimensional alfil.  Is there anything new in two ferz moves not in the same direction?  In 2D, this was a dabbaba.

Consider a piece which jumps to any hypercube reachable by four consecutive wazir moves, not necessarily in the same direction.  Subtract moves reachable by a (jumping) queen (e.g., moves 2 or 4 king steps in the same direction).  Hopefully this gives the higher dimensional analogue of the camel, a modification of the knight to be colorbound.  In 2D, the camel is the (1,3) leaper.  In higher dimensions, jumps like (1,1,2) are also possible.

Do the higher dimensional alfil and camel keep their 2D abilities to jump over higher dimensional pawn chains (sheets)?

Also consider 3 consecutive wazir moves.  This will be a superset of knight moves.

As the number of dimensions increases, the Small wazir becomes becomes relatively much weaker than the other pieces.

Thursday, April 11, 2019

[xocijlqn] The threat of lynching remains credible today

"It has been said numerous times, but if those girls and women were white, R. Kelly probably wouldn't even be alive right now."  https://verysmartbrothas.theroot.com/11-thoughts-about-surviving-r-kelly-now-that-ive-had-a-1831551200

The author seems to be speaking of a modern -- not historical -- African-American experience in which the threat of being lynched is still very real and credible, and very commonly understood to be real and credible, if a black man were perceived to have done to white women what R. Kelly is accused of having done to black women.  As a convenient point of comparison, Harvey Weinstein is being accused of doing to white women what R. Kelly is accused of having done to black women, and Weinstein is alive right now, facing the normal criminal justice system (no death penalty) and not a lynch mob.  The threat of being lynched remains an African-American experience.

Although the threat is real, lynchings aren't happening.  Why not?  We hypothesize that it is because there are some nearly perfect mechanisms of segregation, preventing (some) African-American men (which ones?) from accessing white women.  What are those mechanisms?  What other segregation are those mechanisms enforcing?  Probably segregating rich from poor, though it's more complicated than that: why was R. Kelly unable to access poor white girls?  Of course, we should also examine why R. Kelly was able to access black girls.  Enablers were involved.  Examine segregation generically as a result of the existence of enablers or lack thereof.  It's social at the level of actions of individuals.

Previously, speculating on mechanisms that inculcate the fear of being lynched.

Monday, April 08, 2019

[rjkjfjug] Eccentricity and the inverse square law

We consider a body in an elliptical orbit around the sun.  The following table gives eccentricity, the ratio of distances between aphelion and perihelion, and the ratio of sunlight received between perihelion and aphelion.

Eccentricity Distance ratio Power ratio
0.000 1.000 1.000
0.001 1.002 1.004
0.002 1.004 1.008
0.005 1.010 1.020
0.010 1.020 1.041
0.020 1.041 1.083
0.050 1.105 1.222
0.100 1.222 1.494
0.200 1.500 2.250
0.300 1.857 3.449
0.400 2.333 5.444
0.500 3.000 9.000
0.600 4.000 16.000
0.700 5.667 32.111
0.800 9.000 81.000
0.900 19.000 361.000
0.950 39.000 1521.000

An eccentricity of (sqrt(1.1)-1)/(sqrt(1.1+1)) = 0.0238 is the eccentricity that sees 10% additional power from the sun at perihelion.  Perhaps that is the threshold eccentricity beyond which an orbit ought not be called "roughly circular", because 10% is (subjectively) a significant difference in power.  Currently, only Venus, Neptune, and Earth have roughly circular orbits around the sun.  (Eccentricities change over time, because Jupiter.)

Mercury's eccentricity is 0.21.  Other planets.

At e = 0.172, the power ratio is 2.

At e = 1/3, the distance ratio is 2.

[staxaako] Mass surveillance of mass surveillance

Mass surveillance seems inevitable given its decreasing cost and economies of scale.  Therefore, the best way to regulate it is to monitor who does what with it.  This can be done, ironically or optimistically, with mass surveillance of those with power, those who have access to the mass surveillance big data: watch the watchers.

Is this being done?  It seems it isn't.

There will probably be some constantly evolving and escalating game involving people with power trying to deceitfully deny they had access to, or deny they were influenced by, some questionable use or abuse of mass surveillance.  For example, parallel construction.

[foqrttjl] Pure isotope collection

Chemical element collections are nice.  Far more impressive would be pure isotope collections.

The boundary between stable versus radioactive with a very long half-life is fuzzy.  There are 253 + 33 = 286 which seem stable enough: primordial nuclides.  We limit to this list so that your nuclide collection doesn't decay away on you, though the list could be expanded much further if we include all isotopes that don't decay very much within a human lifetime.

Some, perhaps many, of these purified isotopes are very expensive, though expense doesn't seem to deter hard-core element collectors.  This video describes calcium-48 at $250000 per gram.

Among the primordial nuclides is uranium-235, half-life 700 million years.  It is likely very difficult to obtain in purified form, because atomic bombs.

Or, much more cheaply, 286 cards with facts on them.

Friday, April 05, 2019

[bmdldyed] Absurdly complicated simple rules

Create a game with a small number of rules which interact in complicated and interesting ways making gameplay one or more of the following:

  1. Difficult to find any legal move
  2. Difficult to determine whether a given move is legal
  3. Difficult to find any good move

All of these, especially #1 and #2, would make the game so impractical to play as to be a joke, which is the point.  #1 could be done with a problem of a complexity class outside of P.  #2 could be done with a problem of a complexity class outside of NP.  (Previously, legal contracts.)

Cryptography might be useful in providing inspiration: "the only legal moves (from some large or infinite space of possible moves) are those for which the cryptographic hash of its string representation is all-zeroes" would satisfy #1, though one could argue over whether the specification of the particular cryptographic hash function satisfies the constraint of "a small number of rules", or whether such a game is "interesting".

For #3 we would like good moves to definitely exist but be difficult to find.  Previously, cryptographic puzzles vaguely similar.

[sgrzgpre] Spherical Lambertian radiator

A perspective projection of a spherical Lambertian radiator has constant brightness across the disc.  The proof of this is probably cute, probably involving trigonometric terms canceling out.

[axqqhovx] Digits as shades of gray

  • 0 = 000
  • 1 = 001
  • 2 = 002
  • 3 = 011
  • 4 = 012
  • 5 = 022
  • 6 = 111
  • 7 = 112
  • 8 = 122
  • 9 = 222

Three concentric rings (innermost one is a disc), like a bullseye target, that are colored 0=white, 1=gray, 2=black, assuming a white background.  The three digits left to right correspond to the color of the rings from outermost to center.  Unlike a bullseye target, colors don't alternate.  For every digit, the rings go from light to dark, outermost to center.

The structure is 1 + 2 + 3 + 4 = 10.  Previously on how the appearance of a digit ought to encode its value.

Perhaps a fourth outermost ring that is always present, so zero does not look like space, and in fact looks like regular zero.

Tuesday, April 02, 2019

[umypunol] Entropy-matched decimal and binary

Write (say) pi in base 10 and in base 2 in parallel along a long strip of paper with the digits spaced out so that there are log(10)/log(2) binary bits per digit.  (The ratio is not a rational number.)  They both encode the same amount of information per unit length along a strip of paper.

This should be easy.

[tslhczny] Home and away

Consider a chess variant in which pieces are stronger on their "home" side of the board than the enemy's side.

Rook turns into wazir in the enemy's camp.  Starting anywhere in the first 4 ranks, it can move at most to the 5th rank in one move, then single steps only. Perhaps it retains the ability to retreat quickly.

Bishop similarly turns into ferz.  Similar to rook, it can still do retreating ranged movements two ways diagonally backward.

Knight requires an empty intervening square, either a wazir or ferz move.

On the home side, it's quicker to reorganize your forces.  Rooks for example can range across the whole width side to side, assuming an open rank.

Defense becomes easier, likely making the game more boring.  How should this be counterbalanced?

[lrcyavdq] Some melting points

All temperatures below are in Celsius.

Freezing points

Melting points of materials that are liquid or gas at room temperature are often thought of as freezing points.

-259 : Hydrogen

-219 : Oxygen

-210 : Nitrogen : curiously, oxygen and nitrogen flip when it comes to boiling points (-183 versus -196 respectively), or oxygen's liquid range completely covers nitrogen's.

-188 : Propane

-183 : Ethane

-182.5 : Methane : The above 3 are in a surprising order.

-159 : Isobutane, Methylpropane, i-Butane

-138 : Butane, n-Butane : unbranched.

-114 : Ethanol

-100 : Ammonia solution, Ammonia in water, Ammonium hydroxide, NH3(aq) : eutectic.  The freezing point as the concentration of ammonia in water varies is complicated with 3 eutectic points.  Why?

-98 : Methanol

-95 : Acetone

-91 : Cyclobutane

-89 : Isopropyl alcohol

-78.5 : Carbon dioxide, Dry ice : sublimates.  Is the sublimation temperature of dry ice closer to -79 or -78?

-78 : Ammonia

-39 : Mercury

-21 : Brine, NaCl Brine, Sodium Choride in water : eutectic

-16.5 : Neopentane, Dimethylpropane

-13 : NaK, Sodium-Potassium alloy : eutectic

0 : Water, Ice

11 : Gallium-Indium-Tin : eutectic.  Wikipedia notes a melting point controversy with Galinstan.  Perhaps it can be supercooled to -19.

17 : Acetic acid : pure, glacial, anhydrous.

Melting points

30 : Gallium

37 - 68 : Paraffin wax

113 : Sulfur

232 : Tin

271 : Bismuth

327 : Lead

420 : Zinc

525 - 1000 : Red hot glow.  Lower end is Draper point.

660 : Aluminum

770 : Potassium chloride

801 : Salt, Sodium chloride

962 : Silver

1064 : Gold

1083 : Copper

1400 to 1665 : Glass : depends on composition.  Upper number is the softening point of silica glass (a.k.a. fused quartz), whose melting point is higher, probably the same as one of the quartz crystal structures.

1410 : Silicon

1453 : Nickel

1535 : Iron

1597 : Magnetite, Fe3O4, Iron(II,III) oxide, FeO . Fe2O3

1670 : Quartz, Silica, Silicon dioxide : tridymite crystal structure

1713 : Quartz, Silica, Silicon dioxide : crisobalite crystal structure

Also, when the temperature exceeded 573 C, quartz crystal structure changed from alpha to one of the beta structures.

1772 : Platinum

2072 : Sapphire, Ruby, Corundum, Alumina, Al2O3, Aluminum oxide

2613 : Calcium oxide : product of the thermal decomposition of calcium carbonate

3410 : Tungsten

3500 or 3642 : Carbon, Graphite : sublimates.  The latter temperature is from Wikipedia.

Thermal decomposition

Many materials do not melt, but instead thermally decompose.  Elements cannot thermally decompose.

171 - 186 : Sucrose, Sugar : thermal decomposition to caramel

825 : Calcium carbonate : thermal decomposition to calcium oxide and carbon dioxide

1200 - 1300 : Hematite, Fe2O3, Iron(III) oxide, Ferric oxide, Rust : decomposes to Fe3O4 and O2, and also FeO.  Temperature range according to "Thermal Decomposition Behaviour of Fine Iron Ore Particles".  1565 is the melting temperature.

1539 - 1565 : Hematite, Fe2O3, Iron(III) oxide, Ferric oxide, Rust : Temperature range according to Wikipedia.

Element data from https://www.lenntech.com/periodic-chart-elements/melting-point.htm unless othewise noted (carbon).

I'm a little suspicious of the many temperatures ending in "3", having 3 in the one's place.  They may have been converted from a Kelvin temperature precise only to 10 degrees, but the 3 at the end in Celsius then incorrectly suggests a precision of 1 degree.

I didn't try too hard to find reliable sources.  Many values were copied from Wikipedia.

What commonly available substance, liquid at room temperature, has the lowest freezing point?  Ethanol?  Though pure ethanol is hard to obtain.

Saturday, March 30, 2019

[euvbymdl] Practical cool-looking space fighters

Tell a story in which space fighters and battleships are streamlined not for looks but to present a small cross-section as a target toward an enemy shooting at them.  During battle, the ships constantly reorient themselves, pointing their narrow profile toward the enemy.  If an enemy projectile does hit, the streamlining often causes it to glance off.  Maybe the ship is also shiny to defend against beam weapons.  Things reflect better at glancing angles.

This defense works if the ship is being fired upon by only one enemy.

Pointing the whole ship toward the enemy is also useful for shooting the enemy if the ship's gun can only shoot straight forward.

Friday, March 29, 2019

[cqxjyucf] White phosphorus Platonic polyhedron

When was the chemical structure of white phosphorus, four phosphorus atoms bonded in a regular tetrahedron, first determined?  Was it the first discovered Platonic solid shaped molecule?  Was it the first discovered Platonic solid shaped allotrope?  Is it still the only Platonic solid shaped allotrope?  We don't have octaazacubane yet, though we do have regular cubane.  If we allow regular honeycombs, then we also have graphite and all cubic crystal structures.

Tetrahedranes.

A tetrahedron with sp3 carbons at the vertices and at the midpoints of edges (10 carbons total), plus hydrogens where needed, has probably been synthesized.  It is 4 fused cyclohexane rings forming a cage.

Previously on geometrically symmetric molecules.

Create a tetrahedral sculpture made of white phosphorus.

Can a perfect crystal of white phosphorus be elegantly cut into a tetrahedron along crystal planes?  What is the crystal structure of white phosphorus?  Does it even crystallize?  Tetrahedra cannot fill space by themselves.

White phosphorus seems rarely mentioned in geometry despite its notable shape.  Is it being censored because of its military uses?

[eftdxehm] Pre plus post order tree traversal

  1. Say the node name.
  2. Recursively process its children left to right.
  3. Say the node name again.

There will be matching pairs of nodes names.  HTML syntax is like this, as is SystemVerilog.

Let's only consider complete binary trees, because nodes will have large, in fact, maximal (among binary trees), distances between the start and end tag.

Assign the letters of a string to the nodes of a complete binary tree.  Preorder is probably best, though inorder and breadth-first are also good alternatives.  Read off according to pre-plus-post-order above.  This defines a string transformation.

string

s
tn
rig 

Here are various ways of writing a pre and post order tree traversal:

  1. <s><t><r/><i/></t><n><g/><0/></n></s>
  2. s t r! i! /t n g! 0 /n /s
  3. strriitngg.ns
  4. strriitnggns

The last version only works because we have constrained ourselves to complete binary trees, so if a node has only one child, it must be a left child.

There will be ambiguity in parsing if a letter occurs in the original string more than once: where is its pair?  This ambiguity be resolved quickly if length of the whole string is known, because we know the structure of the complete binary tree.

Not sure what this could be useful for.  The original motivation was to define a string transformation in which a local change in the input string results in a large, nonlocal change in the output, but cryptographic hashing is much better for this.