4 "cell_type": "markdown",
9 "[Project workspace](https://learn2.open.ac.uk/course/view.php?id=206050)\n"
13 "cell_type": "markdown",
16 "## Longest substring of _k_ distinct characters\n",
17 "Given a string of letters, what is the longest (contiguous) substring with no more than _k_ distinct characters?\n",
19 "Could also do it with words instead of letters. \n",
21 "Not sure how to find the extension..."
25 "cell_type": "markdown",
28 "## Monotone substrings\n",
29 "Find the Longest monotonic substring in a list of numbers (words?)\n",
31 "Extension: longest non-decreasing (or non-increasing) substring.\n",
33 "Extension: longest monotonic subsequence"
37 "cell_type": "markdown",
40 "## Product in grid\n",
41 "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",
43 "Extension: largest product of five adjacent numbers, no necessarily colinear, but can't loop back to same number twice."
47 "cell_type": "markdown",
50 "## [Wordsearch](wordsearch/): \n",
52 "Wordsearch [creation](wordsearch/wordsearch-creation.ipynb) and [solving](wordsearch/wordsearch-solving.ipynb).\n",
54 "Given a grid of letters and a list of words, how many words are in the grid?\n",
56 "Extension: what's the longest word you can make from the leftover letters?"
60 "cell_type": "markdown",
64 "Given some letters and a list of words, what's the longest word you can make from the letters.\n",
66 "Extension: you're actually playing scrabble. What's the highest-scoring word you can make?"
70 "cell_type": "markdown",
74 "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",
76 "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."
80 "cell_type": "markdown",
83 "## Travelling salesman\n",
84 "Given a network, find the shortest route between them, without visiting the same spot twice.\n",
86 "Extension: find the longest travelling salesman route.\n",
88 "Extension: relax the constraint, and allow repeated visits to the same place. What's the shortest route now?"
92 "cell_type": "markdown",
95 "# Virtual machine\n",
96 "Run the assembly program, what's the result? Count the steps in a collatz sequence?\n",
98 "Extension: run it again on different input. This takes longer."
102 "cell_type": "markdown",
105 "## Satisfiability\n",
106 "Given a boolean expression, how many variables are in it?\n",
108 "Extension: is it satisfiable?"
112 "cell_type": "markdown",
116 "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",
118 "Extension: the battleship might have been hit, but not sunk. Now how many places could it be?"
122 "cell_type": "markdown",
125 "## Multi-knapsack\n",
126 "How many ways can you fill a bunch of knapsacks (e.g. Advent 2015 days 17, 24)"
130 "cell_type": "markdown",
133 "## Phone number puzzle\n",
134 "Words that fit a phone number.\n",
136 "Extension: non-ascii unicode in input"
140 "cell_type": "markdown",
143 "## Rainfall problem\n",
144 "http://dl.acm.org.libezproxy.open.ac.uk/citation.cfm?doid=6592.6594"
148 "cell_type": "markdown",
151 "## Ten-pin bowling scores. \n",
152 "Given a sequence of number of pins knocked down, calculate total score.\n",
154 "Extension: the sequence of scores is for several players, doing round after round. Who wins?"
158 "cell_type": "markdown",
161 "## Pack and justify text into paragraphs."
165 "cell_type": "markdown",
168 "## Word chain puzzles\n",
169 "Given a start and end word and a dictionary, find a chain of valid words transforming one to the other.\n",
171 "Extension: what is the shortest chain? What is the longest chain without repeated words?"
175 "cell_type": "markdown",
178 "## [Amidakuji / Ghost leg](https://en.wikipedia.org/wiki/Ghost_Leg)\n",
179 "Derangement network simulation.\n",
181 "Extension: sum several networks"
185 "cell_type": "markdown",
188 "## Parcel pricing\n",
189 "By weight and volumetric weight. \n",
191 "Find total postage cost of list of parcels. Each parcel given as w, h, l, mass.\n",
193 "Extension: find the volumetric weight of the packages. \n"
197 "cell_type": "markdown",
200 "## Parcel wrapping: \n",
201 "First, find area, \n",
203 "Extension: find width of 1m strip to wrap. Include extra for wriggle room."
207 "cell_type": "markdown",
211 "How many valid solutions remain after the scores you've seen\n",
213 "Extension: How many scores are possible for this attempt?"
217 "cell_type": "markdown",
220 "## Lift simulator\n",
221 "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",
223 "Extension: multiple lifts?\n",
225 "Extension: limited capacity in lift"
229 "cell_type": "markdown",
232 "# More problems:\n",
233 "* 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",
234 "* https://www.cs.uoregon.edu/Activities/Luks_Programming_Contest/\n",
235 "* https://www.reddit.com/r/dailyprogrammer/"
239 "cell_type": "markdown",
242 "# Related research\n",
243 "* https://computinged.wordpress.com/2016/12/16/graduating-dr-briana-morrison-posing-new-puzzles-for-computing-education-research/\n",
244 "* https://computinged.wordpress.com/2010/08/16/a-challenge-to-computing-education-research-make-measurable-progress/\n",
245 "* http://dl.acm.org.libezproxy.open.ac.uk/citation.cfm?doid=6592.6594\n",
246 "* https://computinged.wordpress.com/2017/01/18/power-law-of-practice-in-software-implementation-does-this-explain-the-w-going-away/\n",
247 "* https://www.cs.utexas.edu/users/mckinley/305j/pair-hcs-2006.pdf"
252 "execution_count": null,
262 "display_name": "Python 3",
263 "language": "python",
271 "file_extension": ".py",
272 "mimetype": "text/x-python",
274 "nbconvert_exporter": "python",
275 "pygments_lexer": "ipython3",