World Wide Computer Programming Contest
Questions and Answers

Sorry, but the competition is now closed. Thanks to all those who participated. Remember, if you're a student you can still download an educational license for Dyalog APL and use the Euler questions to help you learn APL.

The 3 top prize winners of the 2009 Computer Programming Contest will be announced on August 1 2009 on this website and consolation price winners will be announced during the Dyalog '09 Conference in Princeton New Jersey USA, September 13-16 2009.

Please check back again regularly to keep updated as we may run another competition later.

Last updated 2 July 2009
(Updates are featured in the bottom of the page in order of date).

 

 

  1. What is the purpose of this contest?
    The purpose of this programming contest is to encourage students, and others, to investigate APL (A Programming Language).
  2. Summary of Prizes
    A total of $11,000 in prize money will be given away in the 2009 running of this contest. The money is split into $5,500 to be won by students and $5,500 to be given as introduction awards to people who refer winning student into the contest.

    The grand prize winner is expected to attend the Dyalog '09 Conference in Princeton New Jersey USA, September 13-16 2009 to receive his or her prize in person and present the work that lead to winning the grand prize. Dyalog will pay travel costs (up to $3,500), $500 for incidental expenses, and all conference fees.

    The winning student is responsible for visas, travel documents, and other necessary arrangements, and must be legally able to travel. Transportation for only the winner will be provided.
  3. Who is eligible in this programming contest?
    This contest is open to everyone (except contest organisers and employees of Dyalog Ltd.). However, to be eligible for the Grand Prize you must meet the criteria for a free Dyalog Educational License. If you do not already have a Dyalog Educational License you can apply for it here.

    You must be a full time student at any primary or secondary school, college or graduate University and winners must submit proof of full-time enrollment in a school or a university. You may be on a break as long as you will be returning to full-time student status within a year.

    The grand prize winner is expected to attend the Dyalog '09 conference in Princeton New Jersey September 13-16 2009 to receive his or her prize in person and present the work that lead to winning the grand prize. Dyalog will pay travel costs (up to $3,500), $500 for incidental expenses, and all conference fees.

    The winning student is responsible for visas, travel documents, and other necessary arrangements, and must be legally able to travel. Transportation for only the winner will be provided.

    Second price winner will be awarded $1,000 and third prize winner will be awarded $500.

    Twenty (20) consolation prizes of $100 will be selected at random from all submissions which has solved 3 or more problems.
  4. May I make more than one submission?
    No. Only one submission per person is permitted. If more than one person makes nearly identical submissions, all of them will be disqualified. Please also see item 14 below.
  5. How will prizes be paid?
    All prizes are denominated in US Dollars and will be paid by electronic transfer to the bank account the winner informs us to pay into. Alternatively, if the winner has a PayPal account the prize can be paid into that. If electronic transfer is not possible, a cheque will be issued.
  6. How do I win?
    To win the Grand Prize, solve as many of the first 20 problems as you can on the Project Euler website.

    Note: in order to be eligible for any prize you must solve at least 3 of the 20 Project Euler problems nominated as the problems to solve in this contest.

    You may either use the Microsoft Windows or the Linux Version of Dyalog APL. We will accept any workspace that can be loaded by Dyalog Version 12.0 (which effectively means any Dyalog release since 1999).

    You may also use any other Version of APL as long as it is converted to Dyalog APL format. If you are using any other Version of APL than Dyalog you will find the interchange format for converting it to Dyalog APL here.

    You must be a full-time student to win the Grand Prize, the second or third prize or a consolation prize.

    To win an Introduction Award, simply be the person or institution who refers a person who wins the Grand Prize, second, third or a consolation prize. Anyone can win an introduction award.
  7. I have no hope of being the best APL programmer in the contest. Why should I bother?
    If you solve just three of the Project Euler problems we have selected, you will have the same chance as everyone else of winning a consolation prize. And, the more people you refer to the contest who make submissions (even if they aren't the Grand Prize winner), the greater your chances of winning an Introduction Award.
  8. What is the most that I can win?

    arrow

    If you are a student: You could win the grand prize of $2,000 plus the trip to the Dyalog '09 Conference in Princeton New Jersey in the USA. You cannot refer yourself so the person who referred you to the contest will win the equivalent Introduction Award, not you.

    If you further referred for example 3 consolation prize winners, you could win an additional $100 each, for a total of $2,300 plus the trip.

    arrow

    If you are not a student: You could still win an Introduction Award of $2,000 if you referred the Grand Prize winner. If you further referred the 2 runner up winners you could receive an additional $1,500 for a total of $3,500 cash.

    However, if you wish to go to the conference, you must make your own arrangement.

    arrow

    If you do not even submit an entry: You can still win up to $3,500 by introducing all three contest winners.

    Your chances of winning depend on the number of entries.


  9. What is an acceptable problem solution?

    arrow

    Your solution to each question must return the answer accepted by Project Euler for that question.

    arrow

    The solution must actually solve the problem as stated and not simply produce the correct answer. For example, Project Euler's problem #1 is "Add all the natural numbers below one thousand that are multiples of 3 or 5". If the answer was 8 (it isn't), it is unacceptable for your APL function to simply return the number 8. Do that, and we will disqualify your entry in its entirety.

    arrow

    Your solution must be unique. If your solution is identical to, or substantially identical to, any other entrants' solutions, none of you will receive credit for your solution. This is tricky because for many problems, the solution that occurs to most APL programmers will be identical. However, you can make your submission unique by:

    (a) Adding comments in your own words making it clear that you understand what the code does

    (b) Adding your name to the comment.

    arrow

    Your code must run within a 100MB workspace within 5 minutes of CPU time on our official computer which will be at least a 1 Ghz Pentium. At the end of five minutes of computer time, your solution set will be interrupted and your score will be determined by questions completed when the time ran out. Note: Dyalog APL tracks elapsed time and CPU separately and, depending on operating system overhead and other load, elapsed time might run longer. You may want to leave long-running programs out of your submission since they will prevent you from receiving credit for subsequent answers.

  10. Judging submissions
    If your submission meets the above criteria in item 9 - judgement will be applied. The judges will evaluate your solution in terms of completeness, use of APL's features, speed of execution and other criteria as they see fit.
  11. Judges determinations are final and cannot be contested under any circumstances.
    This is a contest for people who love a challenge and learning new things for their own sake, and the chance of winning a prize is just the icing on the cake. It is conceivable that someone could cheat us, we could lose your submission, or for some other reason we may not pick you as a winner when perhaps we should have. The judges cannot bear the risk of being responsible if this happens. NOTE THEREFORE: When you submit your contribution to the contest you automatically agree that you can not sue the judges, Dyalog or any of the other sponsors over anything.
  12. I am not a student. May I submit answers?
    Yes. We encourage non-students to try the problems and submit solutions. You will be ineligible for a prize, however, we're very interested in seeing how you go about solving the problems.
  13. How do I make a submission?
    Send an e-mail to: Contest2009@dyalog.com with a subject line with the single word: Submission.

    In the body, you write:

    arrow

    Name:

    arrow

    Address:

    arrow

    E-Mail: (which must be the same as the e-mail you submit from)

    arrow

    Phone Number: (including country code)

    arrow

    Student? (yes/no)

    arrow

    School: (if yes)

    arrow

    Referred By: (e-mail address of the person who referred you to this contest)



    Attach a Dyalog APL workspace named: firstname_lastname_n
    Where 'firstname' is your first name, 'lastname' is your last name, and 'n' is the number of problems you have solved. For example, if Bob Jones solved 3 problems, then his workspace would be called: bob_jones_3.

    For each problem solved, the workspace must contain a niladic result-returning APL function named Qn, where 'n' is the Euler problem number being solved. For example, if Bob solved problems 1, 17 and 14, his workspace would contain functions Q1, Q17 and Q14.

    The workspace must contain the following character vector variables:

    arrow

    MyEmail containing your e-mail address, identical to the one you used to submit your entry. This will uniquely identify you. You may not share an e-mail address with another contestant!!

    arrow

    ReferredBy the character vector containing the e-mail address of the person who referred you to the contest. This is the e-mail of the person who will win the matching prize if you win something.

    arrow

    Student: binary variable, 1= yes, 0=no

    arrow

    AboutMe - a text vector in which the applicant describes themselves.

    arrow

    Reactions - thoughts and comments about the contest APL.


    Any number of other functions can exist in the workspace that may be called by these main functions. However, all code must be written in APL . You may not call non-APL code even though APL permits you to do so.

    Examples of workspaces that meet our criteria along with a ReadMe PDF document that explains the submissions in detail can be found here.
  14. Will I be informed of receipt of submission?
    We will endeavor to confirm receipt of your submission within 2 business days. If you do not hear back by then, please write to ask for a status with the subject line of: Status Request.

    Do not include an attachment with your status request because it may have been a problem with the attachment that caused us not to receive your submission in the first place.

    After you make a submission, you may make another one at a later time to replace the first. For example, you might submit a solution a week before the deadline just to make sure you have submitted something, and then, as time permits, continue to solve additional problems and replace your entry with a new one. In other words, we will only consider your most recent submission. Previous submissions will be ignored.
  15. I don't know APL - I don't even understand what you mean by "workspace" or "niladic". What am I supposed to do?
    That's the point of this contest, to get you to learn about this stuff. You might want to start by taking a look at the manuals here.
  16. Who is ineligible to join this contest?
    Employees of Dyalog and the volunteers who are running the contest are ineligible to participate. If you are not a student you may still submit but you cannot win the Grand Prize or any of the consolation prizes, no matter how many questions you answer.
  17. Do you mean that the people who run Project Euler are eligible?
    Yes they are. They are not running this contest. We are just piggybacking off some of the problems they have posted on their site. They may choose to disqualify themselves if they want. Or, if they win a prize, they may choose to donate it to Project Euler.
  18. I have already solved some Project Euler problems. May I submit them?
    Yes, as long as your solutions are in APL. You may also transliterate solutions written in other languages into APL. However, be warned that some approaches in other languages, particularly those that rely heavily on looping, may run very slowly in APL.
  19. After solving a problem, Project Euler allows me to join a discussion group. There I might discover a solution better than my own. May I submit that?
    Yes - we encourage 'plagiarism' and learning from others. However, the code you submit must be unique (see above), so you should add your own comments to indicate you understand what the code is doing. It would also be a courtesy to add a comment describing the source of your algorithm.
  20. May I collaborate with other people?
    Yes you may, however the submission must be by a single individual and only that one individual will be awarded a prize. If you chose to share your winnings with other people, you must make your own arrangements. You may choose to send a collaborator in your place to accept the prize in Princeton, however that person is expected to be able to competently present the work.

    If you collaborate with others in learning APL and solving the problems, you may make separate entries as long as your code if different by at least the comments, and you must be licensed for a Dyalog Educational License separately. You can apply for a Dyalog Educational License here.
  21. How do I maximize my chances of winning?
    To maximize you chance of winning a prize, do the best job you can on your single submission.

    You can increase your chances of winning an Introduction Award (or even multiple prizes) by referring other people who enter valid submissions. In fact, a person can win an Introduction Award (without even submitting an APL workspace).

    If you want to win a prize do not worry too much about the referring competition. Remember, if they beat you on the prize, you win the same amount of cash for referring them.

    So, send an e-mail to all your friends suggesting they look at the contest rules. Here is a sample e-mail:




    Subject: Computer Programming Contest

    I have found a computer programming contest with 23 cash prizes and a Grand Prize that includes all expense travel (FROM ANYWHERE IN THE WORLD) to receive the award in person in Princeton, New Jersey (USA).

    If you win, I will also receive a prize for referring you therefore please include my e-mail address with your submission as the person who introduced.

    You can find more information at: /contest2009

    Best of luck, and please pass this along to your friends.



  22. Must I use Dyalog APL?
    No. There are other vendors of APL, and you may develop in any of them. However, you must eventually convert your workspace into Dyalog APL, or into a standard workspace interchange format that Dyalog can read. You can find more here.
  23. What resources are available?
    There are a number of Dyalog mail reflectors and discussion groups. Finding them is part of the challenge.
  24. Where do I submit questions?
    You can send your questions to contest2009@dyalog.com. We do not guarantee that we will answer them, and if we do, we are most likely to add your question and the answer to this page so check back frequently for updates, clarifications, and so on.
  25. Where do I submit my appeal of the results?
    You don't. All award decisions are final, no matter how flawed.

Information posted after launch of the competition

arrow

02/07/09

The competition is now closed

arrow

10/06/09

Is it the first person to complete all 20 problems correctly who wins?
The date on which you make the submission will have no influence on the likelihood that you will win a prize (so long as it is by July 1st)

arrow

10/06/09

Can I hard code the 4000000th Fibonacci number into my code, or will that be a negative aspect of my code?
A solution which contains hard-coded (partial) results is likely to be interpreted as incomplete.

arrow

10/06/09

Can I use a library to do bignum stuff? Your language is rather fun, but there are quite a few problems that require numbers that don't really fit in doubles (or what it is you're using).
The intention is that the solutions should be coded entirely in APL (and able to run under Dyalog APL). Thus, if you need numbers which cannot be represented as numeric arrays, you need to be creative.

arrow

10/06/09

Is there a way to do loops, or should I write pseudo loops using recursion. Is execution order guaranteed in (for example) 'each', should I exploit that? (or I could just copy paste a line a few times... but that's just silly).
You are expected to find the answer to these questions yourself using the materials provided with APL.

arrow

10/06/09

Can I submit my workspace (when I'm done) and have the format checked? Because I'm not really sure if I did that correctly (at first, I couldn't store the values my functions returned, because they weren't returned but printed to the screen...)
Please read this "Q and A" page and the "Download Page" for the contest; the answers to your questions should be here.

arrow

29/05/09

May a solution to one problem re-use a result calculated during the solution of another problem?
No: A solution may not rely on the fact that any other problem has been solved first.

arrow

29/05/09

If for a given problem, the number is so large that APL converts it to scientific notation, without the full accuracy, will that be acceptable or do we have to find some way to stop it from putting it in scientific notation?
We are unable to answer this general question. We believe that you should be able to find a solution to this problem on your own, either by reading the problem description carefully, or finding answers in the FAQ or Dyalog Manuals.

arrow

26/05/09

Do I earn extra credit for using my APL function as sort of a math lesson or derivation. For example, what if, first I show a solution that returns an answer with a brute force looping method, but I don't stop there, but then replace that answer with a brute force APLish non-looping answer. Finally, I explain some math, and show an elegant answer that shows mathematical insight? Do you think that will be viewed favorably by the judges?
Yes. If nothing else, it shows creativity in presentation. Perhaps, all but the elegant answer should be commented out so as to improve speed of execution, but the more the contestant illustrates knowledge, the better.

arrow

21/05/09

Must my functions return numbers, or may they return a character vector representation of a number?
You may return either and have your answer considered correct. We suggest you put a comment in your code explaining the reasons for the approach you took.

arrow

19/5/09

I heard about your programming contest from school and it sounds really nice. When I went to get the license, I saw that you have a condition that I must write a report each year about my use of the software.  Is it implied that this is only for as long as I use the software or does it require that I continue to write to you each year for the rest of my life saying I didn't use it?
The condition regarding the annual report only applies if you wish to continue to use the software after one year (generally there will be a new release of the product and we'll be asking for your report when you ask us for the upgrade). If you get a license in order to enter the contest and you submit an entry, we would consider this to be your first 'annual report'. You do not need to continue writing to us if you do not use the software.

arrow

15/05/09

May I utilize functions or code snippets from the workspaces that come with Dyalog (like DFNS) or other sources that I can find on my own?
Yes, you may. However, bear in mind that you will be judged both on uniqueness and evidence of understanding of what you are doing. So, at a minimum, include comments (in your own words) indicating that you understand what it is doing - don't just copy someone else's comments along with their code. If you really want to score well, you might want to see if you can improve on the code you find elsewhere. What's more, if you are in the running for a top prize, expect the judges to call you to discuss your entry. Be prepared to talk about it intelligently.

arrow

15/05/09

May I use a Dyalog Educational or Non-Commercial License to enter this competition, or does the possibility of winning prize money classify this as Commercial Use of the product?
Dyalog Ltd. will not consider participation in programming contests to be a violation of the terms of these licenses - so long as the contests are open to students - or to the general public. It is therefore perfectly legal to use the educational license to create your contest entry.

arrow

28/4 2009

Dyalog has established a Twitter account where you can post questions and seek additional information. Log into the Dyalog Twitter account here.

 

Best of luck!!

This contest is run and sponsored by APL programmers who owe their careers (and a good deal of pleasure) to their work in the language. We hope that you find exposure to APL broadens you horizons and tickles your fancy.

 

 

 

Sample and Downloads

Contest Information