Answer:
f(N) = 2+ N/2 + 6N² units of time.
Step-by-step explanation:
Assigning 0 to the variable sum takes one unit of time.
Each time you increment sum by B, you need to call the value of sum, sum it to B and assign it to sum, which takes three units of time in total. You are repeating this process for each value of B which ranges from 1 to 4n and for each value of A which ranges from 1 to n/2. Opening the FOR takes also another unit of time, so, as a result, we have
f(N) 1 + 1 (open the FOR in A)+ N/2*(1 (open the FOR in B) + 4N*3) = 2+ N/2 + 6N² units of time. It has order complexity O(N²).
Very simple. You just use the vectors as normal numbers, and multiply the coordinates with 2 and 4 like this:
2*u = 2* (2,4) = (4,8)
4*w = 4* (-1,3) = (-4,12)
(4,8) - (-4,12) = (8,-4)
So the vector has the coordinates (8,-4)
Answer:
c=80
Step-by-step explanation:
Based on my reading the critical damping occurs when the discriminant of the quadratic characteristic equation is 0.
So let's see that characteristic equation:
20r^2+cr+80=0
The discriminant can be found by calculating b^2-4aC of ar^2+br+C=0.
a=20
b=c
C=80
c^2-4(20)(80)
We want this to be 0.
c^2-4(20)(80)=0
Simplify:
c^2-6400=0
Add 6400 on both sides:
c^2=6400
Take square root of both sides:
c=80 or c=-80
Based on further reading damping equations in form
ay′′+by′+Cy=0
should have positive coefficients with b also having the possibility of being zero.