Sunday, January 17, 2016

Graph of commuting elementary cellular automata

In one of the previous posts, I wrote about pairs of commuting elementary cellular automata. Two cellular automata rules A and B commute, if result of applying them to the universe does not depend of application order:

$$A(B(x)) = B(A(x)).$$

As I wrote previously, such commuting pairs can be seen as a single automaton in the universe, where time has two dimensions.

However, the visualization I used (binary image 256x256) was not very clear. How to draw it better? Of course, draw it as a graph! Here are the results.

All automata

The graph below displays relations between almost all automata. It excludes automata 170 (shift leftward), 204 (identity), 240 (shift rightward) that commute with every other automaton; their binary complements (15,51,85) and trivial automata 0 and 255, that commute with half of all elementary automata. Also, to reduce clutter, single nodes: automata that do not commute with any other, were also excluded from the graph.

Commuting elementary automata map. Nodes are automata, edges show commutation. Yellow: even rules, red: odd rules.

The graph data was generated with simple python script, and then semi-automatically laid out using the yEd graph editor.

This graph reveals some interesting features. First, it have two mirror symmetries. On this layout, horizontal flip corresponds to mirroring automata, and vertical flip corresponds to binary complement (automaton, working on inverted field).

Additive automata are seen as compact groups of nodes, where each node in the group is connected with each other.

Even automata

My simulator only supports even elementary automata: the ones that preserve emptiness of space, transforming empty universe into empty. Odd rules are opposite: they invert state of the universe filled with zeros. Odd automata are shown as red nodes in the first graph. If only yellow nodes are left, graph simplifies:

This graph have no complement symmetry.

Wednesday, August 12, 2015

Changoite (sodium zinc sulfate)

Phew, I am getting more and more into crystal growing last weeks. Few more specimens will be ready soon.

Crystals of synthetic changoite, double sulfate of sodium and zinc.

Here are some fresh crystals of a double sulfate of sodium and zinc with formula \(Na_2Zn(SO_4)_2\cdot4H_2O\). Natural variety of this compound is known as mineral сhangoite. It is not well known among crystal hobbyists, but definitely worth trying: it easily forms large, well-wormed single crystals; the crystals are very stable on air and not prone to dehydration; and finally, source compounds (sodium and zinc sulfates) are cheap and available. Remaining photos of this compound are in this gallery, and all my crystal growing photos are here.

Shape and size of the crystals of sodium zinc sulfate.

Crystals are colorless, monoclinic, having thick tabular form with multiple facets. Top faces have form of a distorted octagon, very close to a rectangle. On side faces, striations are sometimes visible. Tabs are slightly slant.

Side view, striations are visible on the biggest crystal.

My crystals are rather cloudy. It would be really great to grow absolutely transparent crystals (by the way, I am now growing crystals of another zinc compound: zinc ammonium acetate, and they are crystal clear). Probably, additional recrystallization step could improve transparency.

Obtaining compounds

To grow crystals of changoite, prepare solution containing equal molar amounts of zinc and sodium sulfates. Indeed, both of these compounds can be bought in a chemicals store. However, they can also be prepared from commonly available materials.

Sodium sulfate (Na2SO4)

From sulfuric acid

The second easiest way to obtain sodium sulfate (after buying it) is reaction of sulfuric acid (acid electrolyte) with baking soda, according to the equation:

$$2NaHCO3 + H_2SO_4 \rightarrow Na2SO4 + 2H_2O + CO_2 \uparrow$$

Take some acid and add small portions of soda until it stops fizzing. Looks simple, but in practice it is harder than it seems. Fizzing is very vigorous, so soda must be added really carefully to avoid spilling of acidic foam. Always perform this reaction over some larger vessel and wear eye protection! Moreover, gas bubbles are producing thin acidic fog, which is surely not good for health and surrounding objects. I used a piece of cloth to cover the reaction vessel.

Upon drying, solid sodium sulfate decahydrate, \(Na_2SO_4\cdot10H_2O\) is obtained from the solution.

From copper sulfate

A safer (though more expensive) alternative is reaction of some metal sulfate with soda. For example, with copper sulfate:

$$CuSO_4 + 2NaHCO_3 \rightarrow Na_2SO_4 + H_2O + 0.5Cu_2(OH)_2CO_3 \downarrow + 0.5CO_2\uparrow$$

Make copper sulfate solution and add soda by small portions until reaction (fizzing and sediment formation) stops. Remaining transparent solution would contain sodium sulfate. Do not throw away blue-green sediment of basic copper carbonate, it can be used for preparing other interesting compounds and beautiful crystals, such as copper acetate.

The (questionable) advantage of this method is that it does not use dangerous acid.

Zinc sulfate (ZnSO4)

Zinc sulfate is a colorless solid, soluble in water. From water solutions, it crystallizes as heptahydrate: \(ZnSO_4\cdot7H_2O\). Besides the chemicals store, it can be sometimes bought as a fertilizer, since zinc is an important micro-element. However, the amount is usually small. It also can be prepared in several ways.

Preparation from zinc oxide (ZnO)

Zinc oxide ZnO is a white powder insoluble in water, used as pigment "zinc white". I bought a big jar of white watercolors and washed it several times with water to remove soluble glue components. To prepare sulfate, dissolve oxide in sulfuric acid:

$$ZnO + H_2SO_4 \rightarrow ZnSO_4 + H_2O$$

This reaction is quite exothermic. Crystalline heptahydrate is obtained by cooling and evaporation.

From metallic zinc

If you have metallic zinc, it can be turned into sulfate in several ways. The straightest one is to dissolve zinc in sulfuric acid:

$$Zn + H_2SO_4 \rightarrow ZnSO_4 + H_2\uparrow$$

Beware of acidic fog, always cover the reaction vessel. Also, if zinc or acid are not pure, badly smelling reduction products can form, so ensure good ventilation.

Safer, though more expensive method is, again, via copper sulfate. Put zinc metal into solution of copper sulfate, and metal will quickly cover with red porous metallic copper:

$$CuSO_4 + Zn \rightarrow ZnSO_4 + Cu \downarrow$$

Remaining clean solution is zinc sulfate.

Preparing the solution

The solution must contain equal molar amounts of both sulfates. For solid hydrated compounds, the proportion is: 1 part of \(ZnSO_4\cdot7H_2O\) per 1.12 parts of \(Na_2SO_4\cdot10H_2O\) (by weight of solid compounds).

To grow crystals, solution must be saturated. Both compounds have very high solubility, so add only enough water to completely wet and cover the components. If after stirring and mild warming they are not completely dissolved, add a bit more water. Resulting solution should be transparent and slightly viscous.

Growing

I used the usual growing procedure: slow evaporation. First let the solution to evaporate for a day or 2. Eventually, small rectangular crystals appear (if they are not appearing, then solution is too dilute). Harvest several most clean and well-formed seed crystals, attach them to a thread (I use thin nylon filament, and attach crystals to it by the double overhand knot).

Then suspend seed crystals in the solution and wait patiently.

Side view, striations are visible on the biggest crystal.

Safety

Zinc is important element for life, but only as a micro-element. In big amounts, it is toxic. Swallowing 1-2 grams of zinc sulfate causes nausea, and 10-20g can be even deadly. However, with basic precautions, such as washing hands and not trying to taste the compounds, it is totally safe. In small amounts, such as 100mg/day, zinc is prescribed as a drug.