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

HELLO, This a theory questions in (( C )) programming NOT C++ >> I said that b/c

ID: 3639562 • Letter: H

Question

HELLO,

This a theory questions in (( C )) programming NOT C++ >> I said that b/c some one answer my questions using C++ :) and my instructor didn't accept the homework :(
------------------------------------------------------------------------------------------------------
PLZ I want a detailed answer :) If u don't mind

Theory Questions:

1. Suppose we have determined that this loop is where our algorithm does
the most work:
for(int i = 0; i < N; ++i)
for(int j = 0; j < N; ++j)
for(int k = 0; k < N ++k)
a[i][j] = b[i][j] *b[i][k];
How would we express the running time in Big Oh notation?

2. You are given the information that the running time of one algorithm
is proportional to N log N and the running time of another algorithm is
proportional to N3. What does that statement imply about the relative
performance of the algorithms?

3. For what values of N is 10N log N > 2N2 ?

Explanation / Answer

a) Running time will be O(n^3) b) that the algorithm with running time proportional to N log N is faster than the other algorithm. The relative speed increases with increase in value of N c) 100