Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I have an assignment for an Algorithms class that says to evaluate the following

ID: 3636936 • Letter: I

Question

I have an assignment for an Algorithms class that says to evaluate the following and show all work.

1) log2(32^1000)

Comes out to "infinity" if I code it in Java.
System.out.println(Math.log10(Math.pow(32, 1000))/Math.log10(2));

Is there any way I can evaluate and show work for this? I'm not sure how to answer this problem, properly and it's due tomorrow, so I don't have time to ask the professor. Keep in mind this is an Algorithms class...

2) 4 + 8 + 12 + ... + 4*(199) + 4*(200)
To "show work", I just wrote the "for loop" for it.. but is there a way I can show how to do this by hand? I'm not sure showing how to do it through programming is the way he wanted us to answer it..

Explanation / Answer

1. To evaluate this, we can use properties of logarithms:

The one I'll be using is:

1)log (ab) = b log a

2) logk(k) = 1

So, log2(321000) = 1000 log2(32) [using 1]

= 1000 log2(25)

= 1000*5  log2(2) [using 1]

= 5000*1 [using 2]

= 5000

2. This kind of series is called an Arithmetic Progression (AP)

If the first term is a1, the common difference (difference between 2 successive terms) is d, and the number of terms is n, then the

nth term is given by the formula an = a1 + (n – 1)d

and the sum of the n terms is n/2 * (an + a1)

In our case, a1 = 4, an= 4*200 and n=200 (d is also equal to 4)

So, sum = 200/2*(4+4*200) = 80400

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote