Results 1 to 2 of 2

Math Help - How to calculate an index into a binomial coefficient table from the base indexes

  1. #1
    Newbie
    Joined
    Apr 2011
    Posts
    2

    How to calculate an index into a binomial coefficient table from the base indexes

    The binomial coefficient formula is defined as:

    Total Number Of Unique Combinations = N! / ( K! (N - K)! )

    where N is defined as the total number of values and K is the grouping number.

    The following is a simple table that is bound by the binomial coefficient where N is 6 and K is 4:

    1234 1235 1236 1245 1246
    1256 1345 1346 1356 1456
    2345 2346 2356 2456 3456

    What I am trying to figure out, is if there is a formula that can be used to calculate an index to a table entry based upon that number. So, for example, if the number is 1245, then the formula should return the value 4 because it is the 4th entry in the table above. Another example is for 1356, the formula should return 9 since it is the 9th entry in the table.

    Does anyone know of a formula, or can come up with a formula to calculate this?

    I am writing a class that will be using N and K as inputs. I have come up with a way to do this by iterating through all of the possibilities and storing values into an index tables, but before publishing this technique I thought I would try to find a better way with a mathematical formula.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Newbie
    Joined
    Apr 2011
    Posts
    2

    Re: How to calculate an index into a binomial coefficient table from the base indexes

    Since no one was able to answer my question, I decided to look into it and came up with a nice efficient solution that does not use much memory which has just been posted to my blog. The solution includes a download file that contains 2 C# projects that implement a generic C# class that manages a table of any type of objects along with translation functions that convert between the underlying indexes and the position of the object within the table as well as the reverse function that converts between the position of the item within the table to yield the underlying indexes. The other project tests out the code which shows how to use the class as well as proves that it works correctly. See:

    Tablizing The Binomial Coefficient | Just another WordPress.com site
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Index form with a prime number base?
    Posted in the Algebra Forum
    Replies: 4
    Last Post: July 20th 2010, 04:17 PM
  2. Calculate the correlation coefficient of the following table
    Posted in the Advanced Statistics Forum
    Replies: 7
    Last Post: December 26th 2009, 07:18 AM
  3. How to calculate Index?
    Posted in the Statistics Forum
    Replies: 0
    Last Post: December 10th 2009, 02:21 AM
  4. Formula to calculate indexes from row and column
    Posted in the Discrete Math Forum
    Replies: 1
    Last Post: February 18th 2008, 06:53 AM
  5. statistics index table
    Posted in the Advanced Statistics Forum
    Replies: 2
    Last Post: June 22nd 2005, 10:06 AM

Search Tags


/mathhelpforum @mathhelpforum