{"id":313,"date":"2019-11-01T12:00:59","date_gmt":"2019-11-01T17:00:59","guid":{"rendered":"http:\/\/blogs.acu.edu\/mu_sigma\/?p=313"},"modified":"2019-11-01T12:01:17","modified_gmt":"2019-11-01T17:01:17","slug":"problem-7-fall-2019","status":"publish","type":"post","link":"https:\/\/blogs.acu.edu\/mu_sigma\/2019\/11\/01\/problem-7-fall-2019\/","title":{"rendered":"Problem 7 &#8211; Fall 2019 &#8211; What Does This Thing Do?"},"content":{"rendered":"<p><span style=\"font-size: xx-large\"><b>What Does This Thing Do?<\/b><\/span><\/p>\n<p>Determine what the following algorithm does, and then prove that it does what you think it does.<\/p>\n<p>{Input: a real number <i>a<\/i> and a positive integer <i>n<\/i>.}<br \/>\n<b>begin<\/b><br \/>\n<i>p<\/i> := 1<br \/>\n<i>q<\/i> := <i>a<\/i><br \/>\n<i>i<\/i> := <i>n<\/i><br \/>\n<b>while<\/b> <i>i<\/i> &gt; 0 <b>do<\/b><br \/>\n<b>if<\/b> <i>i<\/i> is odd <b>then<\/b> <i>p<\/i> := <i>p*q<\/i><br \/>\n{Do the next two steps whether or not <i>i<\/i> is odd.}<br \/>\n<i>q<\/i> := <i>q*q<\/i><br \/>\n<i>i<\/i> := <i>i<\/i> DIV 2 = floor(<i>i<\/i>\/2)<br \/>\n<b>return<\/b> <i>p<\/i><br \/>\n<b>end<\/b><\/p>\n<p>Please submit all answers to mathpotw@acu.edu, by 5:00 PM on Thursday, November 7.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>What Does This Thing Do? Determine what the following algorithm does, and then prove that it does what you think it does. {Input: a real number a and a positive integer n.} begin p := 1 q := a i := n while i &gt; 0 do if i is odd then p := p*q [&hellip;]<\/p>\n","protected":false},"author":130,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[181534],"tags":[],"class_list":["post-313","post","type-post","status-publish","format-standard","hentry","category-problem-of-the-week"],"_links":{"self":[{"href":"https:\/\/blogs.acu.edu\/mu_sigma\/wp-json\/wp\/v2\/posts\/313","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.acu.edu\/mu_sigma\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.acu.edu\/mu_sigma\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.acu.edu\/mu_sigma\/wp-json\/wp\/v2\/users\/130"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.acu.edu\/mu_sigma\/wp-json\/wp\/v2\/comments?post=313"}],"version-history":[{"count":2,"href":"https:\/\/blogs.acu.edu\/mu_sigma\/wp-json\/wp\/v2\/posts\/313\/revisions"}],"predecessor-version":[{"id":315,"href":"https:\/\/blogs.acu.edu\/mu_sigma\/wp-json\/wp\/v2\/posts\/313\/revisions\/315"}],"wp:attachment":[{"href":"https:\/\/blogs.acu.edu\/mu_sigma\/wp-json\/wp\/v2\/media?parent=313"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.acu.edu\/mu_sigma\/wp-json\/wp\/v2\/categories?post=313"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.acu.edu\/mu_sigma\/wp-json\/wp\/v2\/tags?post=313"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}