Send your solutions to firstname.lastname@example.org
Winners are determined on the basis of correctness first, execution speed second. The code, after submission, is checked with 1 computer by the education committee. The participants are responsible for delivering a README file on how to execute the program. Because all entries are checked on 1 device avoid compiler-specific optimizations, these are not guaranteed during testing. If the README file is not sufficient, it is left to the jury to disqualify participant or to request further explanation.
In principle there are no requirements for code (language / style etc.), but we check the code to keep it fair. If this is not possible, the participant can be disqualified. The final judgment is in all cases on the education committee.
The winner gets 5 euro gourmet voucher The top 3 get 3 points. Make the challenge under 1 min and you get 2 points. Complete the challenge to receive 1 point.
Who got the most points at the end of the year gets a nice price.
|David van Erkelens||0|
The April newsletter challenge
Consider the domain of all integer numbers in the interval (-∞, ∞). A hypothetical bunny starts hopping from one unknown integer number to another with a fixed integer hop size. Every time the bunny hops to a new integer number you can investigate only one number to check if the bunny is there. The step size of the hop is fixed and both the starting point of the bunny and the hop size are unknown to you. You like bunnies and you would like to catch and pet it. Devise a strategy which given enough processing and storage power, assuming an infinite amount of time and therefore bunny hops, you will always be able to catch the bunny in a finite number of hops. A bad strategy can be to check all possible numbers one by one, but that does not guarantee that the bunny will always be caught in a finite number of steps.
The March newsletter challenge
We are playing a game with 2 players. In this game there are n vases, each of which are filled with x balls. For example: v1 = 3 and v2 = 2 and v3 = 5, where vi is one the vases. A player removes a self-chosen amount of balls from one of the vases in his turn. The game ends when all vases are empty. The player who is unable to make a move loses. It's your task to come up with a strategy that, given a configuration, always wins when possible.
The November newsletter challenge
If we take 47, reverse and add, 47 + 74 = 121, which is palindromic. Not all numbers produce palindromes so quickly. For example, 349 + 943 = 1292, 1292 + 2921 = 4213 4213 + 3124 = 7337 That is, 349 took three iterations to arrive at a palindrome. Although no one has proved it yet, it is thought that some numbers, like 196, never produce a palindrome. A number that never forms a palindrome through the reverse and add process is called a Lychrel number. Due to the theoretical nature of these numbers, and for the purpose of this problem, we shall assume that a number is Lychrel until proven otherwise. In addition you are given that for every number below hundred-thousand, it will either (i) become a palindrome in less than hundred iterations, or, (ii) no one, with all the computing power that exists, has managed so far to map it to a palindrome. Surprisingly, there are palindromic numbers that are themselves Lychrel numbers; the first example is 4994. How many Lychrel numbers are there below hundred-thousand?
The October newsletter challenge
If the numbers 1 to 5 are written out in words: one, two, three, four, five, then there are 3 + 3 + 5 + 4 + 4 = 19 letters used in total. If all the numbers from 1 to 1999 (one thousand) inclusive were written out in words, how many letters would be used? NOTE: Do not count spaces or hyphens. For example, 342 (three hundred and forty-two) contains 23 letters and 115 (one hundred and fifteen) contains 20 letters. The use of "and" when writing out numbers is in compliance with British usage. For clarity the numbers like 1201 will be written as one thousand two hundred and one.
The September newsletter challenge
The following iterative sequence is defined for the set of positive integers: n → n/2 (n is even) n → 3n + 1 (n is odd) Using the rule above and starting with 13, we generate the following sequence: 13 → 40 → 20 → 10 → 5 → 16 → 8 → 4 → 2 → 1 It can be seen that this sequence (starting at 13 and finishing at 1) contains 10 terms. Although it has not been proved yet (Collatz Problem), it is thought that all starting numbers finish at 1. Which starting number, under two million, produces the longest chain? NOTE: Once the chain starts the terms are allowed to go above two million.