Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old May 3rd, 2008, 12:36 PM   #1
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Location: Waterloo, Ontario
Posts: 1,885
Rep Power: 5 Sane will become famous soon enough
Send a message via MSN to Sane
Smile Sane's Monthly Algorithms Challenge #1 [05-08]

I've been thinking about doing this for a while now, and on queue with Grich's post, I've decided to go ahead with it.

I've designed 4 problems ranging from beginner to advanced difficulty.

Beginner and Junior are for those who haven't had much experience with contest-style challenges, but can still think logically and write good solid code.

Senior and Advanced are for those experienced with writing more complicated algorithms.

Guru will be the trickiest difficulty level which will measure up to the tough IOI and ACM problems. I have not included one in this problem set. I will save them for later once I see what skill level people enjoy doing.

But even for any difficulty, it will be challenging to attain 100%. You must make your solution work for every possible test file. And these test files will not be revealed until after the competition. So test your code inside and out until then.

Please read every rule. Submission deadline is May 31, 2008.

The challenges have been attached to the bottom of this post. As the month progresses, due to necessary clarifications, the rules and/or questions may be updated at any time. Sorry for any inconvenienes.

Thanks and good luck to all who participate! I hope this goes well.


-----------------------------------------------------------------------------------

Rules and General Information

1) Do not post or share any solutions!

2) You may ask questions and give simple hints and tips in the thread provided each month.

3) Input is always in the format specified in the problem, and will be read from the specified file (for example, “move.in”). Output is written to the specified file (for example, “move.out”).

4) You may use any language, but only C/C++/Java/Python will be graded by me (see rule 9).

5) Each solution must take no more than 10 seconds to execute. Also, your program must never use more than 64 MB of stack space (unless otherwise specified). These constraints should only be considered for Senior and Guru level problems.

6) E-mail your submissions to dr.sane@gmail.com with “SMAC” in the subject line before the submission deadline.

7) You have a month to write your solutions, and submissions are only made final after the deadline cutoff. Before then, if you would like to update your submission, just make sure you e-mail it to me and let me know.

8) It is recommended that you start at “Beginner” to familiarize yourself with the problems, and then work your way up. Even the most experienced programmers may find the last problem(s) very challenging.

9) Sometime after the deadline, results will be publicly posted showing how well each program performed on larger and more tricky data files (not the given sample data). Also, solutions and an analysis of each problem will be given. If your program was not written in C/C++/Java/Python, I will not be able to grade your submission. In this case, I will give you the test files and expect you to report back with your own score within the next couple days.

10) Every solution’s score will be based solely on its ability to solve the unknown test files. Points are awarded for every perfectly matching output file. No points are awarded for clarity, style, presentation, or execution speed (within the alloted time).

11) Don’t take the results (or expectations) of these challenges seriously. The point of this is to learn and have fun. If you would like me to refrain from posting your results or solutions in the analysis thread after the contest, please specify that in your submitted e-mail(s). Good luck and happy coding!

Submission Deadline: May 31
Attached Files
File Type: doc SMAC_1_May_03.doc (54.0 KB, 32 views)
File Type: pdf SMAC_1_May_03.pdf (110.9 KB, 51 views)

Last edited by big_k105; May 4th, 2008 at 7:13 PM.
Sane is offline   Reply With Quote
Old May 3rd, 2008, 1:40 PM   #2
Jessehk
The Oblivious One
 
Jessehk's Avatar
 
Join Date: May 2005
Location: Ontario, Canada
Posts: 644
Rep Power: 4 Jessehk is on a distinguished road
Re: Sane's Monthly Algorithms Challenge #1 [05-08]

PDF's instead of DOC's please.

EDIT: Also, while I've been programming for a while, I haven't had a lot of competition experience. I'll probably write the first two "classes" only.
__________________
Dr. Zoidberg: [ecstatic] I'm going to a movie... with FRIENDS!
Jessehk is offline   Reply With Quote
Old May 3rd, 2008, 1:50 PM   #3
titaniumdecoy
Expert Programmer
 
titaniumdecoy's Avatar
 
Join Date: Nov 2005
Posts: 855
Rep Power: 3 titaniumdecoy is on a distinguished road
Send a message via AIM to titaniumdecoy
Re: Sane's Monthly Algorithms Challenge #1 [05-08]

I'm impressed. It looks like you put a lot of work into this, Sane. I'll take a closer look when I get the chance.

I converted the Word document to a PDF for those who prefer that format.
Attached Files
File Type: pdf SMAC_1_May_03.pdf (110.9 KB, 24 views)
titaniumdecoy is offline   Reply With Quote
Old May 3rd, 2008, 2:09 PM   #4
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Location: Waterloo, Ontario
Posts: 1,885
Rep Power: 5 Sane will become famous soon enough
Send a message via MSN to Sane
Re: Sane's Monthly Algorithms Challenge #1 [05-08]

Thanks Titanium. That makes it look much better.

I'd be grateful if a mod could add that attachment to my first post. Or better yet, could a mod allow me to have editing privileges over 30 minutes for that one post?
Sane is offline   Reply With Quote
Old May 3rd, 2008, 2:13 PM   #5
Jimbo
Battle Programmer
 
Jimbo's Avatar
 
Join Date: Feb 2006
Location: Bellevue, WA, USA
Posts: 763
Rep Power: 3 Jimbo is on a distinguished road
Re: Sane's Monthly Algorithms Challenge #1 [05-08]

To mods: Actually, could we get our own subforum for this, and have Sane as a moderator (kudos for putting forth the effort btw). That way we can have our own little corner to discuss these competitions
__________________
<insert disclaimer here>
<insert shameless plug for Visual Studio here>
Jimbo is offline   Reply With Quote
Old May 3rd, 2008, 2:14 PM   #6
Jessehk
The Oblivious One
 
Jessehk's Avatar
 
Join Date: May 2005
Location: Ontario, Canada
Posts: 644
Rep Power: 4 Jessehk is on a distinguished road
Re: Sane's Monthly Algorithms Challenge #1 [05-08]

Sane, I have a question. In the beginner class, you state that

Quote:
Originally Posted by Rules
3) Unless n is prime, then n must decrease by 1.
Which to me implies that n must decrease by one except when it is prime. But your sample data seems to indicate otherwise.

For example,
You say a start of 2 2 should result in a chain of 2, 1.
However, 2 is prime. So it seems to me that the sequence should be 2 5.
When I change the rule to decrease by 1 only when n is prime, I can replicate your test case. Can you clarify please?
__________________
Dr. Zoidberg: [ecstatic] I'm going to a movie... with FRIENDS!
Jessehk is offline   Reply With Quote
Old May 3rd, 2008, 2:22 PM   #7
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Location: Waterloo, Ontario
Posts: 1,885
Rep Power: 5 Sane will become famous soon enough
Send a message via MSN to Sane
Re: Sane's Monthly Algorithms Challenge #1 [05-08]

Sorry, I see why that's misleading. That sentence was intended to finish the sentence from rule 2.

It was to be read like:

"If n is positive, n will increase by 3, unless n is prime, then n must decrease by 1."

You are correct. Follow the test case. It should be "n must decrease by 1 if n is prime".
Sane is offline   Reply With Quote
Old May 3rd, 2008, 2:29 PM   #8
Jessehk
The Oblivious One
 
Jessehk's Avatar
 
Join Date: May 2005
Location: Ontario, Canada
Posts: 644
Rep Power: 4 Jessehk is on a distinguished road
Re: Sane's Monthly Algorithms Challenge #1 [05-08]

Ah, sorry. One more question.

Can I write C99 (with stuff like stdbool.h, variables declared inside for loops, etc) or should I stick with C89?

Oh, and thanks for putting so much work into this, Sane. It's great.
__________________
Dr. Zoidberg: [ecstatic] I'm going to a movie... with FRIENDS!
Jessehk is offline   Reply With Quote
Old May 3rd, 2008, 2:33 PM   #9
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Location: Waterloo, Ontario
Posts: 1,885
Rep Power: 5 Sane will become famous soon enough
Send a message via MSN to Sane
Re: Sane's Monthly Algorithms Challenge #1 [05-08]

I'm not going to be picky. If something doesn't compile, or something doesn't even work on the simple test files, I'll try to fix the minor problem. Same goes with typos and little output format mistakes. I won't count those as bad solutions. I want to keep this fun, and the rules lenient. Feel free to use C99, but avoid using anything that will be too difficult for me to test.

Thanks, glad you guys like it.
Sane is offline   Reply With Quote
Old May 3rd, 2008, 3:32 PM   #10
Freaky Chris
Professional Programmer
 
Freaky Chris's Avatar
 
Join Date: Dec 2007
Location: England
Posts: 269
Rep Power: 1 Freaky Chris is on a distinguished road
Send a message via MSN to Freaky Chris
Re: Sane's Monthly Algorithms Challenge #1 [05-08]

This looks like you have put alot of effort into it and i hope i can get my tiny brain around it and come up with some form of a solution to the easy one's lol.

But it does look fun.
Chris
__________________
Steven Skiena - Algorithms
Freaky Chris is offline   Reply With Quote
Reply

Bookmarks

Tags
algorithms contest, programming challenges

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Uman's WEEKEND CHALLENGE uman Coder's Corner Lounge 34 Aug 5th, 2008 9:25 PM
Sorting algorithms problem....... MicDareall Python 11 Apr 19th, 2006 2:48 PM
Sorting Algorithms 6431hoho Coder's Corner Lounge 9 Feb 28th, 2006 6:57 AM
Challenge: How to make daily life better with programming? tempest Coder's Corner Lounge 53 Jun 17th, 2005 2:37 AM
Weekend Challenge theduck Community Announcements and Feedback 43 Jun 3rd, 2005 4:58 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 7:10 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC