Question
please derive a closed formula of f(n) and please dont answer this question if you are not sure. because this is the second time I’m posting this question
Censiden MATRIX-eHAIN m p.kngth a ore 11 n 0 1 ton-t 1 and
0 0
Add a comment Improve this question Transcribed image text
Answer #1

The innermost loop with variable k, for a particular value of l , evaluates from i to  j-1 where i range from 1 to  n-l+1 and j=i+l-1 .

Thus for a particular value of i say i = m, j=m+l-1 , innermost loop will run for j-1-i+1 = j-i = i+l-1 - i = l-1 iterations.

And since i range from 1 to  n-l+1 and for each value of i , the value of j is such that, innermost loop with variable k run for l-1 iterations.

Since there are n-l+1 possible values of i in the range   1 to  n-l+1 and hence number of times innermost loop will execute for a particular value of l will be (n-l+1)(l-1) .

Since the value of l range from 2 to n,

Hence number of times, innermost loop with variable k will execute will be

\sum_{l=2}^{n}(n-l+1)(l-1) = \sum_{x=1}^{n-1}(n-x)x \text{. where }x=l-1

\sum_{x=1}^{n-1}nx- \sum_{x=1}^{n-1}x^2 = n(n(n-1)/2)-n(n-1)(2n-1)/6 \\=n(n-1)(n+1)/6 = n(n^2-1)/6

Please comment for any clarification.

Add a comment
Know the answer?
Add Answer to:
please derive a closed formula of f(n) and please dont answer this question if you are...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • please help answer all the question and dont skip. Thank you! 1. Sketch the pole-zero diagram...

    please help answer all the question and dont skip. Thank you! 1. Sketch the pole-zero diagram for the following transfer function. Ensure you label the axes and the pole-zero locations. Assume a > b > 0. TF(s) = (s + a) s(s+b) 2. If the time constant of the lowest frequency pole in a system is 1 second, after approx- imately what period of time following turn-on could the system be considered to be in steady-state conditions? 3. The PID...

  • Let S(n) = f(1) + f(2) + ... + f(n). For each f(n) below, derive the...

    Let S(n) = f(1) + f(2) + ... + f(n). For each f(n) below, derive the answer to the question S(n) = Simplify your answer as much as you can. (?). (i) f(n) = n log n

  • This is for criminology in ethics. If you dont know the answer then please dont answer...

    This is for criminology in ethics. If you dont know the answer then please dont answer it. I want this accuratelty and correctly. If you know the answer, please provide why it is. If not then just dont answer it. ITS A T/F QUESTIONS ·         6.   We can upgrade the quality of our reasoning when we understand the intellectual processes that underlie reasoning. 7.   Regarding Critical Thinking, Depth refers to relating to the matter at hand whereas Breadth refers to containing complexities...

  • Please dont answer if your not going to explain, I will need to repost and waste...

    Please dont answer if your not going to explain, I will need to repost and waste a question. Use the same circuit diagram: completely uncharged, In that circuit, emf = 1.2 KV, C = 6.5 pF, R = R = R' = 0.73 MO2. With switch S is closed (at t = 0). At t = 0, what are a. Currenti, in resistor ? b. Current iz in resistor ra? c. Current in resistors? Att (that is after many time...

  • Answer the question (10 marks). PLEASE be detailed in your solution (d) After having been closed...

    Answer the question (10 marks). PLEASE be detailed in your solution (d) After having been closed for a long time, the switch in the circuit below is opened att-0. Draw an s-domain equivalent of the circuit for f>0. t=0 12 mA (

  • Equivalent forces derivation problem! Help please!!! I dont know why im getting it wrong, will vote...

    Equivalent forces derivation problem! Help please!!! I dont know why im getting it wrong, will vote for helpfulness! Equivalent forces derivation problem. Derive the formula for F_3 in terms of the experimentally measured quantities m_1, m_2, theta_1, and theta_2 [Answer: F_3 = m_1 gcostheta_1 + m_2gcostheta_2.] Make sure you understand how this formula was derived. If the mass of both weights is 200 gm, the first mass is located 40 degree north of east, the second mass is located 40...

  • Please answer this question 1. Suppose that A is an m x n matrix and B...

    Please answer this question 1. Suppose that A is an m x n matrix and B is an n xm matrix such that ABis a non singular matrix. Find the null space of B and show that C(B) N (A) = 0.

  • SIGNALS AND CONVULTION QUESTION... PLEASE DONT TOUCH IF YOU ARE NOT SURE ABOUT SOLUTION... First; draw...

    SIGNALS AND CONVULTION QUESTION... PLEASE DONT TOUCH IF YOU ARE NOT SURE ABOUT SOLUTION... First; draw x and h signals… For ?(?) = ?(?) ∗ ℎ(?) convulsion Write the mathematical expressions of the ? (?) response. x(t) = (1 – t). [u(t) - ut - 1)] h(t) = t. [u(t+ 2) u(t - 2)]

  • please dont answer if you dont know how to do it, Thanks! 2. 1.2 to Use...

    please dont answer if you dont know how to do it, Thanks! 2. 1.2 to Use the binomial formule (a+b)"= a trab+r(r=0) -267... approximate (28)' = (27+1) 1

  • linear alg please answer all of 4, if you dont want to answer 2 4. Let...

    linear alg please answer all of 4, if you dont want to answer 2 4. Let T: R4 + R3 be the transformation T(7) = A7 where A is the following matrix: . 1 1 0 1 A=-2 4 2 2 -1 8 3 5 (a) Find a basis for the range of T and its dimension. (b) The preimage of 7 is the set of all 7 € R4 such that T(T) = 7. Explain how the preimage of...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT