Calculating n with Super-Fast Computing: P1-P4

  • Thread starter blackle
  • Start date
  • Tags
    Computing
P1: n = (4.38×1012 days) / (n days) ≈ 4.38×1012/n P2: n = √(4.38×1012 days) ≈ 2.09×106 P3: n = log2(4.38×1012 days) ≈ 42 P4: n = 2^(4.38×1012 days) ≈ infinity And for part (b), I believe you simply need to take each n and divide by 1,000,000 since the computer is running 1 million times faster. So it would be: P1: n = (4.
  • #1
blackle
8
0
• P1 takes n days to run
• P2 takes n^2 days to run
• P3 takes 2^n days to run
• P4 takes log(n) in base 2 days to run
So, to run P2 on an n of 4 would take 16 days.

a. For each version of the program, calculate the value of n (rounded down) we could compute if we let the program run for 12 billion years , which is (very) roughly how long until the Earth’s sun dies.

b. Let’s say we have access to a computer which runs one million times faster than the one above; so we could compute P1(1) in one millionth of a day. Write out the n we could compute for each of the above algorithms given this new processing power.

The Attempt at a Solution



a) I believe I solved part a) correctly.
P1: n = 12 000 000 000
P2: n = SquareRoot(12 000 000 000)
P3: n = log(12 000 000 000) in base 2
P4: n = 2^12 000 000 000

b) I have been trying to grasp the problem. So what values are we exactly supposed to find?
I understand:
P1: n = 1 took 1 day. but processor is 1 million times faster so takes 1/1000000 days.

What I am confused about is what of P2 are we supposed to calculate?
P2: n = 1 took 1 day. - do we take n to be 1? or we calculate the value of n to run an algorithm for 1/1000000 days like we did in part a)?

Any help would be appreciated. Thanks!
 
Physics news on Phys.org
  • #2
blackle said:
• P1 takes n days to run
• P2 takes n^2 days to run
• P3 takes 2^n days to run
• P4 takes log(n) in base 2 days to run
So, to run P2 on an n of 4 would take 16 days.

a. For each version of the program, calculate the value of n (rounded down) we could compute if we let the program run for 12 billion years , which is (very) roughly how long until the Earth’s sun dies.

b. Let’s say we have access to a computer which runs one million times faster than the one above; so we could compute P1(1) in one millionth of a day. Write out the n we could compute for each of the above algorithms given this new processing power.


The Attempt at a Solution



a) I believe I solved part a) correctly.
P1: n = 12 000 000 000
P2: n = SquareRoot(12 000 000 000)
P3: n = log(12 000 000 000) in base 2
P4: n = 2^12 000 000 000

b) I have been trying to grasp the problem. So what values are we exactly supposed to find?
I understand:
P1: n = 1 took 1 day. but processor is 1 million times faster so takes 1/1000000 days.

What I am confused about is what of P2 are we supposed to calculate?
P2: n = 1 took 1 day. - do we take n to be 1? or we calculate the value of n to run an algorithm for 1/1000000 days like we did in part a)?

Any help would be appreciated. Thanks!
If I understand the problem correctly, if P1 runs for 12,000,000,000 years, n would not be 12,000,000,000 (which is in years); n would be 12,000,000,000 years x 365 days/year. This mistake affects all of your answers.

For the b part, if P1 takes n = 12,000,000,000 x 365 days, then on the faster computer P1 would take 12,000,000,000 x 365 /1,000,000 days, or 12,000 X 365 days. And so on for P2, P3, and P4.
 
  • #3
blackle said:
• P1 takes n days to run
• P2 takes n^2 days to run
• P3 takes 2^n days to run
• P4 takes log(n) in base 2 days to run
So, to run P2 on an n of 4 would take 16 days.

a. For each version of the program, calculate the value of n (rounded down) we could compute if we let the program run for 12 billion years , which is (very) roughly how long until the Earth’s sun dies.

b. Let’s say we have access to a computer which runs one million times faster than the one above; so we could compute P1(1) in one millionth of a day. Write out the n we could compute for each of the above algorithms given this new processing power.


The Attempt at a Solution



a) I believe I solved part a) correctly.
P1: n = 12 000 000 000
P2: n = SquareRoot(12 000 000 000)
P3: n = log(12 000 000 000) in base 2
P4: n = 2^12 000 000 000

b) I have been trying to grasp the problem. So what values are we exactly supposed to find?
I understand:
P1: n = 1 took 1 day. but processor is 1 million times faster so takes 1/1000000 days.

What I am confused about is what of P2 are we supposed to calculate?
P2: n = 1 took 1 day. - do we take n to be 1? or we calculate the value of n to run an algorithm for 1/1000000 days like we did in part a)?

Any help would be appreciated. Thanks!

The problem statement is a bit confusing. For part (a), I take it to mean that:
Algorithm P1 takes n days to calculate n - or maybe n things.
Algorithm P2 takes n2 days to calculate n.
Algorithm P3 takes log2(n) days to calculate n.
Algorithm P4 takes 2n days to calculate n.​

There are on average, about 365.24 days per year, so there are approximately 365.24 (days/year)·12×109years ≈ 4.38×1012 days in 12 billion years.

It looks like you should compute each answer; in other words,
rather than saying that for P2: n = √(4.38×1012),
you should say that for P2: n = 2.09×106,
etc.​

For part (b):

This computer is 1 million times as fast, so Algorithm P1 takes n/1,000,000 days to calculate n - or maybe n things. Equivalently, Algorithm P1 takes n days to calculate n million. You could also think of this as follows: The fast computer can calculate in 12×109years what the slow computer (in part a) would require 12×1015 years to calculate.

The following may be handy for getting some of your results log2(x)=(1/ln(2))·ln(x) or log2(x)=(1/log10(2))·log10(x).

For instance, in part (a), P3 can calculate n = log2(4.38×1012) = (1/log10(2))·log10(4.38×1012) ≈ (3.3219)·[log10(4.38)+log10(1012)] = (3.3219)·[log10(4.38)+ 12]. Notice that log10(10k) = k

FYI: The Earth's sun has only about 5 billion years left - before burning out.
 
  • #4
Thanks everyone for the reply, especially Sammy :)
 
  • #5
Both SammyS and I were confused about what the problem was saying, especially this part: "calculate the value of n (rounded down) we could compute...". If this is the exact wording of the problem, you should probably get clarification on what it means from your instructor.

Computers don't generally compute a number; they perform an operation or a sequence of operations that results in a number.
 

FAQ: Calculating n with Super-Fast Computing: P1-P4

How does super-fast computing help in calculating n?

Super-fast computing uses advanced hardware and software technologies to perform complex calculations at lightning speed. This allows scientists to quickly process large amounts of data and perform simulations that would otherwise take a significant amount of time. By utilizing super-fast computing, scientists can more efficiently calculate n and obtain more accurate results.

What are the main components of super-fast computing?

The main components of super-fast computing include high-performance processors, large amounts of memory, and specialized software such as parallel processing and data compression tools. Additionally, super-fast computing systems often utilize advanced cooling techniques to prevent overheating and maintain optimal performance.

How do scientists determine the appropriate number of processors to use for calculating n?

The number of processors used for calculating n depends on the complexity of the problem and the available resources. Scientists may use performance benchmarks and simulations to determine the optimal number of processors for a given calculation. Additionally, the use of parallel processing techniques can greatly increase the efficiency of multiple processors working together.

Can super-fast computing solve any problem?

While super-fast computing can significantly speed up calculations and simulations, it is not a magic solution that can solve any problem. Some problems may still require a significant amount of time and resources to solve, even with super-fast computing. Additionally, the accuracy of the results also depends on the quality of the data and the algorithms used.

Are there any potential drawbacks to using super-fast computing for calculating n?

One potential drawback of using super-fast computing is the high cost of acquiring and maintaining the necessary hardware and software. Additionally, there may be a learning curve for scientists who are not familiar with the technology. Furthermore, the use of super-fast computing can also create ethical concerns, such as the potential for misuse or the environmental impact of energy consumption.

Similar threads

Replies
4
Views
1K
Replies
3
Views
1K
Replies
53
Views
6K
Replies
2
Views
940
Replies
7
Views
2K
Replies
15
Views
2K
Replies
1
Views
1K
Back
Top