In "Virtuoso," the EMH is adored by his "fans" of a Delta Quadrant planet. One of his fans sends him a subspace message, asking to how many digits he can recite pi.

Since pi is (apparently) an unending decimal, and since the Doctor is essentially a walking computer, could the EMH recite pi indefinitely? Or would he come to a point where he simply could not recite any more digits?

  • 7
    I don't know how you could prove it, but I have to imagine Star Trek era computers can calculate the next digit of pi quicker than they can say it, which is all you really need to do it indefinitely. – Crow T Robot Sep 14 '14 at 17:33
  • Good point. Even if the EMH (or Data, for example), didn't know pi to x amount of digits, they surely could calculate it as they recited! – user30592 Sep 14 '14 at 17:35
  • Knowing π to 10 decimal places is as accurate as anyone would need, unless you were trying to navigate to another galaxy. I postulate that the EMH would probably consult a database for whatever level of decimal points it has available, then ask "How many digits do you want?" before continuing. Personally I use 3 as π for ballpark figures, and 3.14 if I need more accuracy. After that I use a calculator that has a π button. – Howard Miller Jun 13 '16 at 1:16

Obviously his fans are treating him as if he is an organic which has limited memory, calculating ability, or limitations to his energy / waking / regeneration span.

On the other hand, I do not believe that there is a canonical answer as to whether the EMH has access to pure math functions or the ability to write and execute a recursive algorithm. B'elana could easily reprogram him, but we know how "Joe" feels about that.

| improve this answer | |
  • 9
    whether the EMH has access to pure math functions He'd be a terrible doctor if he couldn't calculate dosages for patients. – Crow T Robot Sep 14 '14 at 17:56
  • 2
    There's a difference between calculating mg per kg (a simple calculation) and calculating pi (which requires a subroutine). Since he uses the sick bay computers, PADDs, and consoles for other functions, we can assume that not all functions are programmed in him. – RoboKaren Sep 14 '14 at 18:16

In VOY : Virtuoso, the EMH doctor states that he is well versed in a wide variety of medical practices;

Abarca: When we agreed to be examined by this ship's medical officer, we didn't know that you were a primitive computer matrix.

The Doctor: [irritated] I assure you, there is nothing primitive about me. I am programmed to perform more than five million medical procedures.

Since the ability to calculate π is essential for the study of DNA, the distribution curve of disease profiles, for eye surgery and many other medical functions it seems reasonable to assume that the Doctor would possess the ability to calculate Pi to a very substantial level.

| improve this answer | |
  • 3
    We organics can study DNA, calculate the distribution curve of disease profiles, and perform eye surgery without internally (organically) being able to calculate pi. – RoboKaren Sep 14 '14 at 18:17
  • 1
    You don't see an organic doctor stopping to do so either. – RoboKaren Sep 14 '14 at 18:19
  • 4
    @RoboKaren - Then how do you explain this picture; insurancejournal.com/wp-content/uploads/2013/05/…? – Valorum Sep 14 '14 at 18:25
  • 1
    Check but not mate. That's a picture of a doctor in his office doing insurance payout calculations, not treating patients. We all know that the Federation has single-payer healthcare so it would not apply to Joe the EMH. Your move. – RoboKaren Sep 14 '14 at 20:36
  • 1
    @RoboKaren, further, it's extremely likely that the Doctor simply has some finite approximation of pi stored in his memory as a constant, rather than recalculating it every time it's needed. It's not like the value of pi changes... – Brian S Sep 15 '14 at 14:47

A program that calculates pi must keep track of the position of the digit that it is currently calculating.

Any computer will have a hard limit on how large that number can be. Therefore the number of digits that the EMH can recite isn't indefinite, but could probably go on for trillions of years.

He would probably stop long before he reached this theoretical maximum, as soon as the running program began to noticeably impair his ability to provide medical care.

| improve this answer | |
  • 4
    I'm voting you down for being factually incorrect. There are algorithms for calculating the nth digit of pi without having to calculate preceding digits ( math.hmc.edu/funfacts/ffiles/20010.5.shtml). Thus the only limitation for machine generated digits of pi are mechanical (power supply) rather than computational. – RoboKaren Sep 14 '14 at 22:44
  • 1
    Note that even 512-bytes (which is a trivial amount) can store a bigger number (2^512) than the number of atoms in the universe or milliseconds in a millenia. – RoboKaren Sep 14 '14 at 23:25
  • @RoboKaren The complexity of calculating that digit still increases logarithmically with the position of the digit, which I think is what Kevin means. But, yes, because the complexity is only logarithmic, there is, physically speaking, no upper bound. – Thomas Sep 15 '14 at 1:52
  • @Thomas Are you sure that the growth is logarithmic. The current record is 10 trillion digits using an off-the-shelf computer. It'd be hard to imagine that there's any growth in complexity with the algorithm used. – RoboKaren Sep 15 '14 at 2:03
  • 1
    @RoboKaren A 512-byte quantity can store a maximum value of 2^(8*512) = 2^4096, assuming eight-bit bytes and a one-to-one mapping between value stored and value represented. (Note that in the electronics industry, memory chip sizes are often specified in terms of bits, not bytes!) Storing the number of milliseconds in a millennium (about 3.15e13 if my math is right) requires 45 bits in binary representation. 2^4096 is approximately 1e1233. – a CVn Sep 15 '14 at 8:48

I think the answer lies in the fact that the doctor needs to use the same tools as a medical practitioner.

For instance, consider the tricorders and the computers in sick bay. Starfleet could have built the EMH as a self-contained walking computerized sick bay, but they didn't. Instead the EMH also needs to use tricorders and computers in the same way as any non-holographic medical officer would.

In that vein, I wouldn't expect the EMH to have the ability to calculate pi in his 'head'. At most, we expect the EMH to memorized pi in no more, no less a capacity as any non-holographic medical officer would.

If required, the EMH could simply use a computer to lookup or calculate pi rather than do it himself.

| improve this answer | |
  • "memorized pi in no more, no less a capacity as any non-holographic medical officer would" -- well, probably more. I doubt there are that many practicing doctors who have memorized a large number of the digits of pi, while it would be beyond trivial to code the Doctor with whatever the standard of precision is in the programming language he was developed with. – Brian S Sep 15 '14 at 14:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy