Removing files from data analysis directory
[ou-summer-of-code-2017.git] / problem-ideas.ipynb
1 {
2 "cells": [
3 {
4 "cell_type": "markdown",
5 "metadata": {},
6 "source": [
7 "# Project ideas\n",
8 "\n",
9 "[Project workspace](https://learn2.open.ac.uk/course/view.php?id=206050)\n"
10 ]
11 },
12 {
13 "cell_type": "markdown",
14 "metadata": {},
15 "source": [
16 "## Problems by day\n",
17 "\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",
28 "\n",
29 "### Extras\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",
32 "\n",
33 "\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"
35 ]
36 },
37 {
38 "cell_type": "markdown",
39 "metadata": {},
40 "source": [
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",
43 "\n",
44 "Could also do it with words instead of letters. \n",
45 "\n",
46 "Not sure how to find the extension..."
47 ]
48 },
49 {
50 "cell_type": "markdown",
51 "metadata": {},
52 "source": [
53 "## Monotone substrings\n",
54 "Find the Longest monotonic substring in a list of numbers (words?)\n",
55 "\n",
56 "Extension: longest non-decreasing (or non-increasing) substring.\n",
57 "\n",
58 "Extension: longest monotonic subsequence"
59 ]
60 },
61 {
62 "cell_type": "markdown",
63 "metadata": {},
64 "source": [
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",
67 "\n",
68 "Extension: largest product of five adjacent numbers, no necessarily colinear, but can't loop back to same number twice."
69 ]
70 },
71 {
72 "cell_type": "markdown",
73 "metadata": {},
74 "source": [
75 "## [Wordsearch](wordsearch/): \n",
76 "\n",
77 "Wordsearch [creation](wordsearch/wordsearch-creation.ipynb) and [solving](wordsearch/wordsearch-solving.ipynb).\n",
78 "\n",
79 "Given a grid of letters and a list of words, how many words are in the grid?\n",
80 "\n",
81 "Extension: what's the longest word you can make from the leftover letters?"
82 ]
83 },
84 {
85 "cell_type": "markdown",
86 "metadata": {},
87 "source": [
88 "## Countdown\n",
89 "Given some letters and a list of words, what's the longest word you can make from the letters.\n",
90 "\n",
91 "Extension: you're actually playing scrabble. What's the highest-scoring word you can make?"
92 ]
93 },
94 {
95 "cell_type": "markdown",
96 "metadata": {},
97 "source": [
98 "## Connect 4\n",
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",
100 "\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."
102 ]
103 },
104 {
105 "cell_type": "markdown",
106 "metadata": {},
107 "source": [
108 "## Travelling salesman\n",
109 "Given a network, find the shortest route between them, without visiting the same spot twice.\n",
110 "\n",
111 "Extension: find the longest travelling salesman route.\n",
112 "\n",
113 "Extension: relax the constraint, and allow repeated visits to the same place. What's the shortest route now?"
114 ]
115 },
116 {
117 "cell_type": "markdown",
118 "metadata": {},
119 "source": [
120 "# Virtual machine\n",
121 "Run the assembly program, what's the result? Count the steps in a collatz sequence?\n",
122 "\n",
123 "Extension: run it again on different input. This takes longer."
124 ]
125 },
126 {
127 "cell_type": "markdown",
128 "metadata": {},
129 "source": [
130 "## Satisfiability\n",
131 "Given a boolean expression, how many variables are in it?\n",
132 "\n",
133 "Extension: is it satisfiable?"
134 ]
135 },
136 {
137 "cell_type": "markdown",
138 "metadata": {},
139 "source": [
140 "## Battleships\n",
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",
142 "\n",
143 "Extension: the battleship might have been hit, but not sunk. Now how many places could it be?"
144 ]
145 },
146 {
147 "cell_type": "markdown",
148 "metadata": {},
149 "source": [
150 "## Multi-knapsack\n",
151 "How many ways can you fill a bunch of knapsacks (e.g. Advent 2015 days 17, 24)"
152 ]
153 },
154 {
155 "cell_type": "markdown",
156 "metadata": {},
157 "source": [
158 "## Phone number puzzle\n",
159 "Words that fit a phone number.\n",
160 "\n",
161 "Extension: non-ascii unicode in input"
162 ]
163 },
164 {
165 "cell_type": "markdown",
166 "metadata": {},
167 "source": [
168 "## Rainfall problem\n",
169 "http://dl.acm.org.libezproxy.open.ac.uk/citation.cfm?doid=6592.6594"
170 ]
171 },
172 {
173 "cell_type": "markdown",
174 "metadata": {},
175 "source": [
176 "## Ten-pin bowling scores. \n",
177 "Given a sequence of number of pins knocked down, calculate total score.\n",
178 "\n",
179 "Extension: the sequence of scores is for several players, doing round after round. Who wins?"
180 ]
181 },
182 {
183 "cell_type": "markdown",
184 "metadata": {},
185 "source": [
186 "## Pack and justify text into paragraphs."
187 ]
188 },
189 {
190 "cell_type": "markdown",
191 "metadata": {},
192 "source": [
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",
195 "\n",
196 "Extension: what is the shortest chain? What is the longest chain without repeated words?"
197 ]
198 },
199 {
200 "cell_type": "markdown",
201 "metadata": {},
202 "source": [
203 "## [Amidakuji / Ghost leg](https://en.wikipedia.org/wiki/Ghost_Leg)\n",
204 "Derangement network simulation.\n",
205 "\n",
206 "Extension: sum several networks"
207 ]
208 },
209 {
210 "cell_type": "markdown",
211 "metadata": {},
212 "source": [
213 "## Parcel pricing\n",
214 "By weight and volumetric weight. \n",
215 "\n",
216 "Find total postage cost of list of parcels. Each parcel given as w, h, l, mass.\n",
217 "\n",
218 "Extension: find the volumetric weight of the packages. \n"
219 ]
220 },
221 {
222 "cell_type": "markdown",
223 "metadata": {},
224 "source": [
225 "## Parcel wrapping: \n",
226 "First, find area, \n",
227 "\n",
228 "Extension: find width of 1m strip to wrap. Include extra for wriggle room."
229 ]
230 },
231 {
232 "cell_type": "markdown",
233 "metadata": {},
234 "source": [
235 "## Mastermind\n",
236 "How many valid solutions remain after the scores you've seen\n",
237 "\n",
238 "Extension: How many scores are possible for this attempt?"
239 ]
240 },
241 {
242 "cell_type": "markdown",
243 "metadata": {},
244 "source": [
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",
247 "\n",
248 "Extension: multiple lifts?\n",
249 "\n",
250 "Extension: limited capacity in lift"
251 ]
252 },
253 {
254 "cell_type": "markdown",
255 "metadata": {},
256 "source": [
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",
263 "\n",
264 "* N-rooks problem from http://www.olympiad.org.uk/images/bio2012-poster-v.jpg\n",
265 "\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",
267 "\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",
269 "\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"
271 ]
272 },
273 {
274 "cell_type": "markdown",
275 "metadata": {},
276 "source": [
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"
283 ]
284 },
285 {
286 "cell_type": "markdown",
287 "metadata": {
288 "collapsed": true
289 },
290 "source": [
291 "Polyglot challenge languages\n",
292 "\n",
293 "- Python\n",
294 "- Ruby\n",
295 "- Haskell\n",
296 "- Lisp\n",
297 "- Prolog\n",
298 "- Ada\n",
299 "- C\n",
300 "- Brainfuck\n",
301 "- Whitespace\n",
302 "- x64 assembler\n",
303 "- Smalltalk\n",
304 "- Scala\n",
305 "- Clojure\n",
306 "- Lua\n",
307 "- JavaScript\n",
308 "- Java\n",
309 "- Dart\n",
310 "- Kotlin\n",
311 "- Elixir / Erlang\n",
312 "- Oz / Mozart\n",
313 "- APL / J\n",
314 "- Rust\n",
315 "- Go"
316 ]
317 },
318 {
319 "cell_type": "markdown",
320 "metadata": {},
321 "source": [
322 "## Polyglot challenge: languages by day\n",
323 "\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",
334 "\n",
335 "Scala, Clojure?\n",
336 "Sense? Day 9?"
337 ]
338 },
339 {
340 "cell_type": "code",
341 "execution_count": null,
342 "metadata": {
343 "collapsed": true
344 },
345 "outputs": [],
346 "source": []
347 }
348 ],
349 "metadata": {
350 "kernelspec": {
351 "display_name": "Python 3",
352 "language": "python",
353 "name": "python3"
354 },
355 "language_info": {
356 "codemirror_mode": {
357 "name": "ipython",
358 "version": 3
359 },
360 "file_extension": ".py",
361 "mimetype": "text/x-python",
362 "name": "python",
363 "nbconvert_exporter": "python",
364 "pygments_lexer": "ipython3",
365 "version": "3.5.2+"
366 }
367 },
368 "nbformat": 4,
369 "nbformat_minor": 1
370 }