π
<-

TI-BASIC competition

Re: TI-BASIC competition

Unread postby PT_ » 23 Feb 2016, 16:54

Bisam wrote:Does the parser need to throw an error if the string does not contain a valid sentence or the string should be assumed valid ?
E.g., can a string contain 3(+5 ?
This considerably changes the time...

You may assume the string is correct
Age of CEmpires I - In progress!
40%
User avatar
PT_Programmeur
Niveau 13: CU (Calculateur Universel)
Niveau 13: CU (Calculateur Universel)
Level up: 57.2%
 
Posts: 259
Joined: 09 Feb 2016, 23:06
Gender: Male
Calculator(s):
MyCalcs profile

Re: TI-BASIC competition

Unread postby PT_ » 01 Mar 2016, 22:58

Make 24 is a very simple game, with only 4 numbers trying to make 24, but programming is a lot harder... In this task, it is your task you output the string, which makes 24 if you call expr(<string>), of course with only 4 given numbers. I know; there are tons of them on the Internet, but you still need to remember that speed is more important than size, and that seems to be sometimes the problem ;)

Task 3:
Output a string with 4 numbers and any mathematical token that makes 24 if you call expr(<string>). Input is both in Ans and L1 and contains the 4 numbers from 1-9 to create 24. Note: you may assume you CAN make 24 with the input, so it is not impossible. Output should be a string in Str1 which contains the string. If someone call expr(Str1), it should return 24. Limitations: no extra numbers. You can use any TI-BASIC command, as far as you may not add numbers to it (like +1, ^2). sqrt( is still allowed.
I'm looking forward to see your solutions, and if you don't have finished task #2 yet, please don't forget it :)

Good luck everyone! :#tritop#: :#tritop#:
User avatar
PT_Programmeur
Niveau 13: CU (Calculateur Universel)
Niveau 13: CU (Calculateur Universel)
Level up: 57.2%
 
Posts: 259
Joined: 09 Feb 2016, 23:06
Gender: Male
Calculator(s):
MyCalcs profile

Re: TI-BASIC competition

Unread postby PT_ » 07 Mar 2016, 19:13

Maybe it's time for a sneak peek at task #4 to motivate you all to finish this competition (5 tasks)?

- It's not only speed and size, but more than that...
- The more the size, the less the size...
- Too large, too small...
- At the end, you're not at the end...

Good luck everyone for solving these tasks!
Age of CEmpires I - In progress!
40%
User avatar
PT_Programmeur
Niveau 13: CU (Calculateur Universel)
Niveau 13: CU (Calculateur Universel)
Level up: 57.2%
 
Posts: 259
Joined: 09 Feb 2016, 23:06
Gender: Male
Calculator(s):
MyCalcs profile

Re: TI-BASIC competition

Unread postby PT_ » 08 Mar 2016, 13:14

TI-BASIC.

Integers.

Lists.

Matrices.

Do you know that they take up a bunch of memory in the RAM? One single TI-OS variable is 18 bytes, a list is 12+9*[dimension], and matrices 11+9*[width]*[height]. And often is that not necessary. Many people have booleans in their programs, like not(A->A. You can store that in only 1 bit, instead of 18*8=144 bits....
And that is what this task is for. You need to compress data as much as possible, and then you're still not at the end. A very simple example of compressing, is storing booleans as bits, and not as 9-byte floating numbers, which saves much free space in RAM. Your task is to create a lossless compression algorithm (lossless = you can restore it to the original data).

Task #4:
Write an algorithm that compresses data without losing stuff. The input is a string in both Str1 and Ans, which contains a normal English text with these possible characters: ABCDEFGHIJKLMNOPQRSTUVWXYZ_.,. Not more, not less (no lowercase letters!). The length is about 100 characters. Output is very simple: it can be anything, what you prefer, but remember what I said about integers, lists and matrices, which takes up much space. You may use ANY BASIC-command, because there is no compress-command ;). You only need the compression algorithm for scoring, but you should be able to decompress it as well! I say this, because otherwise people could say their algorithms are lossless, but in the meantime...

Anyway, to give you enough time, I decided to make #5 easy. In 2 weeks, this competition will be closed, so be sure to start today! :)

Score:
Not only speed and size is important, the compressed size too (without header!!!)
Ratio speed:compressed_size:size = 3:5:1

This would be an example as an input:
Code: Select all
"CHRISTOPHER LIVES IN NEW YORK CITY, ONE OF HIS SEVERAL LOVES ALONG WITH CALCULATORS, TECHNOLOGY, AND TRAINS."->Str1
prgmCOMPRESS


Good luck everyone, and have fun! :D
Age of CEmpires I - In progress!
40%
User avatar
PT_Programmeur
Niveau 13: CU (Calculateur Universel)
Niveau 13: CU (Calculateur Universel)
Level up: 57.2%
 
Posts: 259
Joined: 09 Feb 2016, 23:06
Gender: Male
Calculator(s):
MyCalcs profile

Re: TI-BASIC competition

Unread postby PT_ » 15 Mar 2016, 19:11

Last summer we had great news: TI releases a new color calculator, the TI-84+CE-T! Everyone happy, but not the ASM experts, because they found out that it was signed with a 2048-bit signing key, which is impossible to crack with the current possibilities. That is why they never can create Apps for the CE, until TI releases the SDK. Maybe we could help to crack that enormous number with BASIC?

The way to crack that key, is to find the factors of that key, such that P*Q=[signing key]. In the reverse, if you know the key, you can theoretically find P and Q, but that takes ages. That is what this task is about. You have to factor a number as fast as possible. I made this, because factorization is a pain and takes much time, especially with large numbers.

Task 5
Given the input in both N and Ans, output the two factors in L1 as a list. No limitations, and you may assume that number is withing the bounds of TI-BASIC.

Example: 5680842901 would be 60869*93329.

Good luck all and speed is still very important! :)




Submission
Now that the last task is being posted, you can submit your entries. Submit your entries by emailing them, in a ZIP file, to basiccompetition@gmail.com . Any entry before March 22th 11:59:59 pm GMT will be accepted, entries after that will be removed. Be sure to provide your Cemetech username in the subject or body of the email so we know who you are! Everyone can submit as many entries as they want, the last one will always be tested. If you have more programs for a task, please say which program is the main.

Testing
This is how I will test all the entries. I will first reset my whole calculator, including the Archive. Next, I transfer my timing program to the calculator, and after that, all the inputs. Finally, after that, I will transfer your program, so the VAT entry is for everyone equal.
I will test all the entries 3 times, and the speed is the average of that 3. You may assume no variable exists, without the input variable(s). I will measure the time with always the same program, upto 3 digits, so 4.193 can be the time for someone.
If you think it is not fair that I test my own programs, please pm me, and we will look for a solution :)

I will try to test all the programs as fast as possible, but it's dependant of the entries how many time that takes :)

I hope you all enjoy this competition, and it's not only for competing, but also for writing algorithms for yourself.

Summary of the 5 tasks:

1. Sort a list
2. Express a string
3. Make 24 with 4 numbers
4. Compress a string
5. Factorize a large number


I hope that there are many, many entries coming! :D

If you have still questions, please post or pm me ;)

Good luck in the last week!
Age of CEmpires I - In progress!
40%
User avatar
PT_Programmeur
Niveau 13: CU (Calculateur Universel)
Niveau 13: CU (Calculateur Universel)
Level up: 57.2%
 
Posts: 259
Joined: 09 Feb 2016, 23:06
Gender: Male
Calculator(s):
MyCalcs profile

Re: TI-BASIC competition

Unread postby PT_ » 21 Mar 2016, 22:28

Exactly one-day-and-some-hours to go, people!
If you haven't submitted your entries yet, don't hesitate to do so! Even if you don't have all the 5 (or more) programs, you can earn points. :)
Age of CEmpires I - In progress!
40%
User avatar
PT_Programmeur
Niveau 13: CU (Calculateur Universel)
Niveau 13: CU (Calculateur Universel)
Level up: 57.2%
 
Posts: 259
Joined: 09 Feb 2016, 23:06
Gender: Male
Calculator(s):
MyCalcs profile

Re: TI-BASIC competition

Unread postby PT_ » 22 Mar 2016, 18:28

And still 6 hours to go! I've received some entries, but these are still much less as the participants ;)
Even if you don't have all the 5 programs, you can submit your entries! :)
Age of CEmpires I - In progress!
40%
User avatar
PT_Programmeur
Niveau 13: CU (Calculateur Universel)
Niveau 13: CU (Calculateur Universel)
Level up: 57.2%
 
Posts: 259
Joined: 09 Feb 2016, 23:06
Gender: Male
Calculator(s):
MyCalcs profile

Online

Re: TI-BASIC competition

Unread postby noelnadal » 22 Mar 2016, 19:31

By the way, how do you ensure that for task 4 our code can be decompressed ? Do we have to give you an explanation along with our program ?
User avatar
noelnadalEcrivain
Niveau 17: GM (Grand Maître des calculatrices)
Niveau 17: GM (Grand Maître des calculatrices)
Level up: 41%
 
Posts: 2271
Images: 0
Joined: 10 Mar 2011, 00:00
Location: France, Melun (77)
Gender: Male
Calculator(s):
MyCalcs profile
Class: INRIA Paris
Twitter: nadalnoel
Facebook: noel.nadal1
GitHub: noelnadal

Re: TI-BASIC competition

Unread postby PT_ » 22 Mar 2016, 20:47

noelnadal wrote:By the way, how do you ensure that for task 4 our code can be decompressed ? Do we have to give you an explanation along with our program ?

As far as I've seen, all the people who sent task #4 explained how to decompress.
Age of CEmpires I - In progress!
40%
User avatar
PT_Programmeur
Niveau 13: CU (Calculateur Universel)
Niveau 13: CU (Calculateur Universel)
Level up: 57.2%
 
Posts: 259
Joined: 09 Feb 2016, 23:06
Gender: Male
Calculator(s):
MyCalcs profile

Online

Re: TI-BASIC competition

Unread postby noelnadal » 22 Mar 2016, 20:50

Ok, thanks. ;)
User avatar
noelnadalEcrivain
Niveau 17: GM (Grand Maître des calculatrices)
Niveau 17: GM (Grand Maître des calculatrices)
Level up: 41%
 
Posts: 2271
Images: 0
Joined: 10 Mar 2011, 00:00
Location: France, Melun (77)
Gender: Male
Calculator(s):
MyCalcs profile
Class: INRIA Paris
Twitter: nadalnoel
Facebook: noel.nadal1
GitHub: noelnadal

Previous

Return to TI-Basic

Who is online

Users browsing this forum: No registered users and 2 guests

-
Search
-
Social TI-Planet
-
Featured topics
Ndless for CX 4.5.5 / CX II 6.2.0
Comparaisons des meilleurs prix pour acheter sa calculatrice !
"1 calculatrice pour tous", le programme solidaire de Texas Instruments. Reçois gratuitement et sans aucune obligation d'achat, 5 calculatrices couleur programmables en Python à donner aux élèves les plus nécessiteux de ton lycée. Tu peux recevoir au choix 5 TI-82 Advanced Edition Python ou bien 5 TI-83 Premium CE Edition Python.
Enseignant(e), reçois gratuitement 1 exemplaire de test de la TI-82 Advanced Edition Python. À demander d'ici le 31 décembre 2024.
Aidez la communauté à documenter les révisions matérielles en listant vos calculatrices graphiques !
12345
-
Donations / Premium
For more contests, prizes, reviews, helping us pay the server and domains...
Donate
Discover the the advantages of a donor account !
JoinRejoignez the donors and/or premium!les donateurs et/ou premium !


Partner and ad
Notre partenaire Jarrety Calculatrices à acheter chez Calcuso
-
Stats.
3634 utilisateurs:
>3604 invités
>22 membres
>8 robots
Record simultané (sur 6 mois):
32248 utilisateurs (le 01/09/2025)
-
Other interesting websites
Texas Instruments Education
Global | France
 (English / Français)
Banque de programmes TI
ticalc.org
 (English)
La communauté TI-82
tout82.free.fr
 (Français)