13,447,595 members (43,589 online)

Email

Password

Sign in with

See more:

suppose module A requires M unit of time be executed , where M is constant .

find the complexit C(n) of the following algorthim , where is size of the input data

The Algorthim :

1- Repeat for I=1 to N

2- Repeat for j=1 to N

3- Repeat for k=1 to N

4- module A

[End step 3 loop]

[End step 2 loop]

[End step 1 loop]

5- exit

(observe that algorthm use N for n)

find the complexit C(n) of the following algorthim , where is size of the input data

The Algorthim :

1- Repeat for I=1 to N

2- Repeat for j=1 to N

3- Repeat for k=1 to N

4- module A

[End step 3 loop]

[End step 2 loop]

[End step 1 loop]

5- exit

(observe that algorthm use N for n)

Comments

so what's the question here? what are you upto with the coding? where you stuck? Please note that we dont work for you.

The answer to this question is so simple that it would be really embarassing to give it away. You haven't even taken to time to get the spelling of the question title right, but expect others to help you.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject,
503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada
+1 416-849-8900 x 100