{"id":8117,"date":"2008-07-26T14:09:00","date_gmt":"2008-07-26T14:09:00","guid":{"rendered":"http:\/\/melotopia.net\/b\/?p=8117"},"modified":"2008-07-26T14:09:00","modified_gmt":"2008-07-26T14:09:00","slug":"sequences-in-geb","status":"publish","type":"post","link":"http:\/\/melotopia.net\/b\/?p=8117","title":{"rendered":"sequences in GEB"},"content":{"rendered":"<div class=\"desc\">\n        Goedel, Escher, Bach \uc5d0 \ub098\uc624\ub294 \ud568\uc218\ub4e4\uc744 \ub9cc\ub4e4\uc5b4 \ubcf4\uc558\ub2e4.<\/p>\n<p>        G sequence<br \/>\n        <\/p>\n<blockquote><p>\n         #include<stdio.h><br \/>\n         <br \/>\n         #include<stdlib.h><br \/>\n         <br \/>\n         #include<windows.h><\/p>\n<p>         int gfunction(int);<\/p>\n<p>         int main(int argc, char* argv[])<br \/>\n         <br \/>\n         {<br \/>\n         <br \/>\n         int i;<br \/>\n         <br \/>\n         if (argc==1){<br \/>\n         <br \/>\n         printf(&#8220;Error. There are no options.\\n&#8221;);<br \/>\n         <br \/>\n         exit(1);<br \/>\n         <br \/>\n         }<br \/>\n         <br \/>\n         i=atoi(argv[1]);<br \/>\n         <br \/>\n         printf(&#8220;%d&#8221;,gfunction(i));<br \/>\n         <br \/>\n         }<\/p>\n<p>         int gfunction(int i)<br \/>\n         <br \/>\n         {<br \/>\n         <br \/>\n         if (i<0) {\n         <br \/>\n         printf(&#8220;Error. Parameter is negative.\\n&#8221;);<br \/>\n         <br \/>\n         }<br \/>\n         <br \/>\n         else if (i==0) {<br \/>\n         <br \/>\n         return 0;<br \/>\n         <br \/>\n         }<br \/>\n         <br \/>\n         else {<br \/>\n         <br \/>\n         return (i-gfunction(gfunction(i-1)));<br \/>\n         <br \/>\n         }<br \/>\n         <br \/>\n         }<br \/>\n         \n<\/p><\/blockquote>\n<p>\n        H sequence<br \/>\n        <\/p>\n<blockquote><p>\n         #include<stdio.h><br \/>\n         <br \/>\n         #include<stdlib.h><br \/>\n         <br \/>\n         #include<windows.h><\/p>\n<p>         int hfunction(int);<\/p>\n<p>         int main(int argc, char* argv[])<br \/>\n         <br \/>\n         {<br \/>\n         <br \/>\n         int i;<br \/>\n         <br \/>\n         if (argc==1){<br \/>\n         <br \/>\n         printf(&#8220;Error. There are no options.\\n&#8221;);<br \/>\n         <br \/>\n         exit(1);<br \/>\n         <br \/>\n         }<br \/>\n         <br \/>\n         i=atoi(argv[1]);<br \/>\n         <br \/>\n         printf(&#8220;%d&#8221;,hfunction(i));<br \/>\n         <br \/>\n         }<\/p>\n<p>         int hfunction(int i)<br \/>\n         <br \/>\n         {<br \/>\n         <br \/>\n         if (i<0) {\n         <br \/>\n         printf(&#8220;Error. Parameter is negative.\\n&#8221;);<br \/>\n         <br \/>\n         }<br \/>\n         <br \/>\n         else if (i==0) {<br \/>\n         <br \/>\n         return 0;<br \/>\n         <br \/>\n         }<br \/>\n         <br \/>\n         else {<br \/>\n         <br \/>\n         return (i-hfunction(hfunction(hfunction(i-1))));<br \/>\n         <br \/>\n         }<br \/>\n         <br \/>\n         }<br \/>\n         \n<\/p><\/blockquote>\n<p>        M and F sequence<br \/>\n        <\/p>\n<blockquote><p>\n         #include<stdio.h><br \/>\n         <br \/>\n         #include<stdlib.h><br \/>\n         <br \/>\n         #include<windows.h><\/p>\n<p>         int mfunction(int);<br \/>\n         <br \/>\n         int ffunction(int);<\/p>\n<p>\n         int main(int argc, char* argv[])<br \/>\n         <br \/>\n         {<br \/>\n         <br \/>\n         int i;<br \/>\n         <br \/>\n         if (argc==1){<br \/>\n         <br \/>\n         printf(&#8220;Error. There are no options.\\n&#8221;);<br \/>\n         <br \/>\n         exit(1);<br \/>\n         <br \/>\n         }<br \/>\n         <br \/>\n         i=atoi(argv[1]);<br \/>\n         <br \/>\n         printf(&#8220;%d\\n&#8221;,mfunction(i));<br \/>\n         <br \/>\n         printf(&#8220;%d\\n&#8221;,ffunction(i));<br \/>\n         <br \/>\n         }<\/p>\n<p>         int mfunction(int i)<br \/>\n         <br \/>\n         {<br \/>\n         <br \/>\n         if (i<0) {\n         <br \/>\n         printf(&#8220;Error. Parameter is negative.\\n&#8221;);<br \/>\n         <br \/>\n         }<br \/>\n         <br \/>\n         else if (i==0) {<br \/>\n         <br \/>\n         return 0;<br \/>\n         <br \/>\n         }<br \/>\n         <br \/>\n         else {<br \/>\n         <br \/>\n         return (i-ffunction(mfunction(i-1)));<br \/>\n         <br \/>\n         }<br \/>\n         <br \/>\n         }<\/p>\n<p>         int ffunction(int i)<br \/>\n         <br \/>\n         {<br \/>\n         <br \/>\n         if (i<0) {\n         <br \/>\n         printf(&#8220;Error. Parameter is negative.\\n&#8221;);<br \/>\n         <br \/>\n         }<br \/>\n         <br \/>\n         else if (i==0) {<br \/>\n         <br \/>\n         return 1;<br \/>\n         <br \/>\n         }<br \/>\n         <br \/>\n         else {<br \/>\n         <br \/>\n         return (i-mfunction(ffunction(i-1)));<br \/>\n         <br \/>\n         }<br \/>\n         <br \/>\n         }<br \/>\n         \n<\/p><\/blockquote>\n<p>\n        Q sequence<br \/>\n        <\/p>\n<blockquote><p>\n         #include<stdio.h><br \/>\n         <br \/>\n         #include<stdlib.h><br \/>\n         <br \/>\n         #include<windows.h><\/p>\n<p>         int hfunction(int);<\/p>\n<p>         int main(void)<br \/>\n         <br \/>\n         {<br \/>\n         <br \/>\n         int n;<br \/>\n         <br \/>\n         for(n=1;n<100;n++)\n         <br \/>\n         printf(&#8220;%d, &#8220;,qfunction(n));<br \/>\n         <br \/>\n         }<\/p>\n<p>         int qfunction(int i)<br \/>\n         <br \/>\n         {<br \/>\n         <br \/>\n         if (i<0) {\n         <br \/>\n         printf(&#8220;Error. Parameter is negative.\\n&#8221;);<br \/>\n         <br \/>\n         }<br \/>\n         <br \/>\n         else if (i==2 || i==1) {<br \/>\n         <br \/>\n         return 1;<br \/>\n         <br \/>\n         }<br \/>\n         <br \/>\n         else {<br \/>\n         <br \/>\n         int q=qfunction(i-qfunction(i-1))+qfunction(i-qfunction(i-2));<br \/>\n         <br \/>\n         return q;<br \/>\n         <br \/>\n         }<br \/>\n         <br \/>\n         }<br \/>\n         \n<\/p><\/blockquote>\n<p>\n        \uadf8\ub0e5 \uc791\ub3d9\ud558\uae30\ub9cc \ud560 \ubfd0\uc778 \ud504\ub85c\uadf8\ub7a8\ub4e4\uc774\ub2e4.<br \/>\n        <br \/>\n        \ucef4\ud30c\uc77c\uc740 DevC++ 4.9.9.1 with MinGW \uc5d0\uc11c \ud574\uc11c \uc791\ub3d9\ud558\ub294 \uac83\uc744 \ud655\uc778\ud558\uc600\ub2e4.<br \/>\n        <\/p>\n<div style=\"width:100%;margin-top:30px;clear:both;height:30px\">\n<div style=\"width:31px;float:left;\">\n<a href=\"\/toolbar\/popup\/abuseReport\/?entryId=920\" onclick=\"window.open(this.href, 'tistoryThisBlogPopup', 'width=550, height=510, toolbar=no, menubar=no, status=no, scrollbars=no'); return false;\"><br \/>\n<img data-recalc-dims=\"1\" decoding=\"async\" alt=\"\uc2e0\uace0\" src=\"https:\/\/i0.wp.com\/t1.daumcdn.net\/tistory_admin\/static\/ico\/ico_spam_report.png\" style=\"border:0\"\/><br \/>\n<\/a>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Goedel, Escher, Bach \uc5d0 \ub098\uc624\ub294 \ud568\uc218\ub4e4\uc744 \ub9cc\ub4e4\uc5b4 \ubcf4\uc558\ub2e4. G sequence #include #include #include int gfunction(int); int main(int argc, char* argv[]) { int i; if (argc==1){ printf(&#8220;Error. There are no options.\\n&#8221;); exit(1); } i=atoi(argv[1]); printf(&#8220;%d&#8221;,gfunction(i)); } int gfunction(int i) { if (i<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[12],"tags":[],"class_list":["post-8117","post","type-post","status-publish","format-standard","hentry","category-12"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8o6gA-26V","jetpack-related-posts":[],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"http:\/\/melotopia.net\/b\/index.php?rest_route=\/wp\/v2\/posts\/8117","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/melotopia.net\/b\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/melotopia.net\/b\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/melotopia.net\/b\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/melotopia.net\/b\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8117"}],"version-history":[{"count":0,"href":"http:\/\/melotopia.net\/b\/index.php?rest_route=\/wp\/v2\/posts\/8117\/revisions"}],"wp:attachment":[{"href":"http:\/\/melotopia.net\/b\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8117"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/melotopia.net\/b\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8117"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/melotopia.net\/b\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8117"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}