   Chapter 9.6, Problem 21ES ### Discrete Mathematics With Applicat...

5th Edition
EPP + 1 other
ISBN: 9781337694193

#### Solutions

Chapter
Section ### Discrete Mathematics With Applicat...

5th Edition
EPP + 1 other
ISBN: 9781337694193
Textbook Problem
1 views

# Observe that the number of columns in the trace table for Example 9.6.4 can he expressed as the sum 1 + ( 1 + 2 ) + ( 1 + 2 + 3 ) + ⋯ + ( 1 + 2 + ⋯ + n ) . Explain why this is so, and show how this sum simplifies to the same expression given in the solution of Example 9.6.4. (Hint: A formula from exercise 13 in Section 5.2 will be helpful.)

To determine

To explain the reason for the given sum of expression from the trace table and also explain how does it simplify to the one given in example 9.6.4.

Explanation

Given information:

The following is the trace table given-

Calculation:

Upon observing the trace table carefully it can be found out that the trace table is constructed for the code which have three loops namely i, j and k. Here i is the innermost loop, j is inner loop and k is the outer loop.

It can also be observed that for 1 value of k, j loop runs for n times and for one value of j, i loop runs for n times.

So on the basis of the above table the number of columns can be expressed as the following sum of expression.

1+(1+2)+(1+2+3)+........+(1+2+3+.........+n)

Now let us solve the above sum of expression −

1+(1+2)+(1+2+3)+........+(1+2+3+.........+n)

Here the nth term of the expression is (1+2+3+.........+n) which can be written as

an=(1+2+3+........

### Still sussing out bartleby?

Check out a sample textbook solution.

See a sample solution

#### The Solution to Your Study Problems

Bartleby provides explanations to thousands of textbook problems written by our experts, many with advanced degrees!

Get Started 