maths.free › Combinatorics & Graph Theory › Strings, Sets, and Binomial Coefficients › Discussion

Discussion

Over coffee, Xing said that he had been experimenting with the SageMath software discussed in . He understood that SageMath was treating a big integer as a string.

Discussion

Over coffee, Xing said that he had been experimenting with the SageMath software discussed in . He understood that SageMath was treating a big integer as a string. Xing enthusiastically reported that he had asked SageMath to find the sum \(a+b\) of two large integers \(a\) and \(b\), each having more than \(800\) digits. The software found the answer about as fast as he could hit the enter key on his netbook. That's not so impressive, Alice interjected. A human, even Bob, could do this in a couple of minutes using pencil and paper.

Thanks for your kind remarks, replied Bob, with the rest of the group noting that that Alice was being pretty harsh on Bob and not for any good reason.

Dave took up Bob's case by remarking, Very few humans, not even you Alice, would want to tackle finding the product of \(a\) and \(b\) by hand. Xing jumped back in with, That's the point. Even a tiny netbook can find the product very, very quickly. In fact, I tried it out with two integers, each having more than one thousand digits. It found the product in about one second. Ever the skeptic, Zori said, You mean you carefully typed in two integers of that size? Xing quickly replied Of course not. I just copied and pasted the data from one source to another. Yolanda said, What a neat trick that is. Really cuts down the chance of an error.

Dave said What about factoring? Can your netbook with its fancy software for strings factor big integers? Xing said that he would try some sample problems and report back. Carlos said Factoring an integer with several hundred digits is likely to be very challenging, not only for a netbook, but also for a super computer. For example, suppose the given integer was either a prime or the product of two large primes. Detecting which of these two statements holds could be very difficult.

Undeterred, Dave continued, What about exponentiation? Can your software calculate \(a^b\) when \(a\) and \(b\) are large integers? Xing said That shouldn't be a problem. After all, \(a^b\) is just multiplying \(a\) times itself a total of \(b\) times, and if you can do multiplication quickly, that's just a loop. Yolanda said that the way Xing was describing things, he was actually talking about a program with nested loops so it might take a long time for such a program to halt. Carlos was quiet but he thought there might be ways to speed up such computations.

By this time, Alice reinserted herself into the conversation: Hey guys. While you were talking, I was looking for big integer topics on the web and found this problem. Is \(838200020310007224300\) a Catalan number? How would you answer this? Do you have to use special software?

Condensed: the full section is in Keller & Trotter, Applied Combinatorics.

Jetzt du Kein Rechner löst diese Frage, aber ihre Teile sind berechenbar. Probieren Sie unten eine aus oder geben Sie Ihre eigene ein.

Behalten Sie Ihre eigenen Lösungswege

Ein kostenloses Konto fügt Notizen zu jeder Lektion, eine Aufzeichnung von dem, was Sie beendet haben, Ihre gelösten Probleme an einem Ort, und ein Tutor können Sie über diese Seite fragen. Die Mathematik selbst ist offen für alle, angemeldet oder nicht.

Registrieren Anmelden

Hier verwendete Symbole

Tippen Sie auf jedes Symbol für die vollständige Definition, ein Bild und was jeder Buchstabe darin bedeutet.

Fragen, die die Leute stellen

Permutation or combination?

Ask whether order matters. A lock code is a permutation (order matters); a hand of cards is a combination (it does not).

What is a graph in this sense?

Dots (vertices) joined by lines (edges), not a plot. Road maps, social networks and molecules are graphs; questions like "is there a route" and "how few colours" are graph theory.

Teile dieser Seite sind adaptiert aus Keller & Trotter, Applied Combinatorics (CC BY-SA 4.0). Hier gekürzt und neu erklärt; Fehler gehen auf uns.

Mehr in Combinatorics & Graph Theory