Implementing the Trial Division Algorithm

Поделиться
HTML-код
  • Опубликовано: 20 дек 2024

Комментарии • 8

  • @jamesdelapena5648
    @jamesdelapena5648 4 месяца назад +3

    Very nice! Love how you discussed variable "scope"; that tends to confuse students sometimes, in my experience. And love the mention of COBOL at the end there, lol... can you believe that many big banks and government systems still run COBOL? We used to call it "Completely Obsolete Business-Oriented Langauge", even back when I first learned to code in like 2003. Apparently it's not obsolete, though it certainly should be!! And yeah, they made us learn PERL when I took CS at University, which nowadays has been almost entirely replaced by Python. Programming is a wonderful way to explore prime-finding and factorization algorithms. If I'm not mistaken, many encryption algorithms are still based on factoring very large numbers, since the time complexity requires such a long time to factor very large integer values. Keep up the great coding videos!

    • @MadComputerScientist1
      @MadComputerScientist1  4 месяца назад +2

      A lot of COBOL is legacy code, but sometimes when a language is really good at something, there's no reason to change it. COBOL is really good at batch processing large amounts of data efficiently. Many modern languages don't even come close. They've tried to replace COBOL with Java, and a lot of businesses have. It's just that a few mainframes running mission critical applications work better using COBOL than they would with Java.
      Fortran is still used in scientific applications as well. Python has taken over a lot of it, but there are a lot of scientific libraries written in Fortran, and Fortran code runs faster than most Python code.

    • @AMcAFaves
      @AMcAFaves 4 месяца назад +1

      Yes, the asymmetry of the time taken to multiplying numbers, versus factoring the result to get the original numbers is the basis of public key cryptography. However, using a quantum computer, you can factor a number on the same order of time scale as multiplying the factors to get that number. The algorithm to do that with a quantum computer is called Shor's algorithm. I don't think enough qubits can be stable enough in current quantum computers to factor the huge numbers used in public key cryptography, yet, however.

  • @DavidHodge-z9v
    @DavidHodge-z9v 5 месяцев назад +1

    Excellent video. This link shows the best of what we have atm. It uses trial division as part of it so if trial division can be improved upon which i believe I have it can be used in this to speed it up further. Between us we could have something we could jointly name and be of use. You don't have to but thought id ask.
    en.m.wikipedia.org/wiki/General_number_field_sieve

    • @MadComputerScientist1
      @MadComputerScientist1  5 месяцев назад +1

      Maybe? If this is indeed an NP problem, showing that it can't be reduced to a more efficient algorithm would, however, solve the biggest unknown quetion in computer science, which is if {P} = {NP} or if {P} is a proper subset of {NP}.

    • @DavidHodge-z9v
      @DavidHodge-z9v 5 месяцев назад +1

      ​@@MadComputerScientist1No rush have a think. Just to increase the efficiency of standard trial division would be a big deal because it's used in the best we've got.

    • @MadComputerScientist1
      @MadComputerScientist1  5 месяцев назад +1

      I think you might not know about the P vs NP problem. If I'm wrong, just ignore the rest of this.
      Tthe P vs NP problem has been unsolved for over 70 years. It's one of the Millennium Problems. I think you might be unfamiliar with it though based on comments. And this is fine, although it is both a math problem and a computer science problem, solving it has more implications for computer scientists than it does for mathematicians.

    • @DavidHodge-z9v
      @DavidHodge-z9v 5 месяцев назад +1

      @@MadComputerScientist1 Thanks. My surname Hodge is one of the other remaining ones lol. 12 years in number theory concentrating on primes anything with crossover I've read up on but thanks.