Tweaked Sense implementation, updated runtimes
authorNeil Smith <neil.git@njae.me.uk>
Mon, 17 Jul 2017 10:26:27 +0000 (11:26 +0100)
committerNeil Smith <neil.git@njae.me.uk>
Mon, 17 Jul 2017 10:26:27 +0000 (11:26 +0100)
09-resolving-the-bill/resolving-the-bill-solution.ipynb
09-resolving-the-bill/summer09.sb

index 3643807022dbde7f6e593940e8571f66b3fa171b..3d9d63f1059b62509f1f2f78c3fc30745edc1964 100644 (file)
    "source": [
     "# Sense solution\n",
     "Took \n",
-    "* 22.9 seconds to load file\n",
-    "* 14906.8 seconds to find subsequences (4.14 hours; 4 hours, 8 minutes, 26.8 seconds)\n",
-    "* 41726.9 seconds to check all interleavings (11.59 hours; 11 hours, 35 minutes, 26.9 seconds)\n",
+    "* 25.8 seconds to load file\n",
+    "* 15203.9 seconds to find subsequences (4.22 hours; 4 hours, 13 minutes, 23.9 seconds)\n",
+    "* 40083.8 seconds to check all interleavings (11.13 hours; 11 hours, 8 minutes, 3.8 seconds)\n",
     "\n",
-    "Total of 15 hours 44 minutes 16.6 seconds."
+    "Total of 15 hours 21 minutes 53.5 seconds."
    ]
   },
   {
    "cell_type": "code",
-   "execution_count": 19,
+   "execution_count": 1,
    "metadata": {},
    "outputs": [
     {
      "data": {
       "text/plain": [
-       "(4.140777777777777, 4, 8, 26.799999999999272)"
+       "(4.223305555555555, 4, 13, 23.899999999999636)"
       ]
      },
-     "execution_count": 19,
+     "execution_count": 1,
      "metadata": {},
      "output_type": "execute_result"
     }
    ],
    "source": [
-    "rtime = 14906.8\n",
+    "rtime = 15203.9\n",
     "(rtime / 3600,\n",
     " int(rtime / 3600), \n",
     " int(rtime / 60 - int(rtime / 3600) * 60), \n",
   },
   {
    "cell_type": "code",
-   "execution_count": 20,
+   "execution_count": 2,
    "metadata": {},
    "outputs": [
     {
      "data": {
       "text/plain": [
-       "(11.590805555555557, 11, 35, 26.900000000001455)"
+       "(11.13438888888889, 11, 8, 3.8000000000029104)"
       ]
      },
-     "execution_count": 20,
+     "execution_count": 2,
      "metadata": {},
      "output_type": "execute_result"
     }
    ],
    "source": [
-    "rtime = 41726.9 \n",
+    "rtime = 40083.8\n",
     "(rtime / 3600,\n",
     " int(rtime / 3600), \n",
     " int(rtime / 60 - int(rtime / 3600) * 60), \n",
   },
   {
    "cell_type": "code",
-   "execution_count": 21,
+   "execution_count": 3,
    "metadata": {},
    "outputs": [
     {
      "data": {
       "text/plain": [
-       "(15.737944444444445, 15, 44, 16.599999999998545)"
+       "(15.36486111111111, 15, 21, 53.5)"
       ]
      },
-     "execution_count": 21,
+     "execution_count": 3,
      "metadata": {},
      "output_type": "execute_result"
     }
    ],
    "source": [
-    "rtime = 22.9 + 14906.8 + 41726.9 \n",
+    "rtime = 25.8 + 15203.9 +40083.8\n",
     "(rtime / 3600,\n",
     " int(rtime / 3600), \n",
     " int(rtime / 60 - int(rtime / 3600) * 60), \n",
index aed7a84359848c188951462ab89ef11e3cd96f63..59818ab8788bb2b2508cea00922f01cbebc957be 100644 (file)
Binary files a/09-resolving-the-bill/summer09.sb and b/09-resolving-the-bill/summer09.sb differ