{"id":5399,"date":"2013-03-14T19:13:01","date_gmt":"2013-03-14T19:13:01","guid":{"rendered":"http:\/\/meeseeks:5080\/blog\/?p=5399"},"modified":"2024-03-23T16:01:13","modified_gmt":"2024-03-23T16:01:13","slug":"combining-actions","status":"publish","type":"post","link":"https:\/\/vukutu.com\/blog\/2013\/03\/combining-actions\/","title":{"rendered":"Combining actions"},"content":{"rendered":"<blockquote><\/blockquote>\n<p>How might two actions be combined?\u00a0 Well, depending on the actions, we may be able to do one action and then the other, or we may be able do the other and then the one, or maybe not.\u00a0 We call such a combination a sequence or concatenation of the two actions.\u00a0 In some cases, we may be able to do the two actions\u00a0in parallel, both at the same time.\u00a0 We may have to start them simultaneously, or we may be able to start one before the other.\u00a0 Or, we may have to ensure they finish\u00a0together, or that\u00a0they jointly meet some other intermediate synchronization targets.<\/p>\n<blockquote><\/blockquote>\n<p>In some cases, we may be able to interleave them, doing part of one action, then part of the second, then part of the first again, what management consultants in telecommunications call multiplexing.\u00a0\u00a0 For many human physical activities &#8211; such as learning\u00a0to play the piano or learning to play golf &#8211; interleaving is how parallel activities are first learnt and complex motor skills acquired:\u00a0 first play a few bars of music on the piano with only the left hand, then the same bars with only the right, and keep practicing the hands on their own, and only after the two hands are each practiced individually do we try playing the piano with the two hands together.<\/p>\n<blockquote><\/blockquote>\n<p>Computer science, which I view as the science of delegation, knows a great deal about how actions may be combined, how they may be distributed across multiple actors, and what the meanings and consequences of these different combinations are likely to be.  It is useful to have an exhaustive list of the possibilities. Let us suppose we have two actions, represented by A and B respectively.  Then we may be able to do the following compound actions:<\/p>\n<ul>\n<li><strong>Sequence:<\/strong>\u00a0 The execution of A followed by the execution of B, denoted A ;\u00a0B<\/li>\n<li><strong>Iterate:<\/strong> A executed n times, denoted A ^ n\u00a0 (This is sequential execution of a single action.)<\/li>\n<li><strong>Parallelize:<\/strong> Both A and B are executed together, denoted A &amp; B<\/li>\n<li><strong>Interleave:<\/strong>\u00a0 Action A is partly executed, followed by part-execution of B, followed by continued part-execution of A, etc, denoted A || B<\/li>\n<li><strong>Choose:<\/strong>\u00a0 Either A is executed or B is executed but not both, denoted A v B<\/li>\n<li><strong>Combinations of the above:<\/strong>\u00a0 For example, with interleaving, only one action is ever being executed at one time.\u00a0 But it may be that the part-executions of A and B can overlap, so we have a combination of Parallel and Interleaved compositions of A and B.<\/li>\n<\/ul>\n<p>Depending on the nature of the domain and the nature of the actions, not all of these compound actions may necessarily\u00a0 be possible.\u00a0 For instance, if action B has some pre-conditions before it can be executed, then the prior execution of A has to successfully achieve these pre-conditions in order for the sequence A ; B to be feasible.<\/p>\n<blockquote><\/blockquote>\n<p>This stuff may seem very nitty-gritty, but anyone who&#8217;s ever asked a teenager to do some task they don&#8217;t wish to do, will know all the variations in which a required task can be done after, or alongside, or intermittently with,\u00a0or be replaced instead by, some other task the teen would prefer to do.\u00a0\u00a0\u00a0 Machines, it turns out, are much like recalcitrant and literal-minded teenagers when it comes to commanding them to do stuff.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How might two actions be combined?\u00a0 Well, depending on the actions, we may be able to do one action and then the other, or we may be able do the other and then the one, or maybe not.\u00a0 We call such a combination a sequence or concatenation of the two actions.\u00a0 In some cases, we [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,23,40,45,62],"tags":[],"class_list":["post-5399","post","type-post","status-publish","format-standard","hentry","category-computer-science","category-decision-theory","category-joint-action-society","category-logic","category-planning","p1","y2013","m03","d14","h19"],"_links":{"self":[{"href":"https:\/\/vukutu.com\/blog\/wp-json\/wp\/v2\/posts\/5399","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vukutu.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vukutu.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vukutu.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vukutu.com\/blog\/wp-json\/wp\/v2\/comments?post=5399"}],"version-history":[{"count":1,"href":"https:\/\/vukutu.com\/blog\/wp-json\/wp\/v2\/posts\/5399\/revisions"}],"predecessor-version":[{"id":12460,"href":"https:\/\/vukutu.com\/blog\/wp-json\/wp\/v2\/posts\/5399\/revisions\/12460"}],"wp:attachment":[{"href":"https:\/\/vukutu.com\/blog\/wp-json\/wp\/v2\/media?parent=5399"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vukutu.com\/blog\/wp-json\/wp\/v2\/categories?post=5399"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vukutu.com\/blog\/wp-json\/wp\/v2\/tags?post=5399"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}