Skip to main content
\(\newcommand{\set}[1]{\{1,2,\dotsc,#1\,\}} \newcommand{\ints}{\mathbb{Z}} \newcommand{\posints}{\mathbb{N}} \newcommand{\rats}{\mathbb{Q}} \newcommand{\reals}{\mathbb{R}} \newcommand{\complexes}{\mathbb{C}} \newcommand{\twospace}{\mathbb{R}^2} \newcommand{\threepace}{\mathbb{R}^3} \newcommand{\dspace}{\mathbb{R}^d} \newcommand{\nni}{\mathbb{N}_0} \newcommand{\nonnegints}{\mathbb{N}_0} \newcommand{\dom}{\operatorname{dom}} \newcommand{\ran}{\operatorname{ran}} \newcommand{\prob}{\operatorname{prob}} \newcommand{\Prob}{\operatorname{Prob}} \newcommand{\height}{\operatorname{height}} \newcommand{\width}{\operatorname{width}} \newcommand{\length}{\operatorname{length}} \newcommand{\crit}{\operatorname{crit}} \newcommand{\inc}{\operatorname{inc}} \newcommand{\HP}{\mathbf{H_P}} \newcommand{\HCP}{\mathbf{H^c_P}} \newcommand{\GP}{\mathbf{G_P}} \newcommand{\GQ}{\mathbf{G_Q}} \newcommand{\AG}{\mathbf{A_G}} \newcommand{\GCP}{\mathbf{G^c_P}} \newcommand{\PXP}{\mathbf{P}=(X,P)} \newcommand{\QYQ}{\mathbf{Q}=(Y,Q)} \newcommand{\GVE}{\mathbf{G}=(V,E)} \newcommand{\HWF}{\mathbf{H}=(W,F)} \newcommand{\bfC}{\mathbf{C}} \newcommand{\bfG}{\mathbf{G}} \newcommand{\bfH}{\mathbf{H}} \newcommand{\bfF}{\mathbf{F}} \newcommand{\bfI}{\mathbf{I}} \newcommand{\bfK}{\mathbf{K}} \newcommand{\bfP}{\mathbf{P}} \newcommand{\bfQ}{\mathbf{Q}} \newcommand{\bfR}{\mathbf{R}} \newcommand{\bfS}{\mathbf{S}} \newcommand{\bfT}{\mathbf{T}} \newcommand{\bfNP}{\mathbf{NP}} \newcommand{\bftwo}{\mathbf{2}} \newcommand{\cgA}{\mathcal{A}} \newcommand{\cgB}{\mathcal{B}} \newcommand{\cgC}{\mathcal{C}} \newcommand{\cgD}{\mathcal{D}} \newcommand{\cgE}{\mathcal{E}} \newcommand{\cgF}{\mathcal{F}} \newcommand{\cgG}{\mathcal{G}} \newcommand{\cgM}{\mathcal{M}} \newcommand{\cgN}{\mathcal{N}} \newcommand{\cgP}{\mathcal{P}} \newcommand{\cgR}{\mathcal{R}} \newcommand{\cgS}{\mathcal{S}} \newcommand{\bfn}{\mathbf{n}} \newcommand{\bfm}{\mathbf{m}} \newcommand{\bfk}{\mathbf{k}} \newcommand{\bfs}{\mathbf{s}} \newcommand{\bijection}{\xrightarrow[\text{onto}]{\text{$1$--$1$}}} \newcommand{\injection}{\xrightarrow[]{\text{$1$--$1$}}} \newcommand{\surjection}{\xrightarrow[\text{onto}]{}} \newcommand{\nin}{\not\in} \newcommand{\prufer}{\mbox{prüfer}} \DeclareMathOperator{\fix}{fix} \DeclareMathOperator{\stab}{stab} \DeclareMathOperator{\var}{var} \newcommand{\inv}{^{-1}} \newcommand{\lt}{<} \newcommand{\gt}{>} \newcommand{\amp}{&} \)

Section2.8Discussion

Over coffee, Xing said that he had been experimenting with the SageMath software discussed in Chapter 1. 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\text{,}\) 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?”

Zori was not happy. She gloomily envisioned a future job hunt in which she was compelled to use big integer arithmetic as a job skill. Arrgghh.