Thursday, June 14, 2018

The 4-7-8 Measured HexaHexaFlexagon, and its State-Machine Graph

A basic hexaflexagon is a paper hexagon, made of six triangles -- but it obviously has layers, and there are odd fold-lines and paper edges showing in between the triangles. Here you can see two of them folded out of graph paper, with side 1 showing for the one on the left and side 2 for the one on the right. Each is in what I'm calling state "12", meaning that those are the two sides directly accessible.



 If you pinch one of those edges and poke the opposite edge inwards then you can fold the outside down and make it into a single thick triangle, with the center becoming the top vertex. I take the one on the right, showing the "2" side. Gently tug that vertex and you can pull it apart, revealing a third side to the flexagon; in this case it's actually numbered "3". Here:


Finish pulling it out, flatten it, and you'll be in state "23"; side 1 has disappeared, i.e. it has been folded to the inside, and sides 2 and 3 are now accessible:




 That's at least a "trihexaflexagon", and it's a "hexahexaflexagon" if there's also a fourth, fifth, and sixth side concealed in the middle. In this case, they're all right in there. For a hexahexa you can look up and use a "Tuckerman traverse" (described at the previous link) to visit all six sides, but I like thinking in terms of the graph I've put in the illustration.

   Central Cycle: Starting from side 2 and thus choosing to fold side 1 inwards, I moved to side 23 as shown, and I could then start from side 3 to fold side 2 inwards, reaching state 13...and then continue back to state 12, and round and round it goes. If you decorate the sides, you'll see peculiar things happen as the inside becomes outside, especially if you punch holes through some state (e.g., in the center, as a face's mouth) which disappear in other states. This is true even for the trihexaflexagon. This one, however, is a hexahexaflexagon, so I also have

   Peripheral Cycles: I could have chosen a different edge to pinch, and I'd have exposed side 5, reaching state 25. (Of the six edges, three will get me to side 3, three to side 5.) Similarly if I'd started with side 1 on top, I could have chosen to reach state 13 or 15. Those four states (13, 15, 23, 25) are the states reachable from state 12, as you see on the graph, and (12,15,25) makes a peripheral cycle....an epicycle. Each central-cycle state has its own epicycle: if I start in state 23 I can reach an epicycle using side 4, and state 13 gets me to one involving side 6.

This graph doesn't describe the full behavior of the flexagon; as I said, things change when the center changes places with the outside. Still it's a useful summary, and I invented it (I have no idea how many other people have done so, but I never saw it before I came up with it), and I like it, so I wanted to put it in a post.

Folding a strip of paper into one of these isn't hard, and you'll find lots of YouTube tutorials showing how to do it. Mostly they either say to measure a 60-degree angle, or simply to get a feel for folding overlapping equilateral triangles. I've done that, but I like measurement. I like numbers, and I like the fact that if you have an equilateral triangle whose sides are of length 8 (in whatever units you like) and it's pointing straight upwards, then one vertical line splits it into two equal right triangles whose sides are almost exactly 8, 4, and 7. Seven? Why seven, you ask? Well, Pythagoras says sqrt(8^2-4^2) = 6.92820... and seven is well within the margin of error you get by folding, anyway. 

Side-note: It's also nice that at least for me, it evokes my use of those triangles whenever I do Dr. Weil's 4-7-8 breathing exercise -- which definitely does not put me to sleep in 60 seconds, but like other patterns of conscious breathing gives me a way to defocus, refocus, and generally talk to my autonomic nervous system....if you have the habit of doing a specific breath pattern as part of relaxing/getting ready to sleep, then that association can help. Any ritual helps, but a breathing ritual can help more. Hooray for pranayama! So part of my own relaxation routine includes drawing those two triangles, one with each hand: inhale throughout the 4 side, turn at right angles and hold throughout the 7 side, then turn towards the beginning and exhale throughout the hypotenuse. 4-7-8.
 So does it actually help in making flexagons, at least as you're getting a feel for how to do it without any lines at all? You be the judge. Here's a piece of graph paper ruled in quarter-inch squares:





The length is 11 inches, and for a simple trihexaflexagon I want 5 1/2 base-lengths (you'll see why, as we go) so the baselength is exactly 2 inches, 8 squares. So I count 7 squares down, draw an 11" midline, 7 more squares, and slice myself a rectangle that will be (7/4)*2= 3.5"x11". Mark it at the 2", 4", 6", 8", and 10" points and add the lines you see: the ruler is there to show you that the diagonal triangle sides we're creating really are 2", i.e. the triangles really are equilateral. Number the sides, fold along the midline and glue the halves together, then slice off the incomplete triangle from each end:

As you can see, the back side of the glued strip shows the triangles that were on top.  (At this point, it would be best to fold back and forth along each of the edges to crease them, but I'm not doing that because I want to control the highlights as I take pictures.)

 The front says 1,2,2,3,3,1,1,2,2,3, and we want to hide side 3 so we fold the first pair of 3s to face each other, like so:


and then the next pair, like so:

The remaining 3 is on the other side of that final 1, and we want it to face the 3 we can see, so we slide the visible 3 under the 1:
And now we turn it over:
and fold it in, and glue the two blank sides to get:

Now I crease each edge back and forth both ways so that the edges fold readily, and even force them into a stack of equilateral triangles:

And now they can fold...so I fold back and forth for a few minutes and then decorate. As you can see, I've drawn a happy face on side 1 but there are three corners lopped off:
This time I fold through to side 2, and put a sad face....

and on to side 3...
Flexagons are fun. Finicky and frustrating, if you're as clumsy as I am, but gently folding back and forth over and over again to loosen the folds does eventually help. Just keep trying. I have made flexagons out of cereal-box cardboard...hard to fold. And out of toilet paper...even harder.

 And the six-sided version is just the same except (surprise!) for having twice as many sides...so you can either start with larger paper, or glue strips together to make a longer strip, or make smaller triangles as shown here, where I use only 10"x1.75" for 19 triangles, front and back:
After folding and gluing the halves shown, you fold the 4s together, the 5s together, and the 6s together -- you'll then have a single strip which looks much like the starting point shown above, and if you fold the 3s together it will come into a hexagon with the blank triangles ready to glue as we did here. Decorate, punch holes with a manual hole punch and see where they go, mark the insides of each side and watch them go out. Look for patterns. Always. The world needs more patterns. And the world needs more silliness. And that's all I'm gonna say....

or then again, maybe not. (But it is for now.)



Labels: , , , , , , ,

Saturday, October 22, 2011

Afghanistan & The Drake Equation

I spent last weekend in NYC at the singularity summit, listening to very bright geeks of various kinds talking about recent/near-future changes in technology, in the rate of change of technology, in the funding and organization of technology, and thus how everything may soon (unknown but likely-small number of decades, say) become very very much better/worse. (See listing here.)And a few speakers, notably cosmologist Max Tegmark, talked about the Drake Equation and how the fact that we haven't heard from other civilizations, even though we now know that extrasolar planets are common, means there's a roadblock somewhere: either the evolution of life and intelligence is unusual, or there's something up ahead of us that civilizations tend not to survive, like maybe the Singularity itself. (I think he's oversimplifying; I'd call the roadblock theory highly probable but it's not the only explanation for silence.) Then I came back to Hamilton in time to walk up the hill to listen to journalist Kim Barker talk about Afghanistan and how the "good war" went bad...how she filled a notebook, some years back, with interviews and background with seventeen people and as of this year, they're all dead, and the Obama announcement that we are definitely out by a particular date means that counter-insurgency can't work. (Copies of her Taliban Shuffle book were stacked up in the back of the hall, but the last time I bought signed books at a Project Afghanistan lecture the author was killed soon after and well, I dunno, I didn't feel like doing that; so I downloaded the Kindle version and started reading it on my phone, while waiting for the lecture to start. Maybe I should have asked her to sign my phone.)

For me, there really is an existential threat in here. I can only repeat what I wrote almost five years ago:

The situation is bad. Still, I don't think we're in trouble yet. Trouble is when we have half a million or so dead Americans and a tens of millions dead around the world. Big trouble is lots, lots worse than that. You don't think it can happen? You think terrorism is an overhyped nuisance? Well, I sort of agree: it can't happen now, at least I don't think so, and terrorism now is in some ways an overhyped nuisance. I'm talking about a timeframe that probably doesn't start for ten years, and might not start for thirty. But it will start. In the thirty-one years since I started working on my PhuD in computer science, Moore's Law has increased computer bang-for-the-buck by a factor of approximately one million: 20 doublings. People haven't changed. In the next thirty years, technology will go on getting more so, and up to a point (past which I have no predictions) people will go on not changing. That's the problem.

And Gaddafi was killed this week; probably a good thing, just as Hussein's death was probably a good thing, but not exactly a guarantee that tomorrow in Libya will be a better day than yesterday. I'm glad that Obama has continued Bush's Big Bang of disrupting dictators, glad that our investment in drone technology is paying off, really worried about his promise to get out, really really worried that (apart from such promises) we're in Bush's third term in the bad ways as well as the good ways -- in particular, attacking troops and citizens of a foreign country without Congressional authorization and pretending that it's not legally a "war", apparently on the ground that he's not putting troops on the ground. Yeah, right. And it also won't be a war when vastly improved drone tech spreads to many countries including Pakistan, North Korea, Iran, etc., up to the point when some descendant of Sunrise I in the air or perhaps Spray in the water ( Underwater Robot Makes History...Spray has a range of 6,000 kilometers, or about 3,500 miles, which means it could potentially cross the Atlantic Ocean and other ocean basins...) pays us a return visit, with payload upgraded far beyond what Pakistan's nukes can now do.

Near the start of the Singularity Summit, PayPal founder/billionaire Peter Thiel was worrying about the slowdown in innovation in the "developed" countries, about the way that so much of our (very real, really excellent despite current difficulties) global improvement statistics simply reflect copying of our tech into China and India and others. And I was thinking that this is worse than he thinks it is, because it's not just about economics: it's about the fact that the (moderately) liberal democracies have a technological edge which we need them to keep. And maybe they will, maybe they won't. Thiel believes regulation is holding us back, that a lot of what we now depend on is stuff which we wouldn't be legally able to develop now if we hadn't already developed it -- well, I believe that too. Will we keep the edge we need? Maybe.

Still, I have here an actual physical copy of Pinker's The Better Angels of Our Nature: Why Violence Has Declined and it does suggest that maybe my statement above that "People haven't changed" is oversimplified. Even with WWI and WWII, and the Nazi and communist slaughter+starvation of scores of millions, people in the 20th century were several times less likely to die violently (that's counting starvation-by-government as violent death, as it should) than the people whose bones tell us about life and death thousands of years back, or the hunter-gatherer societies we've studied more recently. (See Will Wilkinson's commentary, which I pretty much trust.) Of course Neolithic violence was not an existential risk; the 20th century brought us lower means but higher standard deviations, so to speak. We needed Petrov to be there, doing his job; that did not apply to any previous century. If things are getting better, maybe we can survive without future Petrovs, or maybe there will always be one around when we need him (or her).

Or then again, maybe not.

Footnote: I said above that the "roadblock theory" wasn't, I think, the only explanation for interstellar silence in a galaxy of many planets. Clearly one possibility is that species with enough "aggressiveness" to proceed to interstellar activity have enough real aggressiveness to destroy themselves. I'll list four others; I'm sure there are many. First, most attractive in a way, would be a moral dynamics sort of explanation: the species which develop morally (to the point of non-interference with primitives like us) are exactly the ones which don't wipe themselves out. Next would be a physics explanation: expansionist species discover physics which we haven't found yet, physics which lets them create bubble universes that it's easy to expand into so they never bother with the actual galaxy. Next would be a simulation-version of that: expansionist species wind up discovering that they can simulate the universes they want, and upload themselves into the simulations...same thing. And finally, for now, would be the now-familiar notion that we are in a simulation -- there are no other species not because we're bound for destruction but because we're the one being simulated. (And as I was typing this, my daughter came to say she'd finally finished the Collected Stories of Arthur C. Clarke; we're probably in one of his universes. Should that be a reassuring thought? "Cancel Programme GENESIS"..."Overhead, without any fuss, the stars were going out."..."The crusade will reach the vicinity of Earth about the year 2050." So it goes.)

Labels: , , , , , , , , , , , , , ,

Wednesday, April 13, 2011

Colgate v. Consolidation -- maybe. For now.

At last night's budget meeting, Superintendent Bowers had very good news to announce. As Radio Free Hamilton put it, Colgate Contributes $300,000 More to HCS

HCS is able to restore the equivalent of 3.5 teaching positions scheduled to be cut from the 2011-2012 budget thanks to a $300,000 contribution from Colgate.
The state had planned to cut $486K; a last-minute cut reduction had restored $94K of this; now we're back within $92K of last year's situation, except that various expenses have risen. But the immediate layoffs of teachers are deferred. Yay!

RFH continues

Colgate's donation, which will be followed by a similar one next year, was announced at the HCS Board of Education budget presentation Tuesday night. Superintendent Dr. Diana Bowers said Colgate is willing to make two more similar donations in the future depending on need and the outcome of a potential merger with Morrisville-Eaton Central School.
Actually I'm not sure she mentioned M-E by name, but the point was clear; Colgate's extra support is not forever, but might continue for two more years, unless the Hamilton district had become part of a larger district "funded in a different way." Colgate has an interest in supporting HCS as the kind of school it now is.

This doesn't take consolidation off the table, even in the short run; it does provide a substantial incentive counter-balancing the state pro-consolidation incentive, at least for now. For me as a parent whose youngest child is an 8th grader, whose grandchildren will almost certainly grow up elsewhere -- gee, I can reasonably hope that takes care of it. Probably. We'll probably muddle through for several years.

For me as a local citizen, one who wants things to go well even for current elementary school students and maybe even for those who haven't been born yet....hmm.... the upstate NY demographic prospects are still what they were. Things that can't go on forever, won't.

Is there an answer? Sure. This local school, like many similar local schools, will not go on as it is -- that's a given. But that doesn't mean that there will be no local school, just that there will be no local school based on the current model of school organization. Personally that thought doesn't bother me, because even without financial pressures I would expect the current model of schools to change. It's really not a great model; it's a 19th-century factory model, as stretched in various directions by good people trying to work inside that model.

If I were trying to get a community school model that would last for a while, I'd try to follow the people in this region and others that I talked about in Budgets, Consolidations, Charters. A charter school might work better against consolidation pressure; might be better able to adopt the sort of technology that would help it work at a smaller scale. I'd like to know what my neighbors would think about that. Of course most of the ones I know are parents of 8th-graders, or older -- maybe they'll settle for a solution that will last a few years. “Après moi, le déluge.”

Or then again, maybe not.

Labels: , , , , , , ,

Friday, January 01, 2010

Happy New Year

I have (almost) always tried to post serious things, so I hereby remark that this is 2*3*5*67 which is the product of 2 by an odd number, and is therefore not the difference of any two whole-number squares. In contrast, last year was 7*7*41 which is 45^2-4^2 as well as being 147^2-140^2 (and one easier pair, left as an exercise for the reader). Next year? Well, there's a whole year to think about it.

Labels: , ,

Monday, December 03, 2007

Maximal Meaningful DNA: 25 Megabytes?

At Overcoming Bias, Eliezer Yudkowsky asserts that:

There's an upper bound, a speed limit to evolution: If Nature kills off a grand total of half the children, then the gene pool of the next generation can acquire a grand total of 1 bit of information.
and that's very cool. In a sense it's obvious; selection is pushing you down a tree of choices, rather like the tree of choices involved in sorting where we tediously show students how sorting can't be better than O(N*log(N)). We think of evolution as answering a series of yes/no questions, going from a breeding population of a zillion with no answer for question Q, to a population of two zillion young'uns of whom half try out "yes", half "no", and then to a surviving next-generation breeding population of a zillion who have survived by choosing the right answer. I like it. Yudkowsky continues:
I am informed that this speed limit holds even with semi-isolated breeding subpopulations, sexual reproduction, chromosomal linkages, and other complications.
Yeah, I think I can believe that. I think. It's very plausible, and I don't see a way to attack it -- if somebody challenged me with an attack I would not say it's a priori ridiculous to try, especially if there's a way to isolate subsystems of questions which are separately answered by subpopulations, but I would expect them to fail -- I don't think you can know which subsystems to isolate until after you have the answer. He then goes on with:
Let's repeat that. It's worth repeating. A mammalian gene pool can acquire at most 1 bit of information per generation.
and this is clearly dependent on the assumption (slightly discussed) that the selection of DNA sequences starts with a pool of roughly twice the surviving size, i.e. about four offspring per pair. For mammals, that sounds right, yes? And if so, we can go on with
Among mammals, the rate of DNA copying errors is roughly 10^-8 per base per generation.
and if we build up to 100,000,000 base pairs, then we can add one and lose one per generation so we've hit the maximum and that's two base-pairs per byte so we get 25 megabytes for the maximum meaningful mammalian DNA.

This strikes me as extremely cool, but actually my current opinion is that it's wrong for a very simple reason: http://www.google.com/search?q=viable.sperm yields over 62,000 hits, while http://www.google.com/search?q=viable.ova yields over 500. In other words, some of the DNA selection occurs before we see the offspring. How much? Well, as Simon Levay put it:

as anyone who has watched the Discovery Channel knows, a maverick sperm takes a flood of its buddies along for the ride — between one hundred million and seven hundred million tail-snapping semen-surfing spermatozoa in each ejaculation.
Of course that number can be a lot less and still have reproductive success, but clearly there is selection of sperm (and ova, to some extent) going on.

As a programmer, I'm thinking of sperm-selection and ovum-selection as module testing; the miscarriages that then take out at least some pregnancies serve as initial system-integration testing; and then we get the approximately one bit added from post-birth selection.

One major caveat: the external environment is not necessarily involved (it may be involved, since some environmental stimuli do clearly get through). So pre-birth selection is not equivalent to post-birth selection; in particular, it may have an extremely limited ability to select bits relating to the external environment. However, a whole lot of the environment, for any given gene's expressed proteins, consists of other genes' expressed proteins and their consequences.

So, how much meaningful DNA can be supported? Each doubling in offspring corresponds to an extra bit to be selected; a hundred-million-fold increase is more than 26 doublings. In fact using Scott Aaronson's summary

we’ll never find any organism in evolutionary equilibrium, with mutation rate ε and K offspring per mated pair, with more than (log2(K)-1)/(8388608ε) MB of functional DNA.
we're talking about a possibly 26-fold increase in log2(K); a few hundred megabytes, instead of just 25.

And ova? Well, it seems to me that if the ovum's genetic expression is largely independent (doing different things, expressing and testing different genes than sperm) then whatever expansion there is for ova should be a multiplier; if we form an embryo by choosing from 1E8 sperm and, say, 100 ova, then actually we're selecting from 1E10 potential embryos -- that would give us a basis for maintenance of all our DNA as non-junk. In this kind of consideration, the redundancy of the genes from parents is obviously relevant, and I'm not at all sure how to handle it; but we are able to use the zillions of sperm to get right answers to roughly log2(1E8) questions. Whether the actual reproductive process does so, and whether there really is a more than 25MB (or thereabouts) package of data, is an experimental issue, but I'm not sold on Yudkowsky's belief that this line of reasoning predicts the junkiness of junk DNA.

The principle, though, is clearly convincing.

A random thought, while updating: the error rate has to be non-negligible in order to accumulate information, but perhaps it could be a variable if there's a way of detecting "we're near a local optimum" (with better-than-random success) and stepping up error correction if so. In particular, consider the fact of variation at equilibrium; it's a little hard to think about this in the current context, where I've been supposing that each DNA locus has a single "right" answer, but a species in or near equilibrium, a "successful" species, doesn't generally consist of clones ... for a variety of reasons. I hereby conjecture that if you're a member of a species under stress, one far from equilibrium because it's "losing", then it's relatively more likely that your parents will both have had the same value for gene G, for any given G. (For example, a habitat changes temperature and only the least or most heat-sensitive survive.) If so, your error-correction algorithm should look at the genes it is copying and say "hmm...too many of these are identical. Better not try so hard." The effective mutation rate will therefore rise. I have no idea whether or not any real systems work this way, but they might.

Or then again, maybe not.

Labels: , , ,

Wednesday, September 05, 2007

Mathematics, Economics -- and Bias

Dani Rodrik invites us to:
call me naive, but I also think that Mugabe would not have pursued his policies for this long if he had a better grasp of debt dynamics.

The idea that Mugabe's problem is a lack of mathematical sophistication does, indeed, strike me as naive, and makes me very slightly less inclined to take Rodrik seriously.

In fact, I take Mugabe to be merely an extreme case of the general dictum that the problem with government is that it attracts people who think they should be in charge, including and especially people who love power; this is not a left-vs-right problem, it's why I tend to towards a (leftish, bleeding-heart, centrist) libertarianism (sometimes almost reaching it) on tests of such things, as I've noted before. The fact that Rodrik's mental model of Mugabe pops out with "insufficient math, that's his trouble!" is quite seriously a reason to question Rodrik's mental-model formation.

Update: Tyler Cowen remarks that

By writing "...call me naive" Rodrik is showing a level of self-awareness which seems to be signaling he is not naive.
I would rather say that he is showing a level of critic-awareness which signals that he knows some will label this as "naive", but he is not going to answer them -- he just feels that Mugabe's problem is insufficient math. Rodrik is in general somebody I can't ignore, but (in my model of the world) his credibility is very slightly lower than it was. And this, of course, interests no one but me, but it does interest me...as the long-ago author of Equations, Models, and Programs: A Mathematical Introduction to Computer Science I feel as if I ought to be maximally sympathetic to the math-modeling-in-all-things view...

Then again, maybe not.

Labels: , , , ,