# Thread: Theta Notation for Algorithm

1. ## Theta Notation for Algorithm

thankyou

Find a theta notation for the following algorithm. Carefully justify your answer.

for i:=1 to n do
for j:=1 to (floor)[n/3](floor) do
x:=x+1

Find a theta notation for the following algirothm
j:=n
while (j>=n) do
begin
for i= to j do
x=x+1
j=(floor)[j/3](floor)
end

2. ## Find Theta Notation

Can Anybody tell how many times line 3 will executed?
I want find theta notation.

1 for i:=1 to n do
2 for j:=1 to (floor)[n/3](floor) do
3 x:=x+1