Projσct Σ
Notice for those who can't/refuse to read: Do NOT post your solutions, PM Me!
Introduction: Welcome to Project Sigma! This is along the lines of Project Euler (for those that know of it), but is more oriented to this community of beginner scripters utilising Simba. Don’t be fooled though, as it is designed for every one of all levels! Problems to solve will be released on a weekly basis, with user submissions submitted to me (via the PM system here at SRL/Villavu ONLY). Points are awarded to those whose code executes the fastest on my machine.
Rules:1. Problems are to be solved using Simba. i. This includes, but is not limited to, compiled code in the form of external libraries.
ii. Code must be able to compile using the Lape interpreter.
iii. Code cannot be submitted precompiled.
2. Problems must be solved independently. i. This excludes using the assistance of the Internet to find the pseudo code of a required algorithm.
ii. This applies to You, the coder, directly or indirectly asking for assistance for a given problem (i.e. using IRC, another medium such as StackOverflow or programming-oriented forums).
3. The main, “problem-solving” part of the solution must be your code/creation. i. e.g., if the problem asks to find the sum of an integer array, you cannot utilise Simba’s included method SumIntegerArray.
4. Solutions must be submitted before or on the due date. Late submissions will forfeit your chance to increment your position on the leader board. i. If a person submits two or more solutions, then the earliest submitted will only be used – so test and ensure before submitting!
ii. If a person submits two or more solutions to multiple levels, then their highest level submission will only be used for grading.
iii. SRL Members (both past and present) and higher ranked (also, both past and present) are not allowed to compete in the beginner level.
5. Solutions are submitted under a public domain license. i. This includes the later publication of your solutions for others to learn off of.
ii. By submitting, you agree to allow unrestricted use of your code in other peoples projects, utilising Simba/SRL or otherwise.
6. Use common sense, keep this competition/learning experience clean and fun
Marking Criteria (How you are judged): If your submission does not meet the required outcomes of the problem, then it will not be graded as per below.
What determines your resultant score is [mainly] based solely on the speed of your submission. Textual outputs (i.e. WriteLn) will not be counted when determining the speed of your submission if they are independent of your problem. A maximum of five (if not otherwise stated) tests will be conducted and run through multiple iterations to determine your speed. The maximum speed attained, will be the speed that is used to determine your score.
If two or more solutions achieve the same result, then all of these solutions will be stress tested for a maximum of 10× iterations with a much wider variety of parameters used. The winner of this stage will be awarded an additional 5, 3, or 1 point (with respect to their level – Advanced, Intermediate or Beginner).
If two or more solutions once again receive the same speed result, then their solutions performance will be tested using more accurate timing methods using the same test parameters as the previous paragraph. The winner of this stage will be awarded with an additional 7, 5, or 3 points (also, with respect to their level).
If once again, two or more solutions receive the same result, then the amount of raw code that is theirs used to complete the problem will be used to grade the result, with efficiency (CPU usage and memory usage) taken into account. The winner of this stage will be awarded 12, 9 or 6 points with respect to their level. If the solutions examined tie once again, then all entrants will be awarded with 10, 7 or 4 extra points with respect to their level.
Leaderboard:
Overall:
- mixster - 20
- Dgby714 - 10
- Methrend - 10
- beginner5 - 5
- slushpuppy - 5
- Sex - 2
- Zyt3x - 2
- putonajonny - 2
- masterBB - 2
- -
Advanced:
- mixster - 20
- beginner5 - 5
- -
- -
- -
- -
- -
- -
- -
- -
Intermediate:
- Dgby714 - 10
- Methrend - 10
- Sex - 2
- Zyt3x - 2
- putonajonny - 2
- masterBB - 2
- -
- -
- -
- -
Beginner:
- slushpuppy - 5
- -
- -
- -
- -
- -
- -
- -
- -
- -
Problem #3:
Beginner: Binary What?You are to construct a program which converts X (of type unsigned Integer [that means no negative values will be given]) into its binary equivalent. You are not allowed to use any in-built Simba methods to assist with this conversion. Make sure X is a defined constant that is placed at the beginning of your script and is more suitably named given its purpose.
NOTE: You are not required to pad your output.
Example:
X = 2
Output = 10
|
|
Example:
X = 10
Output = 1010
|
|
Example:
X = 15
Output = 1111
|
|
Points Awarded: 5 Intermediate: Fun With Factorials #2!Write a program that finds the amount of trailing zeroes of the factorial X. You are not allowed to use the in-built Simba method Factorial to calculate the factorial of a number (you must make your own!). Make sure X is a defined constant that is placed at the beginning of your script and is more suitably named given their purpose.
Example #1:
X = 5
Factorial = 120
Output = 1
|
|
Example #2:
X = 3
Factorial = 6
Output = 0
|
|
Points Awarded: 10
Advanced: Big-Super-Large Numbers!You are to write a library for Simba in the form of an include file which enables support for integers larger than length 20 ( Length[IntToStr(2^64)] ). You must support the four basic mathematical operations (addition, subtraction, multiplication and division), as-well as
y-√ (i.e. Sqrt[y](x) ) in separate functions with the result type as your big number type, as-well as including a method to convert a big number to and from a standard integer with overflow checking, and to and from a string.
NOTE #1: You are not expected to have support for floating point numbers in your solution.
Example:
BigNumAdd(100, 100) = 200 // Addition
BigNumSub(50, 100) = -50 // Subtraction
BigNumMultiply(2, 50) = 100 // Multiplication
BigNumDiv(50, 2) = 25 // Division
BigNumSqrt(25, 2) [==Sqrt(25)] = 5 // Square root
BigNumSqrt(1000, 3) [== y-root(1000, 3)] = 10 // Cube root
BigNumToStr(24) = ‘24’
BigNumToInt(1) = 1
|
|
Points Awarded: 20
Submission Date:To be submitted by:
Sunday 25th of March, 2012, 12:00 PM (AEDT / GMT + 11)
OR, Sunday 25th of March, 2012, 01:00 AM (GMT)
OR, Saturday 24th of March, 2012, 5:00 PM (PST / GMT - 8)
Good Luck, and don't rush!