1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Nonamiya [84]
3 years ago
10

Give a big-O estimate for the number of operations, where an operation is a comparison or a multiplication, used in this segment

of an algorithm (ignoring comparisons used to test the conditions in the for loops, where a1, a2, ..., an are positive real numbers). m :
Mathematics
1 answer:
kap26 [50]3 years ago
8 0

Answer:

O(n2)

Step-by-step explanation:

the first iteration algorithm of the i-for loop (the outer loop), the j-for loop (the inner loop) will run 2 to

n times which is represented as

(n − 1 times).

the second iteration algorithm of the i-for loop, the j-for loop will run 3 to n times represented as

(n − 2 times).

the third to the last iteration algorithm of the i-for loop, the j-for loop will run n − 1 to n times (2 times).

And the second to the last iteration of the i-for loop, the j-for loop will run from n to n times (1 time)

For the last iteration of the i-for loop, the j-for loop will run 0 times because i + 1 > n.

Now we know that the number of times the loops are run is

1 + 2 + 3 + . . . + (n − 2) + (n − 1) = n(n − 1)/2

So we can express the number of total iterations as n(n − 1)/2.

Since we have two operations per loop (one comparison and one multiplication), we have

2 ·n(n−1)/2 = n

2 − n operations.

So f(n) = n2 − n

f(n) ≤ n2

for n > 1.

Therefore, the algorithm is O(n2) with

C = 1 and k = 1.

You might be interested in
if the variance of the data values in a population is 256, what is the standard deviation of the data values?
kumpel [21]
The standard deviation is the square root of the variance

so if the variance is 256, then the standard deviation is : sqrt 256 = 16 <==
5 0
3 years ago
Evaluate:45/60+12/60-4/60
sdas [7]
Remember to incorporate Bimdas, into you calculation and ensure where the addition and subtraction occur you work from left to right.

3 0
2 years ago
Math answer plz need help with this plz answer
Neporo4naja [7]

Answer:

176.625 sq.ft, 4.8 sq.ft

Step-by-step explanation:

Area of circle=πr^2 or πd^2/4
11. Given,
d=15 ft
Now,
Area=πd^2/4
3.14*15^2/4
176.625 ft^2
Therefore, the area approximation is 176.6 sq.ft
12.
Given,
d=3.5 ft
Now,
Area= πd^2/8
3.14*3.5^2/8
4.8 sq.ft
I got the answer by dividing the area of circle by 2 as semicircle is half of circle.

6 0
2 years ago
What is the image point of (8, 4) after a translation left 2 units and down 4 units?
tino4ka555 [31]

Answer:

(6, 0 )

Step-by-step explanation:

A translation to the left means subtract 2 from the x- coordinate

A translation down means subtract 4 from the y- coordinate

Then

(8, 4 ) → (8 - 2, 4 - 4 ) → (6, 0 )

5 0
2 years ago
Read 2 more answers
What is differnce when there is parentheses around a number being squared?
Svetach [21]
When parentheses are around a number being squared, the output value will always be positive. 

For example: -2² vs (-2)²
-2² means the <em>negative of the square of two</em>, or -4
(-2)² means the <u /><em>square of negative two</em>, or 4

<em />
5 0
3 years ago
Other questions:
  • Please hurry<br> What function is represented in the table?
    10·1 answer
  • Triangle and triangle are similar. What is the measure of side ?
    7·2 answers
  • If 4/5 X a= 2/5, what is a?
    12·2 answers
  • In simplest radical form, what are the solutions to the quadratic equation 0 = –3x2 – 4x + 5
    5·1 answer
  • How do you know if the equation for a problem is multiplication
    10·2 answers
  • Proper subset of {2,4,6}
    10·2 answers
  • (3x^2+3)+(3x^2+x+4)?
    10·2 answers
  • An object is dropped (g = 9.80 m/s ^ 2) and falls for 5.00 s before hitting the ground. How fan has the object fallen
    8·1 answer
  • So i basically have to put true or false, please give me the right answer:
    9·1 answer
  • Can someone help me , with math thanks
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!