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. [Door codes](03-door-codes)\n",
21 "4. [Ghost leg, follow and pack](04-amidakuji)\n",
22 "5. [Display board](05-display-board)\n",
23 "6. [Tour shapes](06-tour-shapes)\n",
24 "7. [Virtual machine](07-interpreter)\n",
25 "8. [Word chains](08-word-chains)\n",
26 "9. [Resolving the bill](09-resolving-the-bill)\n",
27 "10. [Word search](10-word-search)\n",
30 "* [Suitcase packing](10-suitacase-packing)\n",
31 "9. [Filling the days](08-filling-days) [Problem C](https://www.cs.uoregon.edu/Activities/Luks_Programming_Contest/problems/Problems2017.pdf): A per the problem, B when there are multiple rooms available\n",
34 "Problem 6 taken from [Problem B](https://www.cs.uoregon.edu/Activities/Luks_Programming_Contest/problems/Problems2017.pdf): A is check if string is a closed loop, B is finding if two partial loops make a whole one"
38 "cell_type": "markdown",
41 "## Longest substring of _k_ distinct characters\n",
42 "Given a string of letters, what is the longest (contiguous) substring with no more than _k_ distinct characters?\n",
44 "Could also do it with words instead of letters. \n",
46 "Not sure how to find the extension..."
50 "cell_type": "markdown",
53 "## Monotone substrings\n",
54 "Find the Longest monotonic substring in a list of numbers (words?)\n",
56 "Extension: longest non-decreasing (or non-increasing) substring.\n",
58 "Extension: longest monotonic subsequence"
62 "cell_type": "markdown",
65 "## Product in grid\n",
66 "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",
68 "Extension: largest product of five adjacent numbers, no necessarily colinear, but can't loop back to same number twice."
72 "cell_type": "markdown",
75 "## [Wordsearch](wordsearch/): \n",
77 "Wordsearch [creation](wordsearch/wordsearch-creation.ipynb) and [solving](wordsearch/wordsearch-solving.ipynb).\n",
79 "Given a grid of letters and a list of words, how many words are in the grid?\n",
81 "Extension: what's the longest word you can make from the leftover letters?"
85 "cell_type": "markdown",
89 "Given some letters and a list of words, what's the longest word you can make from the letters.\n",
91 "Extension: you're actually playing scrabble. What's the highest-scoring word you can make?"
95 "cell_type": "markdown",
99 "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",
101 "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."
105 "cell_type": "markdown",
108 "## Travelling salesman\n",
109 "Given a network, find the shortest route between them, without visiting the same spot twice.\n",
111 "Extension: find the longest travelling salesman route.\n",
113 "Extension: relax the constraint, and allow repeated visits to the same place. What's the shortest route now?"
117 "cell_type": "markdown",
120 "# Virtual machine\n",
121 "Run the assembly program, what's the result? Count the steps in a collatz sequence?\n",
123 "Extension: run it again on different input. This takes longer."
127 "cell_type": "markdown",
130 "## Satisfiability\n",
131 "Given a boolean expression, how many variables are in it?\n",
133 "Extension: is it satisfiable?"
137 "cell_type": "markdown",
141 "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",
143 "Extension: the battleship might have been hit, but not sunk. Now how many places could it be?"
147 "cell_type": "markdown",
150 "## Multi-knapsack\n",
151 "How many ways can you fill a bunch of knapsacks (e.g. Advent 2015 days 17, 24)"
155 "cell_type": "markdown",
158 "## Phone number puzzle\n",
159 "Words that fit a phone number.\n",
161 "Extension: non-ascii unicode in input"
165 "cell_type": "markdown",
168 "## Rainfall problem\n",
169 "http://dl.acm.org.libezproxy.open.ac.uk/citation.cfm?doid=6592.6594"
173 "cell_type": "markdown",
176 "## Ten-pin bowling scores. \n",
177 "Given a sequence of number of pins knocked down, calculate total score.\n",
179 "Extension: the sequence of scores is for several players, doing round after round. Who wins?"
183 "cell_type": "markdown",
186 "## Pack and justify text into paragraphs."
190 "cell_type": "markdown",
193 "## Word chain puzzles\n",
194 "Given a start and end word and a dictionary, find a chain of valid words transforming one to the other.\n",
196 "Extension: what is the shortest chain? What is the longest chain without repeated words?"
200 "cell_type": "markdown",
203 "## [Amidakuji / Ghost leg](https://en.wikipedia.org/wiki/Ghost_Leg)\n",
204 "Derangement network simulation.\n",
206 "Extension: sum several networks"
210 "cell_type": "markdown",
213 "## Parcel pricing\n",
214 "By weight and volumetric weight. \n",
216 "Find total postage cost of list of parcels. Each parcel given as w, h, l, mass.\n",
218 "Extension: find the volumetric weight of the packages. \n"
222 "cell_type": "markdown",
225 "## Parcel wrapping: \n",
226 "First, find area, \n",
228 "Extension: find width of 1m strip to wrap. Include extra for wriggle room."
232 "cell_type": "markdown",
236 "How many valid solutions remain after the scores you've seen\n",
238 "Extension: How many scores are possible for this attempt?"
242 "cell_type": "markdown",
245 "## Lift simulator\n",
246 "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",
248 "Extension: multiple lifts?\n",
250 "Extension: limited capacity in lift"
254 "cell_type": "markdown",
257 "# More problems:\n",
258 "* [Advent of Code 2015](http://adventofcode.com/2015)\n",
259 "* [Advent of Code 2016](http://adventofcode.com/2016)\n",
260 "* [Programming and Problem Solving with C++: Brief Edition](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",
261 "* https://www.cs.uoregon.edu/Activities/Luks_Programming_Contest/ , specifically the overlapping presentaitons problem from [2017 problems](https://www.cs.uoregon.edu/Activities/Luks_Programming_Contest/problems/Problems2017.pdf)\n",
262 "* https://www.reddit.com/r/dailyprogrammer/\n",
264 "* N-rooks problem from http://www.olympiad.org.uk/images/bio2012-poster-v.jpg\n",
266 "* \"How tweet it is\" from [2014 APL programming language competition](http://www.dyalog.com/uploads/files/student_competition/2014_problems_phase1.pdf) (remove interior vowels from words)\n",
268 "* More ghost leg: simplify a network by finding whole permuation, then splitting it down into transpositions. Look at theory of permutations for details.\n",
270 "* [Strata](https://en.wikipedia.org/wiki/Strata_(video_game)) game: how many puzzles have a valid solution? How many valid solutions are there to a puzzle?\n"
274 "cell_type": "markdown",
277 "# Related research\n",
278 "* https://computinged.wordpress.com/2016/12/16/graduating-dr-briana-morrison-posing-new-puzzles-for-computing-education-research/\n",
279 "* https://computinged.wordpress.com/2010/08/16/a-challenge-to-computing-education-research-make-measurable-progress/\n",
280 "* http://dl.acm.org.libezproxy.open.ac.uk/citation.cfm?doid=6592.6594\n",
281 "* https://computinged.wordpress.com/2017/01/18/power-law-of-practice-in-software-implementation-does-this-explain-the-w-going-away/\n",
282 "* https://www.cs.utexas.edu/users/mckinley/305j/pair-hcs-2006.pdf"
286 "cell_type": "markdown",
291 "Polyglot challenge languages\n",
311 "- Elixir / Erlang\n",
319 "cell_type": "markdown",
322 "## Polyglot challenge: languages by day\n",
324 "1. [Ticket prices](01-ticket-prices): Ruby x\n",
325 "2. [Lift instructions](02-lifts): Brainfuck x\n",
326 "3. [Door codes](03-door-codes): Dart x\n",
327 "4. [Ghost leg, follow and pack](04-amidakuji): Clojure\n",
328 "5. [Display board](05-display-board): JavaScript/Node.js\n",
329 "6. [Tour shapes](06-tour-shapes): Lua\n",
330 "7. [Virtual machine](07-interpreter): Haskell (Advent 16 day 23)\n",
331 "8. [Word chains](08-word-chains): Prolog\n",
332 "9. [Resolving the bill](09-resolving-the-bill): Sense\n",
333 "10. [Word search](10-word-search): Python x\n",
341 "execution_count": null,
351 "display_name": "Python 3",
352 "language": "python",
360 "file_extension": ".py",
361 "mimetype": "text/x-python",
363 "nbconvert_exporter": "python",
364 "pygments_lexer": "ipython3",