
[Update March 23: a paper draft is up. The ArXiv version contains also more code.] Spring break is a good time for some programming and cleanup. I reorganized our home office, took everything apart and rewired the half a dozen computers new, got rid of about 30 old harddrives, mostly 5 and 8 TB drives. I hammered their interfaces, and baked them in the oven as not all of them were encrypted. Everything is consolidated to 24 TB drives now (I had before a couple of 18 TB drives but they filled up (*)). What takes space are movies and youtube preparation stuff. I try to keep things simple. Some long term backup is always also out of the house, in case the house would burn down of if Boston would get nuked… As for programming, this is an activity which needs time, especially if foundational parts are changed. I now changed the geodesic code because the old one was too complicated. I had thought to separate the code for manifolds and manifolds with boundary and also used a precomputed hash list telling for each simplex/wall pair its neighboring simplex. The idea was, that one does not want in every step again and again to search for the neighbor. For some reason, the hashing made things slower. Now things are much simpler and around 10 lines. Why are such changes stressful? Because there are now about a hundred test programs which do not work any more as they had used the old code requiring hashing. Let me explain this: If G is in the memory then one can define a map T[x] which takes a simplex x=(a,b,c,d) and maps it to the neighboring simplex (b,c,d,a’) in G. The G is given in the background. I now opted to still define T[G,x] and not care that we have to pass along every time the complex G. It is a bit slower. Additionally, I had also in the background a hash-list H which told how to get from a to a’. It turned out that looking up that hashlist was not faster than computing the dual a’ from a every time. So, here is my code. It works for generalized manifolds, meaning that every simplex x=(x0,x1,x2, xq) has the property that the stable sphere of the wall (x1,x2,xq) contains either one element {x0} or two elements {x0,x0}. We now use only a handful of lines (Occam’s razor justifies fighting for small code, even if it can cost spending a day or two with programming and tweaking. I included the following lines now also in my “algorithmic poetry” collection.
[(*) a side remark about destroying hard disks: If you look it up, you get to sellers who want to earn money by destroying hard drives and claim that heat enough does not work. But it is simply a matter of physics that if you keep a drive for a longer time above the Curie temperature, all magnetization is gone. 400 Degree Celsius exposure does the job and also destroys some of the electronics. One has to be a bit careful still not to overdo it and have the drive explode or have plastic melt. In any case, doing the baking and smashing of electronics should be enough for keeping student data, letters or bank data safe. Sensitive data anyway are also additionally encrypted . I by principle do not buy nor sell used drives. There is also a natural degradation in time even so I had very few hard drive failures myself, maybe every one of 50 died before it is replaced, but it is usually external drives which experience a fall. I try to replace crucial drives every few years. My office machine will come up soon to renewal.]
[As a side remark, there is something nice about understanding technology fundamentally, and not rely on library or code from somebody else or (heaven forbid) AI. Programming with AI is like taking the cable car up to a mountain and claim to have climbed the mountain. And doing it alone and without looking up code is like “free climbing”. Yes, it is more risky, but it is the journey that matters and not the achievement. Something related: in high school, I was a member of the youth organization (JO) of the swiss alpine club (SAC) and we went for many weekends climbing, skiing (even entire weeks like climbing in Belinzona or the beautiful Bergell (some nice climbs were Badile, Cantun, Ago die Schiora) or skiing in Saas Almagell or Graechen or Fiesch). I learned quite a bit of practical things. One of the guides (Pete Giezendanner who was leading the group then with his wife Elvira Giezendanner) once said: “There are only two reasons to be too cold: either you are poor – ore you are stupid”. But also a bit of philosophy: Urs Waldispuehl (who was the best climber in the club) and who runs since 1996 the software company GARP in Schaffhausen, was then into the German philosopher Erich Fromm and especially propagating Fromm’s book “Haben oder Sein”. I think this is actually quite a modern read in our time of AI. Using AI is about “Having”. Not using AI and enjoying to work things out yourself is about “Being”. Climbing redpoint is “being”, taking the cable car is “having”. Programming by copy paste is “having”, programming by starting from the ground up from a clean slate, understanding and building every brick yourself, this is “being”. Writing websites using wordpress like this blog is “having”, doing it by hand like all my other websites is “being”. So, here is my piece of happiness: ]
Generate[A_]:=If[A=={},{},Sort[Delete[Union[Sort[Flatten[Map[Subsets,A],1]]],1]]];
Whitney[s_]:=Map[Sort,Generate[FindClique[s,Infinity,All]]];
Walls[G_] :=Select[G,(Length[#]==Max[Map[Length,G]]-1) &];
Facets[G_]:=Select[G,(Length[#]==Max[Map[Length,G]] ) &];
OpenStar[G_,x_]:=Select[G,SubsetQ[#,x]&]; Stable[G_,x_]:=Complement[OpenStar[G,x],{x}];
Mirror[G_,x_]:=Module[{U=Stable[G,x]},Table[First[Complement[U[[j]],Sort[x]]],{j,Length[U]}]];
T[G_,x_]:=Append[y=Delete[x,1];y,First[Append[Complement[Mirror[G,Sort[y]],{x[[1]]}],x[[1]]]]];
Orbit[G_,x_,n_]:=Module[{S},S[X_]:=T[G,X];NestList[S,x,n]];
Orbit[G_,x_]:=Module[{y=x},o={y};While[y=T[G,y];Not[MemberQ[o,y]],o=Append[o,y]];o];
P[G_]:=Module[{F=Facets[G]},Flatten[Table[Permutations[F[[k]]],{k,Length[F]}],1]];
T[G_]:=Block[{r=P[G],q={}},While[Length[r]>0,q=Append[q,Orbit[G,r[[1]]]];r=Complement[r,o]];q];
G=Whitney[PolyhedronData["ArchimedeanDual","Skeleton"][[11]]]; Orb=T[G]; Map[Length,Orb]