{"id":762,"date":"2011-09-23T13:53:55","date_gmt":"2011-09-23T18:53:55","guid":{"rendered":"https:\/\/scottaaronson.blog\/?p=762"},"modified":"2021-10-12T18:10:43","modified_gmt":"2021-10-12T23:10:43","slug":"the-first-law-of-complexodynamics","status":"publish","type":"post","link":"https:\/\/scottaaronson.blog\/?p=762","title":{"rendered":"The First Law of Complexodynamics"},"content":{"rendered":"<p>A few weeks ago, I had the pleasure of attending FQXi&#8217;s <a href=\"http:\/\/fqxi.org\/conference\/2011\">Setting Time Aright<\/a> conference, part of which took place on a cruise from Bergen, Norway to Copenhagen, Denmark.&nbsp; (Why aren&#8217;t theoretical computer science conferences ever held on cruises?&nbsp; If nothing else, it certainly cuts down on attendees sneaking away from the conference venue.)&nbsp; This conference brought together physicists, cosmologists, philosophers, biologists, psychologists, and&nbsp;(for some strange reason) one quantum complexity blogger to pontificate about the existence, directionality, and nature of time.&nbsp; If you want to know more about the conference, check out Sean Carroll&#8217;s <em>Cosmic Variance<\/em> posts <a href=\"http:\/\/blogs.discovermagazine.com\/cosmicvariance\/2011\/09\/01\/ten-things-everyone-should-know-about-time\/\">here<\/a> and <a href=\"http:\/\/blogs.discovermagazine.com\/cosmicvariance\/2011\/08\/26\/time-is-out-of-joint\/\">here<\/a>.<\/p>\n<p>Sean also delivered the <a href=\"http:\/\/www.slideshare.net\/seanmcarroll\/setting-time-aright\">opening talk<\/a> of the conference, during which (among other things) he asked a beautiful question: <em>why does &#8220;complexity&#8221; or &#8220;interestingness&#8221; of physical systems seem to increase with time and then hit a maximum and decrease, in contrast to the entropy, which of course increases monotonically?<\/em><\/p>\n<p>My purpose, in this post, is to sketch a possible answer to Sean&#8217;s question, drawing on concepts from Kolmogorov complexity.&nbsp; If this answer has been suggested before, I&#8217;m sure someone will let me know in the comments section.<\/p>\n<p>First, some background: we all know the <a href=\"http:\/\/en.wikipedia.org\/wiki\/Second_law_of_thermodynamics\">Second Law<\/a>, which says that the <em>entropy<\/em> of any closed system tends to increase with time until it reaches a maximum value.&nbsp; Here &#8220;entropy&#8221; is slippery to define&#8212;we&#8217;ll come back to that later&#8212;but somehow measures how &#8220;random&#8221; or &#8220;generic&#8221; or &#8220;disordered&#8221; a system is.&nbsp; As Sean points out in his wonderful book <a href=\"http:\/\/www.amazon.com\/Eternity-Here-Quest-Ultimate-Theory\/dp\/0452296544\/lecturenotesonge\">From Eternity to Here<\/a>, the Second Law is <em>almost<\/em> a tautology: how could a system <em>not<\/em> tend to evolve to more &#8220;generic&#8221; configurations?&nbsp; if it didn&#8217;t, those configurations wouldn&#8217;t <em>be<\/em> generic!&nbsp; So the real question is not why the entropy is increasing, but why it was ever low to begin with.&nbsp; In other words, why did the universe&#8217;s initial state at the big bang contain so much order for the universe&#8217;s subsequent evolution to destroy?&nbsp; I won&#8217;t address that celebrated mystery in this post, but will simply take the low entropy of the initial state as given.<\/p>\n<p>The point that interests us is this: even though isolated physical systems get monotonically more entropic, they <em>don&#8217;t<\/em> get monotonically more &#8220;complicated&#8221; or &#8220;interesting.&#8221;&nbsp; Sean didn&#8217;t define what he meant by &#8220;complicated&#8221; or &#8220;interesting&#8221; here&#8212;indeed, defining those concepts was part of his challenge&#8212;but he illustrated what he had in mind with the example of a coffee cup.&nbsp; Shamelessly ripping off his slides:<\/p>\n<p><a href=\"https:\/\/scottaaronson.blog\/coffee-lrg.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/scottaaronson.blog\/coffee-small.jpg\" alt=\"\" width=\"446\" height=\"357\"><\/a><\/p>\n<p>Entropy increases monotonically from left to right, but intuitively, the &#8220;complexity&#8221; seems highest in the <em>middle<\/em> picture: the one with all the tendrils of milk.&nbsp; And same is true for the whole universe: shortly after the big bang, the universe was basically just a low-entropy soup of high-energy particles.&nbsp; A googol years from now, after the last black holes have sputtered away in bursts of Hawking radiation, the universe will basically be just a <em>high<\/em>-entropy soup of <em>low<\/em>-energy particles.&nbsp; But today, in between, the universe contains interesting structures such as galaxies and brains and hot-dog-shaped novelty vehicles.&nbsp; We see the pattern:<\/p>\n<p><a href=\"https:\/\/scottaaronson.blog\/complexity-lrg.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/scottaaronson.blog\/complexity-small.jpg\" alt=\"\" width=\"444\" height=\"341\"><\/a><\/p>\n<p>In answering Sean&#8217;s provocative question (whether there&#8217;s some &#8220;law of complexodynamics&#8221; that would explain his graph), it seems to me that the challenge is twofold:<\/p>\n<ol>\n<li>Come up with a plausible formal definition of &#8220;complexity.&#8221;<\/li>\n<li>Prove that the &#8220;complexity,&#8221; so defined, is large at intermediate times in natural model systems, despite being close to zero at the initial time and close to zero at late times.<\/li>\n<\/ol>\n<p>To clarify: it&#8217;s not hard to explain, at least at a handwaving level, why the complexity should be close to zero at the initial time.&nbsp; It&#8217;s because we assumed the <em>entropy<\/em> is close to zero, and entropy plausibly gives an upper bound on complexity.&nbsp; Nor is it hard to explain why the complexity should be close to zero at late times: it&#8217;s because the system reaches equilibrium (i.e., something resembling the uniform distribution over all possible states), which we&#8217;re essentially <em>defining<\/em> to be simple.&nbsp; At intermediate times, neither of those constraints is operative, and therefore the complexity <em>could<\/em> become large.&nbsp; But <em>does<\/em> it become large?&nbsp; How large?&nbsp; How could we predict?&nbsp; And what kind of &#8220;complexity&#8221; are we talking about, anyway?<\/p>\n<p>After thinking on and off about these questions, I now conjecture that they can be answered using a notion called <a href=\"http:\/\/people.cs.uchicago.edu\/~fortnow\/papers\/soph.pdf\">sophistication<\/a> from the theory of <a href=\"http:\/\/en.wikipedia.org\/wiki\/Kolmogorov_complexity\">Kolmogorov complexity<\/a>.&nbsp; Recall that the <em>Kolmogorov complexity<\/em> of a string x is the length of the shortest computer program that outputs x (in some Turing-universal programming language&#8212;the exact choice can be shown not to matter much).&nbsp; Sophistication is a more &#8230; well, sophisticated concept, but we&#8217;ll get to that later.<\/p>\n<p>As a first step, let&#8217;s use Kolmogorov complexity to define <em>entropy<\/em>.&nbsp; Already it&#8217;s not quite obvious how to do that.&nbsp; If you start, say, a cellular automaton, or a system of billiard balls, in some simple initial configuration, and then let it evolve for a while according to dynamical laws, visually it will look like the entropy is going up.&nbsp; But if the system happens to be <em>deterministic<\/em>, then mathematically, its state can always be specified by giving (1) the initial state, and (2) the number of steps t it&#8217;s been run for.&nbsp; The former takes a constant number of bits to specify (independent of t), while the latter takes log(t) bits.&nbsp; It follows that, if we use Kolmogorov complexity as our stand-in for entropy, then the entropy can increase at most <em>logarithmically<\/em> with t&#8212;much slower than the linear or polynomial increase that we&#8217;d intuitively expect.<\/p>\n<p>There are at least two ways to solve this problem. &nbsp;The first is to consider probabilistic systems, rather than deterministic ones. &nbsp;In the probabilistic case, the Kolmogorov complexity really does increase at a polynomial rate, as you&#8217;d expect. &nbsp;The second solution is to replace the Kolmogorov complexity by the <em>resource-bounded Kolmogorov complexity<\/em>: the length of the shortest computer program that outputs the state <em>in a short amount of time<\/em> (or the size of the smallest, say, depth-3 circuit that outputs the state&#8212;for present purposes, it doesn&#8217;t even matter much what kind of resource bound we impose, as long as the bound is severe enough). &nbsp;Even though there&#8217;s a computer program only log(t) bits long to compute the state of the system after t time steps, that program will typically use an amount of <em>time<\/em> that grows with t (or even faster), so if we rule out sufficiently complex programs, we can again get our program size to increase with t at a polynomial rate.<\/p>\n<p>OK, that was entropy. &nbsp;What about the thing Sean was calling &#8220;complexity&#8221;&#8212;which, to avoid confusion with other kinds of complexity, from now on I&#8217;m going to call &#8220;complextropy&#8221;? &nbsp;For this, we&#8217;re going to need a cluster of related ideas that go under names like sophistication, Kolmogorov structure functions, and algorithmic statistics. &nbsp;The backstory is that, in the 1970s (<em>after<\/em> introducing Kolmogorov complexity),&nbsp;Kolmogorov made an observation that was closely related to Sean&#8217;s observation above.&nbsp; A uniformly random string, he said, has close-to-maximal Kolmogorov complexity, but it&#8217;s also one of the <em>least<\/em> &#8220;complex&#8221; or &#8220;interesting&#8221; strings imaginable. &nbsp;After all, we can describe essentially everything you&#8217;d ever want to know about the string by saying &#8220;it&#8217;s random&#8221;! &nbsp;But is there a way to formalize that intuition? &nbsp;Indeed there is.<\/p>\n<p>First, given a set S of n-bit strings, let K(S) be the number of bits in the shortest computer program that outputs the elements of S and then halts.&nbsp; Also, given such a set S and an element x of S, let K(x|S) be the length of the shortest program that outputs x, given an oracle for testing membership in S.&nbsp; Then we can let the <em>sophistication<\/em> of x, or Soph(x), be the smallest possible value of K(S), over all sets S such that<\/p>\n<ol>\n<li>x\u2208S and<\/li>\n<li>K(x|S) \u2265 log<sub>2<\/sub>(|S|) &#8211; c, for some constant c.&nbsp; (In other words, one can distill all the &#8220;nonrandom&#8221; information in x just by saying that x belongs that S.)<\/li>\n<\/ol>\n<p>Intuitively, Soph(x) is the length of the shortest computer program that describes, not necessarily x itself, but a set S of which x is a &#8220;random&#8221; or &#8220;generic&#8221; member.&nbsp; To illustrate, any string x with small Kolmogorov complexity has small sophistication, since we can let S be the singleton set {x}.&nbsp; However, a uniformly-random string <em>also<\/em> has small sophistication, since we can let S be the set {0,1}<sup>n<\/sup> of all n-bit strings.&nbsp; In fact, the question arises of whether there are <em>any<\/em> sophisticated strings!&nbsp; Apparently, after Kolmogorov raised this question in the early 1980s, it was answered in the affirmative by Alexander Shen (for more, see <a href=\"http:\/\/homepages.cwi.nl\/~paulv\/papers\/algorithmicstatistics.pdf\">this paper<\/a> by G\u00e1cs, Tromp, and Vit\u00e1nyi).&nbsp; The construction is via a diagonalization argument that&#8217;s a bit too complicated to fit in this blog post.<\/p>\n<p>But what does any of this have to do with coffee cups?&nbsp; Well, at first glance, sophistication seems to have exactly the properties that we were looking for in a &#8220;complextropy&#8221; measure: it&#8217;s small for both simple strings <em>and<\/em> uniformly random strings, but large for strings in a weird third category of &#8220;neither simple nor random.&#8221;&nbsp; Unfortunately, as we defined it above, sophistication still doesn&#8217;t do the job.&nbsp; For deterministic systems, the problem is the same as the one pointed out earlier for Kolmogorov complexity: we can always describe the system&#8217;s state after t time steps by specifying the initial state, the transition rule, and t.&nbsp; Therefore the sophistication can never exceed log(t)+c.&nbsp; Even for probabilistic systems, though, we can specify <em>the set S(t) of all possible states<\/em> after t time steps by specifying the initial state, the probabilistic transition rule, and t.&nbsp; And, at least assuming that the probability distribution over S(t) is uniform, by a simple counting argument the state after t steps will almost always be a &#8220;generic&#8221; element of S(t).&nbsp; So again, the sophistication will almost never exceed log(t)+c.&nbsp; (If the distribution over S(t) is nonuniform, then some technical further arguments are needed, which I omit.)<\/p>\n<p>How can we fix this problem?&nbsp; I think the key is to bring computational resource bounds into the picture.&nbsp; (We already saw a hint of this in the discussion of entropy.)&nbsp; In particular, suppose we define the complextropy of an n-bit string x to be something like the following:<\/p>\n<p style=\"padding-left: 30px;\"><em>the number of bits in the shortest computer program that runs in n log(n) time, and that outputs a nearly-uniform sample from a set S such that (i) x\u2208S, and (ii) any computer program that outputs x in n log(n) time, given an oracle that provides independent, uniform samples from S, has at least log<sub>2<\/sub>(|S|)-c bits, for some constant c.<\/em><\/p>\n<p>Here n log(n) is just intended as a concrete example of a complexity bound: one could replace it with some other time bound, or a restriction to (say) constant-depth circuits or some other weak model of computation.&nbsp; The motivation for the definition is that we want <em>some<\/em> &#8220;complextropy&#8221; measure that will assign a value close to 0 to the first and third coffee cups in the picture, but a large value to the second coffee cup.&nbsp; And thus we consider the length of the shortest efficient computer program that outputs, not necessarily the target string x itself, but a sample from a probability distribution D such that x is not efficiently compressible with respect to D.&nbsp; (In other words, x looks to any efficient algorithm like a &#8220;random&#8221; or &#8220;generic&#8221; sample from D.)<\/p>\n<p>Note that it&#8217;s essential for this definition that we imposed a computational efficiency requirement in <em>two<\/em> places: on the sampling algorithm, and <em>also<\/em> on the algorithm that reconstructs x given the sampling oracle.&nbsp; Without the first efficiency constraint, the complextropy could never exceed log(t)+c by the previous argument.&nbsp; Meanwhile, without the second efficiency constraint, the complextropy <em>would<\/em> increase, but then it would probably keep right on increasing, for the following reason: a time-bounded sampling algorithm wouldn&#8217;t be able to sample from <em>exactly<\/em> the right set S, only a reasonable facsimile thereof, and a reconstruction algorithm with <em>unlimited time<\/em> could probably then use special properties of the target string x to reconstruct x with fewer than log<sub>2<\/sub>(|S|)-c bits.<\/p>\n<p>But as long as we remember to put computational efficiency requirements on <em>both<\/em> algorithms, I <em>conjecture<\/em> that the complextropy will satisfy the &#8220;First Law of Complexodynamics,&#8221; exhibiting exactly the behavior that Sean wants: small for the initial state, large for intermediate states, then small again once the mixing has finished.&nbsp; I don&#8217;t yet know how to prove this conjecture.&nbsp; But crucially, it&#8217;s <em>not<\/em> a hopelessly open-ended question that one tosses out just to show how wide-ranging one&#8217;s thoughts are, but a relatively-bounded question about which actual theorems could be proved and actual papers published.<\/p>\n<p>If you want to do so, the first step will be to &#8220;instantiate&#8221; everything I said above with a particular model system and particular resource constraints.&nbsp; One good choice could be a discretized &#8220;coffee cup,&#8221; consisting of a 2D array of black and white pixels (the &#8220;coffee&#8221; and &#8220;milk&#8221;), which are initially in separated components and then subject to random nearest-neighbor mixing dynamics.&nbsp; (E.g., at each time step, we pick an adjacent coffee pixel and milk pixel uniformly at random, and swap the two.) &nbsp;Can we show that for such a system, the complextropy becomes large at intermediate times (intuitively, because of the need to specify the irregular <em>boundaries<\/em> between the regions of all-black pixels, all-white pixels, and mixed black-and-white pixels)?<\/p>\n<p>One could try to show such a statement either theoretically or empirically. &nbsp;Theoretically, I have no idea where to begin in proving it, despite a clear intuition that such a statement should hold: let me toss it out as a wonderful (I think) open problem! &nbsp;At an empirical level, one could simply try to <em>plot<\/em> the complextropy in some simulated system, like the discrete coffee cup, and show that it has the predicted small-large-small behavior. &nbsp; One obvious difficulty here is that the complextropy, under any definition like the one I gave, is almost certainly going to be intractable to compute or even approximate. &nbsp;However, one could try to get around that problem the same way many others have, in empirical research inspired by Kolmogorov complexity: namely, by using something you <em>can<\/em> compute (e.g., the size of a gzip compressed file) as a rough-and-ready substitute for something you <em>can&#8217;t<\/em> compute (e.g., the Kolmogorov complexity K(x)). &nbsp;In the interest of a full disclosure, a wonderful MIT undergrad, Lauren Oullette, recently started a research project with me where she&#8217;s trying to do exactly that. &nbsp;So hopefully, by the end of the semester, we&#8217;ll be able to answer Sean&#8217;s question at least at a physics level of rigor! &nbsp;Answering the question at a math\/CS level of rigor could take a while longer.<\/p>\n<p>PS (unrelated). Are neutrinos traveling faster than light? &nbsp;See <a href=\"http:\/\/www.xkcd.com\/955\/\">this xkcd strip<\/a> (which does what I was trying to do in the Deolalikar affair, but better).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A few weeks ago, I had the pleasure of attending FQXi&#8217;s Setting Time Aright conference, part of which took place on a cruise from Bergen, Norway to Copenhagen, Denmark.&nbsp; (Why aren&#8217;t theoretical computer science conferences ever held on cruises?&nbsp; If nothing else, it certainly cuts down on attendees sneaking away from the conference venue.)&nbsp; This [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_seo_schema_type":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"{title}\n\n{excerpt}\n\n{url}","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_wpas_customize_per_network":false,"jetpack_post_was_ever_published":false},"categories":[5,19],"tags":[],"class_list":["post-762","post","type-post","status-publish","format-standard","hentry","category-complexity","category-physics-for-doofuses"],"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/scottaaronson.blog\/index.php?rest_route=\/wp\/v2\/posts\/762","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/scottaaronson.blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/scottaaronson.blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/scottaaronson.blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/scottaaronson.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=762"}],"version-history":[{"count":31,"href":"https:\/\/scottaaronson.blog\/index.php?rest_route=\/wp\/v2\/posts\/762\/revisions"}],"predecessor-version":[{"id":5949,"href":"https:\/\/scottaaronson.blog\/index.php?rest_route=\/wp\/v2\/posts\/762\/revisions\/5949"}],"wp:attachment":[{"href":"https:\/\/scottaaronson.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=762"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/scottaaronson.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=762"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/scottaaronson.blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=762"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}