{"id":1136,"date":"2016-11-23T20:00:01","date_gmt":"2016-11-23T19:00:01","guid":{"rendered":"http:\/\/morony.pl\/?p=1136"},"modified":"2016-11-23T22:03:42","modified_gmt":"2016-11-23T21:03:42","slug":"prosty-problem-jako-zadanie-z-programowania","status":"publish","type":"post","link":"https:\/\/morony.pl\/?p=1136","title":{"rendered":"Prosty problem jako zadanie z programowania"},"content":{"rendered":"<p>Ka\u017cdy pomys\u0142 na fajne zadanie z programowania jest bardzo cenny. Dobre zadanie dla student\u00f3w powinno by\u0107 ciekawe i powi\u0105zane z jakim\u015b \u017cyciowym problemem, tak aby \u0142atwiej by\u0142o si\u0119 skupi\u0107 na samej istocie programowania a nie na samym problemie. Sam chodzi\u0142em kiedy\u015b na zaj\u0119cia, gdzie prowadz\u0105cy wymy\u015bla\u0142 abstrakcyjne problemy, kt\u00f3re \u0142atwo by\u0142o oprogramowa\u0107, ale bardzo trudno by\u0142o zrozumie\u0107 o co chodzi i po co to wszystko. Wczoraj otworzy\u0142em nowy wielopak zapa\u0142ek i okaza\u0142y si\u0119 to by\u0107 te z klasyczn\u0105 \u0142amig\u0142\u00f3wk\u0105 z przek\u0142adaniem jednej zapa\u0142ki:<\/p>\n<p><center><a href=\"http:\/\/morony.pl\/wp-content\/uploads\/2016\/11\/IMG_1110.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"503\" src=\"http:\/\/morony.pl\/wp-content\/uploads\/2016\/11\/IMG_1110-1024x503.jpg\" alt=\"img_1110\" style=\"width:500px;height:auto;\" class=\"alignnone size-large wp-image-1137\" srcset=\"https:\/\/morony.pl\/wp-content\/uploads\/2016\/11\/IMG_1110-1024x503.jpg 1024w, https:\/\/morony.pl\/wp-content\/uploads\/2016\/11\/IMG_1110-300x147.jpg 300w, https:\/\/morony.pl\/wp-content\/uploads\/2016\/11\/IMG_1110-768x377.jpg 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/center><\/p>\n<p>Pomy\u015bla\u0142em, \u017ce mog\u0142o by to by\u0107 fajne zadanie dla student\u00f3w I roku. Ja zazwyczaj ucz\u0119 Pythona, wi\u0119c podj\u0105\u0142em pr\u00f3b\u0119 napisania programu. W pierwszej wersji zadaniem programu jest po prostu znalezienie rozwi\u0105zania (lub rozwi\u0105za\u0144) pojedynczego problemu:<\/p>\n<p><center><\/p>\n<pre style=\"width:700px; height:300px; overflow:auto; text-align:left;\"><code class=\"python\">\r\nplus = dict()\r\nplus[0] = [8]\r\nplus[1] = [7]\r\nplus[2] = []\r\nplus[3] = [9]\r\nplus[4] = []\r\nplus[5] = [9]\r\nplus[6] = [8]\r\nplus[7] = []\r\nplus[8] = []\r\nplus[9] = [8]\r\n\r\nminus = dict()\r\nminus[0] = []\r\nminus[1] = []\r\nminus[2] = []\r\nminus[3] = []\r\nminus[4] = []\r\nminus[5] = []\r\nminus[6] = []\r\nminus[7] = [1]\r\nminus[8] = [0, 6, 9]\r\nminus[9] = [3, 5]\r\n\r\nswap = dict()\r\nswap[0] = [6, 9]\r\nswap[1] = []\r\nswap[2] = [3]\r\nswap[3] = [2, 5]\r\nswap[4] = []\r\nswap[5] = [3]\r\nswap[6] = [0, 9]\r\nswap[7] = []\r\nswap[8] = []\r\nswap[9] = [0, 6]\r\n\r\n\r\ndef test_single(a, o1, b, o2, c):\r\n\tif o2 == \"=\":\r\n\t\tif o1 == \"+\":\r\n\t\t\treturn a+b==c\r\n\t\telif o1 == \"-\":\r\n\t\t\treturn a-b==c\r\n\t\telse:\r\n\t\t\tprint('ERROR')\r\n\telif o1 == \"=\":\r\n\t\tif o2 == \"+\":\r\n\t\t\treturn a+b==c\r\n\t\telif o2 == \"-\":\r\n\t\t\treturn a-b==c\r\n\t\telse:\r\n\t\t\tprint('ERROR')\r\n\telse:\r\n\t\tprint('ERROR')\r\ndef print_result(a, o1, b, o2, c,debug):\r\n\tprint(\"{5}: {0}{1}{2}{3}{4}:\".format(a,o1,b,o2,c,debug), test_single(a, o1, b, o2, c));\r\n\r\n\r\ndef all_comb(a, o1, b, o2, c):\r\n\t#print(\"SWAPY\")\r\n\tfor a1 in swap[a]:\r\n\t\tprint_result(a1, o1, b, o2, c,1)\r\n\tfor b1 in swap[b]:\r\n\t\tprint_result(a, o1, b1, o2, c,2)\r\n\tfor c1 in swap[c]:\r\n\t\tprint_result(a, o1, b, o2, c1,3)\r\n\tif o1 == '-':\r\n\t\tprint_result(a, \"=\", b, \"-\", c,4)\r\n\t#print(\"A minus\")\r\n\tfor a1 in minus[a]:\r\n\t\tfor b1 in plus[b]:\r\n\t\t\tprint_result(a1, o1, b1, o2, c,5)\r\n\t\tfor c1 in plus[c]:\r\n\t\t\tprint_result(a1, o1, b, o2, c1,6)\r\n\t\tif o1 == \"-\":\r\n\t\t\tprint_result(a1, \"+\", b, o2, c,7)\r\n\t\tif o2 == \"-\":\r\n\t\t\tprint_result(a1, o1, b, \"+\", c,8)\r\n\t#print(\"B minus\")\r\n\tfor b1 in minus[b]:\r\n\t\tfor a1 in plus[a]:\r\n\t\t\tprint_result(a1, o1, b1, o2, c,9)\r\n\t\tfor c1 in plus[c]:\r\n\t\t\tprint_result(a, o1, b1, o2, c1,10)\r\n\t\tif o1 == \"-\":\r\n\t\t\tprint_result(a, \"+\", b1, o2, c,11)\r\n\t\tif o2 == \"-\":\r\n\t\t\tprint_result(a, o1, b1, \"+\", c,12)\r\n\t#print(\"C minus\")\r\n\tfor c1 in minus[c]:\r\n\t\tfor b1 in plus[b]:\r\n\t\t\tprint_result(a, o1, b1, o2, c1,13)\r\n\t\tfor a1 in plus[a]:\r\n\t\t\tprint_result(a1, o1, b, o2, c1,14)\r\n\t\tif o1 == \"-\":\r\n\t\t\tprint_result(a, \"+\", b, o2, c1,15)\r\n\t\tif o2 == \"-\":\r\n\t\t\tprint_result(a, o1, b, \"+\", c1,16)\r\n\r\n\t#print(\"+ minus\")\r\n\tif o1 == \"+\":\r\n\t\tfor a1 in plus[a]:\r\n\t\t\tprint_result(a1, \"-\", b, o2, c,17)\r\n\t\tfor b1 in plus[b]:\r\n\t\t\tprint_result(a, \"-\", b1, o2, c,18)\r\n\t\tfor c1 in plus[c]:\r\n\t\t\tprint_result(a, \"-\", b, o2, c1,19)\r\n\r\n\r\nall_comb(1,\"+\",2,\"=\",8)\r\n<\/code><\/pre>\n<p><\/center><\/p>\n<p>Nie jest to rozwi\u0105zanie w \u017caden spos\u00f3b zoptymalizowane. By\u0142bym zadowolony, gdyby na zaj\u0119ciach uda\u0142o si\u0119 doj\u015b\u0107 do takiego rozwi\u0105zania. Dla r\u00f3wnania 1+2=8 program zwraca taki wynik:<\/p>\n<p><center><a href=\"http:\/\/morony.pl\/wp-content\/uploads\/2016\/11\/screenshot_43.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/morony.pl\/wp-content\/uploads\/2016\/11\/screenshot_43.png\" alt=\"screenshot_43\" width=\"641\" height=\"198\" class=\"alignnone size-full wp-image-1142\" srcset=\"https:\/\/morony.pl\/wp-content\/uploads\/2016\/11\/screenshot_43.png 641w, https:\/\/morony.pl\/wp-content\/uploads\/2016\/11\/screenshot_43-300x93.png 300w\" sizes=\"(max-width: 641px) 100vw, 641px\" \/><\/a><\/center><\/p>\n<p>Dzia\u0142anie programu opiera si\u0119 po pierwsze na 3 zdefiniowanych s\u0142ownikach, kt\u00f3re okre\u015blaj\u0105 na jak\u0105 cyfr\u0119 mo\u017cna zmieni\u0107 dan\u0105 cyfr\u0119 po odj\u0119ciu, dodaniu i prze\u0142o\u017ceniu jednej zapa\u0142ki. Po drugie program przewiduje wszystkie przypadki zamian: np. odj\u0119cie zapa\u0142ki z pierwszej cyfry i dodanie do cyfry drugiej lub trzeciej. W sumie przewidziane jest 19 przypadk\u00f3w (mo\u017ce da si\u0119 to zoptymalizowa\u0107?). <\/p>\n<p>Drug\u0105, r\u00f3wnie ciekaw\u0105 wersj\u0105 programu jest wygenerowanie wszystkich mo\u017cliwych \u0142amig\u0142\u00f3wek. Tu nale\u017cy zdecydowa\u0107, czy rozwa\u017camy te r\u00f3wnania, kt\u00f3re s\u0105 poprawne na wej\u015bciu. Ja zdecydowa\u0142em ich nie pomija\u0107, bo wymagamy poprawno\u015bci po prze\u0142o\u017ceniu jednej zapa\u0142ki. Kod wygl\u0105da tak:<\/p>\n<p><center><\/p>\n<pre style=\"width:700px; height:300px; overflow:auto; text-align:left;\"><code class=\"python\">\r\nplus = dict()\r\nplus[0] = [8]\r\nplus[1] = [7]\r\nplus[2] = []\r\nplus[3] = [9]\r\nplus[4] = []\r\nplus[5] = [9]\r\nplus[6] = [8]\r\nplus[7] = []\r\nplus[8] = []\r\nplus[9] = [8]\r\n\r\nminus = dict()\r\nminus[0] = []\r\nminus[1] = []\r\nminus[2] = []\r\nminus[3] = []\r\nminus[4] = []\r\nminus[5] = []\r\nminus[6] = []\r\nminus[7] = [1]\r\nminus[8] = [0, 6, 9]\r\nminus[9] = [3, 5]\r\n\r\nswap = dict()\r\nswap[0] = [6, 9]\r\nswap[1] = []\r\nswap[2] = [3]\r\nswap[3] = [2, 5]\r\nswap[4] = []\r\nswap[5] = [3]\r\nswap[6] = [0, 9]\r\nswap[7] = []\r\nswap[8] = []\r\nswap[9] = [0, 6]\r\n\r\n\r\ndef test_single(a, o1, b, o2, c):\r\n\tif o2 == \"=\":\r\n\t\tif o1 == \"+\":\r\n\t\t\treturn a+b==c\r\n\t\telif o1 == \"-\":\r\n\t\t\treturn a-b==c\r\n\t\telse:\r\n\t\t\tprint('ERROR')\r\n\telif o1 == \"=\":\r\n\t\tif o2 == \"+\":\r\n\t\t\treturn a+b==c\r\n\t\telif o2 == \"-\":\r\n\t\t\treturn a-b==c\r\n\t\telse:\r\n\t\t\tprint('ERROR')\r\n\telse:\r\n\t\tprint('ERROR')\r\ndef print_result(wa,wo1,wb,wo2,wc,a, o1, b, o2, c):\r\n\tif test_single(a, o1, b, o2, c):\r\n\t\tprint(\"{0}{1}{2}{3}{4} -> {5}{6}{7}{8}{9}\".format(wa,wo1,wb,wo2,wc,a,o1,b,o2,c))\r\n\t\treturn 1\r\n\telse:\r\n\t\treturn 0;\r\n\r\n\r\ndef all_comb(a, o1, b, o2, c):\r\n\tcount = 0\r\n\tfor a1 in swap[a]:\r\n\t\tcount = count + print_result(a,o1,b,o2,c,a1, o1, b, o2, c)\r\n\tfor b1 in swap[b]:\r\n\t\tcount = count + print_result(a,o1,b,o2,c,a, o1, b1, o2, c)\r\n\tfor c1 in swap[c]:\r\n\t\tcount = count + print_result(a,o1,b,o2,c,a, o1, b, o2, c1)\r\n\tif o1 == '-':\r\n\t\tcount = count + print_result(a,o1,b,o2,c,a, \"=\", b, \"-\", c)\r\n\tfor a1 in minus[a]:\r\n\t\tfor b1 in plus[b]:\r\n\t\t\tcount = count + print_result(a,o1,b,o2,c,a1, o1, b1, o2, c)\r\n\t\tfor c1 in plus[c]:\r\n\t\t\tcount = count + print_result(a,o1,b,o2,c,a1, o1, b, o2, c1)\r\n\t\tif o1 == \"-\":\r\n\t\t\tcount = count + print_result(a,o1,b,o2,c,a1, \"+\", b, o2, c)\r\n\t\tif o2 == \"-\":\r\n\t\t\tcount = count + print_result(a,o1,b,o2,c,a1, o1, b, \"+\", c)\r\n\tfor b1 in minus[b]:\r\n\t\tfor a1 in plus[a]:\r\n\t\t\tcount = count + print_result(a,o1,b,o2,c,a1, o1, b1, o2, c)\r\n\t\tfor c1 in plus[c]:\r\n\t\t\tcount = count + print_result(a,o1,b,o2,c,a, o1, b1, o2, c1)\r\n\t\tif o1 == \"-\":\r\n\t\t\tcount = count + print_result(a,o1,b,o2,c,a, \"+\", b1, o2, c)\r\n\t\tif o2 == \"-\":\r\n\t\t\tcount = count + print_result(a,o1,b,o2,c,a, o1, b1, \"+\", c)\r\n\tfor c1 in minus[c]:\r\n\t\tfor b1 in plus[b]:\r\n\t\t\tcount = count + print_result(a,o1,b,o2,c,a, o1, b1, o2, c1)\r\n\t\tfor a1 in plus[a]:\r\n\t\t\tcount = count + print_result(a,o1,b,o2,c,a1, o1, b, o2, c1)\r\n\t\tif o1 == \"-\":\r\n\t\t\tcount = count + print_result(a,o1,b,o2,c,a, \"+\", b, o2, c1)\r\n\t\tif o2 == \"-\":\r\n\t\t\tcount = count + print_result(a,o1,b,o2,c,a, o1, b, \"+\", c1)\r\n\tif o1 == \"+\":\r\n\t\tfor a1 in plus[a]:\r\n\t\t\tcount = count + print_result(a,o1,b,o2,c,a1, \"-\", b, o2, c)\r\n\t\tfor b1 in plus[b]:\r\n\t\t\tcount = count + print_result(a,o1,b,o2,c,a, \"-\", b1, o2, c)\r\n\t\tfor c1 in plus[c]:\r\n\t\t\tcount = count + print_result(a,o1,b,o2,c,a, \"-\", b, o2, c1)\r\n\treturn count\r\n\r\nfor to1 in [\"+\", \"-\"]:\r\n\tfor ta in range(10):\r\n\t\tfor tb in range(10):\r\n\t\t\tfor tc in range(10):\r\n\t\t\t\ttcount = all_comb(ta,to1,tb,\"=\",tc)\r\n\t\t\t\t#if tcount > 2:\r\n\t\t\t\t#\tprint(\"{0}{1}{2}{3}{4}\".format(ta,to1,tb,\"=\",tc), tcount)\r\n<\/code><\/pre>\n<p><\/center><\/p>\n<p>Wynik jest obliczany w mgnieniu oka. Dla rozwi\u0105zania dla \u0142amig\u0142\u00f3wek z obrazka s\u0105 nast\u0119puj\u0105ce:<\/p>\n<p><center><a href=\"http:\/\/morony.pl\/wp-content\/uploads\/2016\/11\/screenshot_44.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/morony.pl\/wp-content\/uploads\/2016\/11\/screenshot_44.png\" alt=\"screenshot_44\" width=\"641\" height=\"296\" class=\"alignnone size-full wp-image-1144\" srcset=\"https:\/\/morony.pl\/wp-content\/uploads\/2016\/11\/screenshot_44.png 641w, https:\/\/morony.pl\/wp-content\/uploads\/2016\/11\/screenshot_44-300x139.png 300w\" sizes=\"(max-width: 641px) 100vw, 641px\" \/><\/a><\/center><\/p>\n<p>Lista wszystkich kombinacji dla potomnych:<\/p>\n<p><center><\/p>\n<pre style=\"width:700px; height:300px; overflow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> 9-1=8\r\n9-7=2 -> 9=7-2\r\n9-7=3 -> 9-7=2\r\n9-7=6 -> 9-1=8\r\n9-7=7 -> 8-1=7\r\n9-7=7 -> 8-7=1\r\n9-7=9 -> 9-1=8\r\n9-8=1 -> 9=8-1\r\n9-8=2 -> 8-6=2\r\n9-8=3 -> 9-0=9\r\n9-8=5 -> 9-0=9\r\n9-8=8 -> 8-0=8\r\n9-8=8 -> 8-8=0\r\n9-8=9 -> 9+0=9\r\n9-9=0 -> 9=9-0\r\n9-9=3 -> 9-6=3\r\n9-9=3 -> 8-5=3\r\n9-9=5 -> 8-3=5\r\n9-9=6 -> 9-9=0\r\n9-9=7 -> 9-8=1\r\n9-9=9 -> 9-0=9\r\n9-9=9 -> 9-9=0\r\n<\/code><\/pre>\n<p><\/center><\/p>\n<p>Mam nadziej\u0119, \u017ce nie ma jakich drastycznych b\u0142\u0119d\u00f3w w rozwi\u0105zaniu?<\/p>\n<p>W ramach \u0107wicze\u0144 polecam ka\u017cdemu ch\u0119tnemu rozwi\u0105zanie tego problemu w Waszym ulubionym j\u0119zyku programowania. Je\u017celi twierdzicie, \u017ce da si\u0119 pro\u015bciej to zapewne macie racje, ale zawsze mi\u0142o mi zobaczy\u0107 Wasz kod.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ka\u017cdy pomys\u0142 na fajne zadanie z programowania jest bardzo cenny. Dobre zadanie dla student\u00f3w powinno by\u0107 ciekawe i powi\u0105zane z jakim\u015b \u017cyciowym problemem, tak aby \u0142atwiej by\u0142o si\u0119 skupi\u0107 na samej istocie programowania a nie na samym problemie. Sam chodzi\u0142em kiedy\u015b na zaj\u0119cia, gdzie prowadz\u0105cy wymy\u015bla\u0142 abstrakcyjne problemy, kt\u00f3re \u0142atwo by\u0142o oprogramowa\u0107, ale bardzo trudno [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/morony.pl\/index.php?rest_route=\/wp\/v2\/posts\/1136"}],"collection":[{"href":"https:\/\/morony.pl\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/morony.pl\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/morony.pl\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/morony.pl\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1136"}],"version-history":[{"count":8,"href":"https:\/\/morony.pl\/index.php?rest_route=\/wp\/v2\/posts\/1136\/revisions"}],"predecessor-version":[{"id":1147,"href":"https:\/\/morony.pl\/index.php?rest_route=\/wp\/v2\/posts\/1136\/revisions\/1147"}],"wp:attachment":[{"href":"https:\/\/morony.pl\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1136"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/morony.pl\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1136"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/morony.pl\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1136"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}