Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Xeda112358

Pages: 1 ... 209 210 [211] 212 213 ... 317
3151
Math and Science / Re: A Math... Question :)
« on: September 21, 2011, 04:22:41 pm »
Hehe, actually it is Windows 7 :P

@phenomist: Actually, it is relatively "easy" to check primality, it is "difficult" to factor. It was once thought that solving one would solve the other, but it has been proven that factoring and deterministic primality testing are two separate problems.

I am not too knowledgeable on the subject of the AKS deterministic primality test, but it puts Pascal's triangle to clever use and it is in fact polynomial time! The idea stems from polynomial expansion. I am sure you know how to expand (p+q)n by using Pascal's triangle (or nCr), but here is a really cool fact: Excluding the first and last element of a row in pascals triangle (so excluding the 1), all elements in row p are divisible by p if and only if p is prime. There is a neat little proof for that, but I don't have the patience to type it out :D

If you think about that, then in the expansion of (x+1)p where p is prime, all of the terms between the first and last will be divisible by p. (Wow, I think I finally understand the AKS primality test!  :w00t:) So what this means, is that if you do (x+1)p mod p, the only remaining terms are xp+1. The AKS primality test makes clever use of this :) Isn't this just lovely! Talking through this, I now actually understand the concept ! I think I could totally implement this, now!

But yeah, this doesn't help us factor numbers... hehe, yet 3:-)

3152
Miscellaneous / Re: Why Johnny Can't Code
« on: September 19, 2011, 07:33:14 am »
Yeah, I am glad that I was not the only one who couldn't find BASIC for my computer :/ It is my intent and goal to eventually make a BASIC programming language, though! I just wish I knew how to draw shapes in Python as that is the only computer language I know, currently :/

Cool article!

3153
Pokémon Purple / Re: [PP] Progress '11
« on: September 18, 2011, 10:56:55 pm »
:/ I hope you figure it out because that sounds like a tough problem :/

3154
TI Z80 / Re: Prime Tester benchmarks
« on: September 18, 2011, 04:37:41 pm »
Well it is technically Polynomial time, but the issue is that even though it is polynomial time, it isn't that much faster than using an elliptic curve approach. The only difference is that using elliptic curves will result in a probabilistic result as opposed to a deterministic result (I believe). I haven't read much on elliptic curves, and I've never really implemented the AKS primality test :/
 

3155
Math and Science / Re: A Math... Question :)
« on: September 18, 2011, 03:37:05 pm »
Oh, the little curves are my own implementations :) It is the actual pieces that the curves "connect" to that are the pascals triangle part :) I drew it in paint, so I went down to the pixel

3156
Math and Science / Re: A Math... Question :)
« on: September 18, 2011, 03:26:59 pm »
And my picture is a reference to Pascal's Triangle :D

3157
Math and Science / Re: A Math... Question :)
« on: September 18, 2011, 03:20:10 pm »
Ah, okay... Still, it isn't a pretty proof :P Also, sqrt(Time) is correct! Thanks for the proof, because that helped me make sense of it :)

3158
Math and Science / Re: A Math... Question :)
« on: September 18, 2011, 02:39:07 pm »
Could you explain how you came to the result? The smallest value where a 134 digit gap or more occurs that I found (without factoring the values) was 57 digits long :/

(it should actually be a gap of more than 240)

3159
TI Z80 / Re: Prime Tester benchmarks
« on: September 18, 2011, 02:18:59 pm »
I would use AKS, but unfortunately that wouldn't work for large numbers on the calc :D

EDIT: Still, it might be neat to implement it, even if it couldn't test large numbers...
EDIT2: Also, yes, this is BASIC... I know I made a tester in Grammer code that could test up to 65535 and it was pretty dang fast

3160
ASM / Re: The worst TI code I've ever seen
« on: September 18, 2011, 02:06:43 pm »
It is almost scary how good some of the programmers are, here. I think that if they all designed an OS, it would be ridiculously amazing and more stable (though the TI-OS is pretty stable).

3161
Miscellaneous / Re: Political party?
« on: September 18, 2011, 02:02:38 pm »
I registered last month... I am registered as undecided and my fiancée is registered as republican :D

3162
Miscellaneous / Re: Political party?
« on: September 18, 2011, 11:42:05 am »
:D Also, I would like to point out that I am glad there are people interested in their government! I know too many people that just don't care unless they need to blame something or someone :)

3163
Miscellaneous / Re: Political party?
« on: September 18, 2011, 11:31:12 am »
I know plenty of republicans and democrats that try not to incorporate religion into politics
I know plenty that do
Um, also, about the economy and whatnot, I am with DJ_O on that one. When Bush jr. became president, I was just becoming aware of politics (I was 8?) and by the time I was 16, half of my life was spent under Republican rule and ideals. Naturally I saw how screwed up the economy was getting and decided to blame it on Bush and the republicans because that was who was in power. However, when Obama came into power and things haven't managed to get fixed and there are still problems and people can't support their families, I realised that it wasn't entirely Bush's fault or Obama's, it was just a political fault.

In tenth grade, I decided to read up on some social and economic ideas and this included books like the Communist Manifesto. What I learned from that is that while many things seem good on paper, they often don't work out as planned in practice. Whenever I hear people make a strong statement about how things should be done or how they should have been done, I want to point out:
-Hindsight is twenty-twenty. It is always easier to see old mistakes than to predict or anticipate new ones
-Instead of providing a political opinion, come up with a political solution and apply it. If you can do that, you can lead a nation and anybody will follow your ideals.

Sorry if my two cents aren't worth anything :/ This economy just isn't helping

3164
TI Z80 / Prime Tester benchmarks
« on: September 18, 2011, 11:05:47 am »
I was curious about what makes for a worthy enough prime tester to upload to TICalc. I think speed, RAM usage, and method are all key. The fastest version I have so far is 89 bytes, tests for primality in numbers greater than 5, and so uses a list of {2,3,5} to make sure it is not any of those. It takes 30 seconds to say 90000049 is prime and 103 seconds to say 1166881097 is not prime (this is 77477*15061). I am sure it could be faster and smaller, so any ideas?


90000049,prime,30 seconds,uses only A and Ans,89 bytes
90000049,prime,50 seconds,uses only A and Ans,65 bytes
90000049,prime,104 seconds, uses A and Ans,46 bytes
1166881097,Composite,103 seconds, uses A and Ans,89 bytes

3165
Math and Science / Re: A Math... Question :)
« on: September 17, 2011, 10:27:29 pm »
Hmm, could I see the code used to test it and is there any loss of accuracy when Python works with those numbers?

Pages: 1 ... 209 210 [211] 212 213 ... 317