Jump to content

finding general formula


mpsn

Recommended Posts

Hi, for my assignment, I need to figure out how many possible paths through a bubblesort,

 

Let n be the size of the array

 

so my results are:

if n = 0, 2^0 paths

if n = 1, 2^1 paths

if n = 2, 2^3 paths

if n = 3, 2^6 paths

if n = 4, 2^10 paths

 

so I need to figure out a summation/product notation formula for the exponent, for a given size n so I mean 2^(some formula involving summation or multiplication notation)

 

Any help appreciated

Link to comment
Share on other sites

Wait, actually I need to have a summation and/or product notation used, b/c yours is simply:

 

2^[n(n+1)/2], but I need 2^(summation from start to n for some formula) for instance.

 

The n(n+1)/2 is the value for the sum of numbers from 1 to n, so you're just looking for:

 

gif.latex?\LARGE%202^{\sum_{i=1}^{n}i}

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.