a clarification to the correction
There ARE algorithms to calculate whether a given number is prime or
not.  Here is one:
<quote="Nuno Garcia">You just have to divide the number consecutively
by others until you conclude that
there are no divisors and thus the number is prime</quote>
There ISN'T an algorithm that provides a list of prime numbers or for
instance, the first prime number bigger than 1,000,000.

On Dec 11, 11:27 am, "Jesse Lesperance" <[email protected]>
wrote:
> A correction to your statement, there ARE algorithims to calculate the  
> prime of any given number.  In fact, those algorithims are used for  
> many things like SSL encryption
>
> Sent from my iPhone
>
> On Dec 10, 2009, at 7:22 PM, "Nuno Garcia" <[email protected]>  
> wrote:
>
>
>
> > Hi, I'm picking the last part of the question to answer you.
>
> > Everyone knows how important the prime numbers are in Computer
> > Science. And also everyone should know that there is no algorithm to
> > compute / identify if a number is prime or not: you just have to
> > divide the number consecutively by others until you conclude that
> > there are no divisors and thus the number is prime.
>
> > The difference between knowing your math and do this in a brute force
> > approach is the difference between being able to calculate if a number
> > is prime or not (specially for very large numbers).
>
> > For instance, is a number is not divisible by 2, it will not be
> > divisible by 4, or by 6 or by any other pair. So if you conclude that
> > the number is not divisible by 3, you can skip the pairs in the
> > division check. And the same thing applies to multiples of 3, 5, and
> > so on.
>
> > This is just using concrete maths. You can find examples in almost any
> > area of maths, for example, in graph theory. The shortest path
> > algorithm that routes our data packets in the Internet is a purely
> > mathematical algorithm which happens to be usable in computer networks
> > (thanks, E. Dijkstra!).
>
> > Best regards,
>
> > Nuno
>
> > 2009/12/10 Rammohan Vadlamani <[email protected]>:
> >> Hi all,
> >>          I have been practising java programming for the past one  
> >> year and
> >> have learnt pretty much of it. But I want to program really big  
> >> stuff. Can
> >> any one tell me how should I proceed. I have also heard that  
> >> algorithms and
> >> mathematics play a big role in programming. Can any one let me know  
> >> the
> >> significance of algorithms and maths in the field of computer  
> >> programming.
>
> >> Rammohan
>
> >> --
> >> To post to this group, send email to
> >> [email protected]
> >> To unsubscribe from this group, send email to
> >> [email protected]
> >> For more options, visit this group at
> >>http://groups.google.com/group/javaprogrammingwithpassion?hl=en
>
> > --
> > To post to this group, send email to 
> > [email protected]
> > To unsubscribe from this group, send email to 
> > [email protected]
> > For more options, visit this group 
> > athttp://groups.google.com/group/javaprogrammingwithpassion?hl=en- Hide 
> > quoted text -
>
> - Show quoted text -

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/javaprogrammingwithpassion?hl=en

Reply via email to