4 "cell_type": "markdown",
9 "[Project workspace](https://learn2.open.ac.uk/course/view.php?id=206050)\n"
13 "cell_type": "markdown",
16 "## Problems by day\n",
18 "1. [Ticket prices](01-ticket-prices)\n",
19 "2. [Lift instructions](02-lifts)\n",
20 "3. [Display board](03-display-board)\n",
22 "5. [Word search](05-word-search)\n",
24 "7. [Word chains](07-word-chains)\n",
31 "cell_type": "markdown",
34 "## Longest substring of _k_ distinct characters\n",
35 "Given a string of letters, what is the longest (contiguous) substring with no more than _k_ distinct characters?\n",
37 "Could also do it with words instead of letters. \n",
39 "Not sure how to find the extension..."
43 "cell_type": "markdown",
46 "## Monotone substrings\n",
47 "Find the Longest monotonic substring in a list of numbers (words?)\n",
49 "Extension: longest non-decreasing (or non-increasing) substring.\n",
51 "Extension: longest monotonic subsequence"
55 "cell_type": "markdown",
58 "## Product in grid\n",
59 "Given a grid of numbers, find the largest product of five numbers in a row (totally Project Euler no. 11: https://projecteuler.net/problem=11 ).\n",
61 "Extension: largest product of five adjacent numbers, no necessarily colinear, but can't loop back to same number twice."
65 "cell_type": "markdown",
68 "## [Wordsearch](wordsearch/): \n",
70 "Wordsearch [creation](wordsearch/wordsearch-creation.ipynb) and [solving](wordsearch/wordsearch-solving.ipynb).\n",
72 "Given a grid of letters and a list of words, how many words are in the grid?\n",
74 "Extension: what's the longest word you can make from the leftover letters?"
78 "cell_type": "markdown",
82 "Given some letters and a list of words, what's the longest word you can make from the letters.\n",
84 "Extension: you're actually playing scrabble. What's the highest-scoring word you can make?"
88 "cell_type": "markdown",
92 "Given a grid size and a list of moves, who won? Input is a list of games, result is number of games that went to completion\n",
94 "Extension: how many games would be won by on the next go? (At least one of the puzzles has to have a game that would be \"won\" by placing a piece above an already-full column."
98 "cell_type": "markdown",
101 "## Travelling salesman\n",
102 "Given a network, find the shortest route between them, without visiting the same spot twice.\n",
104 "Extension: find the longest travelling salesman route.\n",
106 "Extension: relax the constraint, and allow repeated visits to the same place. What's the shortest route now?"
110 "cell_type": "markdown",
113 "# Virtual machine\n",
114 "Run the assembly program, what's the result? Count the steps in a collatz sequence?\n",
116 "Extension: run it again on different input. This takes longer."
120 "cell_type": "markdown",
123 "## Satisfiability\n",
124 "Given a boolean expression, how many variables are in it?\n",
126 "Extension: is it satisfiable?"
130 "cell_type": "markdown",
134 "Given a grid of hits and misses, where could be battleship be? (count how many positions it could be in) Assume the battleship is unhit.\n",
136 "Extension: the battleship might have been hit, but not sunk. Now how many places could it be?"
140 "cell_type": "markdown",
143 "## Multi-knapsack\n",
144 "How many ways can you fill a bunch of knapsacks (e.g. Advent 2015 days 17, 24)"
148 "cell_type": "markdown",
151 "## Phone number puzzle\n",
152 "Words that fit a phone number.\n",
154 "Extension: non-ascii unicode in input"
158 "cell_type": "markdown",
161 "## Rainfall problem\n",
162 "http://dl.acm.org.libezproxy.open.ac.uk/citation.cfm?doid=6592.6594"
166 "cell_type": "markdown",
169 "## Ten-pin bowling scores. \n",
170 "Given a sequence of number of pins knocked down, calculate total score.\n",
172 "Extension: the sequence of scores is for several players, doing round after round. Who wins?"
176 "cell_type": "markdown",
179 "## Pack and justify text into paragraphs."
183 "cell_type": "markdown",
186 "## Word chain puzzles\n",
187 "Given a start and end word and a dictionary, find a chain of valid words transforming one to the other.\n",
189 "Extension: what is the shortest chain? What is the longest chain without repeated words?"
193 "cell_type": "markdown",
196 "## [Amidakuji / Ghost leg](https://en.wikipedia.org/wiki/Ghost_Leg)\n",
197 "Derangement network simulation.\n",
199 "Extension: sum several networks"
203 "cell_type": "markdown",
206 "## Parcel pricing\n",
207 "By weight and volumetric weight. \n",
209 "Find total postage cost of list of parcels. Each parcel given as w, h, l, mass.\n",
211 "Extension: find the volumetric weight of the packages. \n"
215 "cell_type": "markdown",
218 "## Parcel wrapping: \n",
219 "First, find area, \n",
221 "Extension: find width of 1m strip to wrap. Include extra for wriggle room."
225 "cell_type": "markdown",
229 "How many valid solutions remain after the scores you've seen\n",
231 "Extension: How many scores are possible for this attempt?"
235 "cell_type": "markdown",
238 "## Lift simulator\n",
239 "Given a sequence of lift calls (time of call, floor of call, destination of passenger), what is the best solution to move all the passengers? Cost sum of passenger waits, where a passenger wait is the time between calling a lift and arriving at destination.\n",
241 "Extension: multiple lifts?\n",
243 "Extension: limited capacity in lift"
247 "cell_type": "markdown",
250 "# More problems:\n",
251 "* [Advent of Code 2015](http://adventofcode.com/2015)\n",
252 "* [Advent of Code 2016](http://adventofcode.com/2016)\n",
253 "* https://books.google.co.uk/books?id=85NsAHJjTJ0C&pg=PA390&lpg=PA390&dq=phone+number+problem+programming+names&source=bl&ots=c7oC9JvpZz&sig=aNnW6t_nmGK7SyAKchK0MaxqbkA&hl=en&sa=X&ved=0ahUKEwjnzcbbgs7RAhWKKcAKHQiFCDAQ6AEIJDAC#v=onepage&q=phone%20number%20problem%20programming%20names&f=false\n",
254 "* https://www.cs.uoregon.edu/Activities/Luks_Programming_Contest/\n",
255 "* https://www.reddit.com/r/dailyprogrammer/"
259 "cell_type": "markdown",
262 "# Related research\n",
263 "* https://computinged.wordpress.com/2016/12/16/graduating-dr-briana-morrison-posing-new-puzzles-for-computing-education-research/\n",
264 "* https://computinged.wordpress.com/2010/08/16/a-challenge-to-computing-education-research-make-measurable-progress/\n",
265 "* http://dl.acm.org.libezproxy.open.ac.uk/citation.cfm?doid=6592.6594\n",
266 "* https://computinged.wordpress.com/2017/01/18/power-law-of-practice-in-software-implementation-does-this-explain-the-w-going-away/\n",
267 "* https://www.cs.utexas.edu/users/mckinley/305j/pair-hcs-2006.pdf"
272 "execution_count": null,
282 "display_name": "Python 3",
283 "language": "python",
291 "file_extension": ".py",
292 "mimetype": "text/x-python",
294 "nbconvert_exporter": "python",
295 "pygments_lexer": "ipython3",