Hello everyone,

It has been time TI-Planet have not organized a contest, and here is the lack filled Wink
So we organize a contest, about 5 weeks, well mixing arithmetic and algorithmics.

Introduction:
In mathematics, a prime palindom number is a number which is both prime and palindromic.

A prime number is an integer that only admits two positive and integer divisors (which are 1 and itself).
This definition excludes 1, which has only one positive and integer divisor ; it excludes 0 too, which is divisible by all the positive integers.
For example 6 = 2 × 3 is not prime and 21 = 3 × 7 or 7 × 3 either. But 11 is prime because 1 and 11 are the only divisors of 11.
So, the prime numbers are, in order, 2, 3, 5, 7, 11...

A palindromic number is a number whose writing (in base 10) is read in the same way from left to right and from right to left.
For example, all the 1-digit numbers are palindromic: 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9.
The 2-digit palindroms are: 11, 22, 33, 44, 55, 66, 77, 88 and 99.
101 is a 3-digit palindromic number.

So, the prime palindromic numbers are: 2, 3, 5, 7, 11, 101, 131...

Subject :
Make a program fastest as possible to find the n-th prime palindromic number.

Plateform :
The candidate will perform its participation:
  • TI-Nspire
  • TI-82Stats/83/76
  • TI-83+/84


Categories:
The candidate's production will be judged in one of those categories:
  • TI-Nspire
  • TI-82Stats/83/84/76


Languages :
  • TI-Basic Nspire
  • TI-Basic TI-82Stats/83/84/76
  • TI-83+/84 Assembly NO SHELL (So, you can participate with Axe compiled for no shell)
  • TI-82Stats/83/76 Assembly NO SHELL

NB: on TI-82Stats/83/84,TI-Basic and assembly combinations are allowed.

Constraints :
On TI-82Stats/83/84/76, the program will catch n in the 'Ans' variable, and will send the nth prime palindromic number as a result in Ans.
For example, to obtain the 42th prime, we will type:
  • TI-Basic program: 42:prgmPALPREM
  • TI-83+/84 Assembly program: 42:Asm(prgmPALPREM
  • TI-82Stats/83/76 Assembly program: 42:Send(9prgmPALPREM

In each case, the program should send the result 18181 in Ans, reusable in the home screen for calculations.


On TI-Nspire, the main program should be a function which take the n parameter and which sends the result. For example, palprem(42) should answer 18181.

YOU MUST NOT USE a pre-calculated list of prime palindromic numbers in your program, directly under penalty of disqualification.

YOU MUST NOT USE functions like isPrime() which would provide a direct response, it destroys the value of algorithmic thinking, and it would be unfair to those who don't have this function... Wink

If on Nspire, The program MUST run on not-CAS TI-Nspires.

Notation :
The final score will be on 20 points, and the scale is as follows:
  • 3 points for the proper functioning of the program
  • 10 points for the fast execution of the program (it will be tested and compared to competitors on identical machines with identical languages)
  • 3 points for the respect of the rules
  • 4 points for an explanation


Jury :
Participations are rated on an equitable basis according to a common scale by a jury whose composition is as follows:
  • Adriweb
  • Critor
  • Laurae
  • Levak
  • Lionel Debroux


When ? :
The contest starts Monday the 1st of April 2013 and finishs Sunday the 12th of May, 23h59 (GMT+1)

How ? :
To participate, candidates must send to the email address info@tiplanet.org :
  • complete mailing address with first and last name
  • a valid email address for contact
  • the expected production (8xp, 83p, tns)
  • any other information or file deemed useful by the candidate concerning its production

The e-mail correctly send is taken as an entry.

Lots :
Through our partnership with TI-France and Jarrety, the winners of the contest (one winner per category) will be rewarded with:
  • 1st price: 1 calculator + 4 TI-Planet stickers
  • 2nd price: 1 poster TI + 3 TI-Planet stickers
  • 3rd price: 2 TI-Planet stickers

1st price in the Nspire category: a TI-Nspire CX (not CAS)
1st price in the TI-82/83/84 category : a TI-84 Pocket.fr

Complete rules:
The complete rules for this contest, legally registered to an usher, are available on
TI-Planet or the UPECS website. (French)


See you soon on TI-Planet !
Original topic : http://tiplanet.org/forum/viewtopic.php?f=43&t=11479
( Reposted also on Omnimaga : http://ourl.ca/18650 )

PS: I know I'm a bit late, because the contest has started...
Hmm, this seems like a pretty cool contest! I would love to add a TI-84 Pocket.fr to my collection... That seems like quite a reasonable deadline, although I also need to make sure I don't completely forget about it. Hopefully you'll bump this thread every once in a while, especially in late April. Everything about the rules seems clear enough to me.
Bump!
Go KermMartian, go, go, go!

Look forward to seeing you brandishing a TI-84 Pocket.fr...

"Why this thing is so easy a 4-year-old could understand it...
Run out quick and get a 4-year-old!"

Groucho Marx
Out of curiosity, is there an upper bound on the size of the numbers which we must be able to factor? i.e., is this limited to 16bit integers, or must we go higher?
The last I remember, such questions were constantly avoided.
I would like some guidelines on the maximum prime that might be tested. For example, I want to do z80 ASM, so I need to know if I can stick with 16-bit numbers, or I need 32-bit numbers (or worse? If it's more than 32-bit, I probably won't bother spending the time to develop the requisite routines). 16-bit numbers at most would be preferable, for certain algorithmic reasons.
TI-Z80 programs, especially ASM ones, need to handle palindromic prime numbers larger than 16 bits - it's far too easy to cope with numbers <= 16 bits large Wink
I'm not sure whether one needs to handle numbers larger than 32 bits on the TI-Z80 series... but maybe it's possible to use an algorithm and implementation fast enough for numbers slightly in excess of 32 bits to be tractable on the TI-Z80 series ?

It we had opened the contest to the TI-68k series, handling numbers larger than 32 bits would certainly be a requirement, at least for ASM programs. The 68000 has 32-bit registers and 32-bit reads/writes, a 32/16 division and modulo instruction.
As you know, the z80 has no division or modulo instructions at all, and few enough registers that manipulating 32-bit values is a real challenge. All the more fun, though! I hear that at least Runer112 and Jacobly are competing in the z80 ASM category, so I'm not sure if I'll bother entering.
Please have a go KermMartian. Whatever program solution you create will be an excellent teaching aid for the rest of us anyway and we will all benefit from your creativity in programming as we pour over the thickets of your code. We may not understand it all, but a thing of beauty is a joy forever. Very Happy
We're down to the wire. Cemetech represent?
The contest will be over ~40 hours from now, on Sunday 12th 23:59 (11.59 p.m) CEST.
Weregoose wrote:
We're down to the wire. Cemetech represent?
Too much effort and not enough benefit for writing 32-bit math routines and figuring out what prime number-generation method (Sieve of Atkin? something else?) would be fast in z80 ASM, for me. If I was the only z80 ASM coder entering I would consider throwing something together between today and tomorrow, but I'm not, so sadly I'm not going to enter.
I plan to enter in TI-BASIC, but I get the idea I won't be a winner for that. It takes almost a minute to find the 100th prime palindrome.
Xeda112358 wrote:
I plan to enter in TI-BASIC, but I get the idea I won't be a winner for that. It takes almost a minute to find the 100th prime palindrome.
I think we can agree that Weregoose is likely to blow away all the competition in the TI-BASIC category. Smile
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement