Solved

Math: Number of possible combinations when sorted alphabetically

Posted on 2014-02-03
5
397 Views
Last Modified: 2014-02-03
I have 17 items:
ABCDEFGHIJKLMNOPQ
I am working on a project that combines PDF documents in order, and I need to know how many total options would be possible.

There can be any combination of them, providing each item can only appear in the list once and the results are always in alphabetical order.

For example these would all be valid,
ACB
ACE
BFJ

But these would not be valid:
BBB
BCA

How can the number of options be calculated?
0
Comment
Question by:hankknight
5 Comments
 
LVL 14

Assisted Solution

by:John-Charles-Herzberg
John-Charles-Herzberg earned 20 total points
ID: 39829948
Combinations without repetition (n=17, r=3)

List has 680 entries.
{a,b,c} {a,b,d} {a,b,e} {a,b,f} {a,b,g} {a,b,h} {a,b,i} {a,b,j} {a,b,k} {a,b,l} {a,b,m} {a,b,n} {a,b,o} {a,b,p} {a,b,q} {a,c,d} {a,c,e} {a,c,f} {a,c,g} {a,c,h} {a,c,i} {a,c,j} {a,c,k} {a,c,l} {a,c,m} {a,c,n} {a,c,o} {a,c,p} {a,c,q} {a,d,e} {a,d,f} {a,d,g} {a,d,h} {a,d,i} {a,d,j} {a,d,k} {a,d,l} {a,d,m} {a,d,n} {a,d,o} {a,d,p} {a,d,q} {a,e,f} {a,e,g} {a,e,h} {a,e,i} {a,e,j} {a,e,k} {a,e,l} {a,e,m} {a,e,n} {a,e,o} {a,e,p} {a,e,q} {a,f,g} {a,f,h} {a,f,i} {a,f,j} {a,f,k} {a,f,l} {a,f,m} {a,f,n} {a,f,o} {a,f,p} {a,f,q} {a,g,h} {a,g,i} {a,g,j} {a,g,k} {a,g,l} {a,g,m} {a,g,n} {a,g,o} {a,g,p} {a,g,q} {a,h,i} {a,h,j} {a,h,k} {a,h,l} {a,h,m} {a,h,n} {a,h,o} {a,h,p} {a,h,q} {a,i,j} {a,i,k} {a,i,l} {a,i,m} {a,i,n} {a,i,o} {a,i,p} {a,i,q} {a,j,k} {a,j,l} {a,j,m} {a,j,n} {a,j,o} {a,j,p} {a,j,q} {a,k,l} {a,k,m} {a,k,n} {a,k,o} {a,k,p} {a,k,q} {a,l,m} {a,l,n} {a,l,o} {a,l,p} {a,l,q} {a,m,n} {a,m,o} {a,m,p} {a,m,q} {a,n,o} {a,n,p} {a,n,q} {a,o,p} {a,o,q} {a,p,q} {b,c,d} {b,c,e} {b,c,f} {b,c,g} {b,c,h} {b,c,i} {b,c,j} {b,c,k} {b,c,l} {b,c,m} {b,c,n} {b,c,o} {b,c,p} {b,c,q} {b,d,e} {b,d,f} {b,d,g} {b,d,h} {b,d,i} {b,d,j} {b,d,k} {b,d,l} {b,d,m} {b,d,n} {b,d,o} {b,d,p} {b,d,q} {b,e,f} {b,e,g} {b,e,h} {b,e,i} {b,e,j} {b,e,k} {b,e,l} {b,e,m} {b,e,n} {b,e,o} {b,e,p} {b,e,q} {b,f,g} {b,f,h} {b,f,i} {b,f,j} {b,f,k} {b,f,l} {b,f,m} {b,f,n} {b,f,o} {b,f,p} {b,f,q} {b,g,h} {b,g,i} {b,g,j} {b,g,k} {b,g,l} {b,g,m} {b,g,n} {b,g,o} {b,g,p} {b,g,q} {b,h,i} {b,h,j} {b,h,k} {b,h,l} {b,h,m} {b,h,n} {b,h,o} {b,h,p} {b,h,q} {b,i,j} {b,i,k} {b,i,l} {b,i,m} {b,i,n} {b,i,o} {b,i,p} {b,i,q} {b,j,k} {b,j,l} {b,j,m} {b,j,n} {b,j,o} {b,j,p} {b,j,q} {b,k,l} {b,k,m} {b,k,n} {b,k,o} {b,k,p} {b,k,q} {b,l,m} {b,l,n} {b,l,o} {b,l,p} {b,l,q} {b,m,n} {b,m,o} {b,m,p} {b,m,q} {b,n,o} {b,n,p} {b,n,q} {b,o,p} {b,o,q} {b,p,q} {c,d,e} {c,d,f} {c,d,g} {c,d,h} {c,d,i} {c,d,j} {c,d,k} {c,d,l} {c,d,m} {c,d,n} {c,d,o} {c,d,p} {c,d,q} {c,e,f} {c,e,g} {c,e,h} {c,e,i} {c,e,j} {c,e,k} {c,e,l} {c,e,m} {c,e,n} {c,e,o} {c,e,p} {c,e,q} {c,f,g} {c,f,h} {c,f,i} {c,f,j} {c,f,k} {c,f,l} {c,f,m} {c,f,n} {c,f,o} {c,f,p} {c,f,q} {c,g,h} {c,g,i} {c,g,j} {c,g,k} {c,g,l} {c,g,m} {c,g,n} {c,g,o} {c,g,p} {c,g,q} {c,h,i} {c,h,j} {c,h,k} {c,h,l} {c,h,m} {c,h,n} {c,h,o} {c,h,p} {c,h,q} {c,i,j} {c,i,k} {c,i,l} {c,i,m} {c,i,n} {c,i,o} {c,i,p} {c,i,q} {c,j,k} {c,j,l} {c,j,m} {c,j,n} {c,j,o} {c,j,p} {c,j,q} {c,k,l} {c,k,m} {c,k,n} {c,k,o} {c,k,p} {c,k,q} {c,l,m} {c,l,n} {c,l,o} {c,l,p} {c,l,q} {c,m,n} {c,m,o} {c,m,p} {c,m,q} {c,n,o} {c,n,p} {c,n,q} {c,o,p} {c,o,q} {c,p,q} {d,e,f} {d,e,g} {d,e,h} {d,e,i} {d,e,j} {d,e,k} {d,e,l} {d,e,m} {d,e,n} {d,e,o} {d,e,p} {d,e,q} {d,f,g} {d,f,h} {d,f,i} {d,f,j} {d,f,k} {d,f,l} {d,f,m} {d,f,n} {d,f,o} {d,f,p} {d,f,q} {d,g,h} {d,g,i} {d,g,j} {d,g,k} {d,g,l} {d,g,m} {d,g,n} {d,g,o} {d,g,p} {d,g,q} {d,h,i} {d,h,j} {d,h,k} {d,h,l} {d,h,m} {d,h,n} {d,h,o} {d,h,p} {d,h,q} {d,i,j} {d,i,k} {d,i,l} {d,i,m} {d,i,n} {d,i,o} {d,i,p} {d,i,q} {d,j,k} {d,j,l} {d,j,m} {d,j,n} {d,j,o} {d,j,p} {d,j,q} {d,k,l} {d,k,m} {d,k,n} {d,k,o} {d,k,p} {d,k,q} {d,l,m} {d,l,n} {d,l,o} {d,l,p} {d,l,q} {d,m,n} {d,m,o} {d,m,p} {d,m,q} {d,n,o} {d,n,p} {d,n,q} {d,o,p} {d,o,q} {d,p,q} {e,f,g} {e,f,h} {e,f,i} {e,f,j} {e,f,k} {e,f,l} {e,f,m} {e,f,n} {e,f,o} {e,f,p} {e,f,q} {e,g,h} {e,g,i} {e,g,j} {e,g,k} {e,g,l} {e,g,m} {e,g,n} {e,g,o} {e,g,p} {e,g,q} {e,h,i} {e,h,j} {e,h,k} {e,h,l} {e,h,m} {e,h,n} {e,h,o} {e,h,p} {e,h,q} {e,i,j} {e,i,k} {e,i,l} {e,i,m} {e,i,n} {e,i,o} {e,i,p} {e,i,q} {e,j,k} {e,j,l} {e,j,m} {e,j,n} {e,j,o} {e,j,p} {e,j,q} {e,k,l} {e,k,m} {e,k,n} {e,k,o} {e,k,p} {e,k,q} {e,l,m} {e,l,n} {e,l,o} {e,l,p} {e,l,q} {e,m,n} {e,m,o} {e,m,p} {e,m,q} {e,n,o} {e,n,p} {e,n,q} {e,o,p} {e,o,q} {e,p,q} {f,g,h} {f,g,i} {f,g,j} {f,g,k} {f,g,l} {f,g,m} {f,g,n} {f,g,o} {f,g,p} {f,g,q} {f,h,i} {f,h,j} {f,h,k} {f,h,l} {f,h,m} {f,h,n} {f,h,o} {f,h,p} {f,h,q} {f,i,j} {f,i,k} {f,i,l} {f,i,m} {f,i,n} {f,i,o} {f,i,p} {f,i,q} {f,j,k} {f,j,l} {f,j,m} {f,j,n} {f,j,o} {f,j,p} {f,j,q} {f,k,l} {f,k,m} {f,k,n} {f,k,o} {f,k,p} {f,k,q} {f,l,m} {f,l,n} {f,l,o} {f,l,p} {f,l,q} {f,m,n} {f,m,o} {f,m,p} {f,m,q} {f,n,o} {f,n,p} {f,n,q} {f,o,p} {f,o,q} {f,p,q} {g,h,i} {g,h,j} {g,h,k} {g,h,l} {g,h,m} {g,h,n} {g,h,o} {g,h,p} {g,h,q} {g,i,j} {g,i,k} {g,i,l} {g,i,m} {g,i,n} {g,i,o} {g,i,p} {g,i,q} {g,j,k} {g,j,l} {g,j,m} {g,j,n} {g,j,o} {g,j,p} {g,j,q} {g,k,l} {g,k,m} {g,k,n} {g,k,o} {g,k,p} {g,k,q} {g,l,m} {g,l,n} {g,l,o} {g,l,p} {g,l,q} {g,m,n} {g,m,o} {g,m,p} {g,m,q} {g,n,o} {g,n,p} {g,n,q} {g,o,p} {g,o,q} {g,p,q} {h,i,j} {h,i,k} {h,i,l} {h,i,m} {h,i,n} {h,i,o} {h,i,p} {h,i,q} {h,j,k} {h,j,l} {h,j,m} {h,j,n} {h,j,o} {h,j,p} {h,j,q} {h,k,l} {h,k,m} {h,k,n} {h,k,o} {h,k,p} {h,k,q} {h,l,m} {h,l,n} {h,l,o} {h,l,p} {h,l,q} {h,m,n} {h,m,o} {h,m,p} {h,m,q} {h,n,o} {h,n,p} {h,n,q} {h,o,p} {h,o,q} {h,p,q} {i,j,k} {i,j,l} {i,j,m} {i,j,n} {i,j,o} {i,j,p} {i,j,q} {i,k,l} {i,k,m} {i,k,n} {i,k,o} {i,k,p} {i,k,q} {i,l,m} {i,l,n} {i,l,o} {i,l,p} {i,l,q} {i,m,n} {i,m,o} {i,m,p} {i,m,q} {i,n,o} {i,n,p} {i,n,q} {i,o,p} {i,o,q} {i,p,q} {j,k,l} {j,k,m} {j,k,n} {j,k,o} {j,k,p} {j,k,q} {j,l,m} {j,l,n} {j,l,o} {j,l,p} {j,l,q} {j,m,n} {j,m,o} {j,m,p} {j,m,q} {j,n,o} {j,n,p} {j,n,q} {j,o,p} {j,o,q} {j,p,q} {k,l,m} {k,l,n} {k,l,o} {k,l,p} {k,l,q} {k,m,n} {k,m,o} {k,m,p} {k,m,q} {k,n,o} {k,n,p} {k,n,q} {k,o,p} {k,o,q} {k,p,q} {l,m,n} {l,m,o} {l,m,p} {l,m,q} {l,n,o} {l,n,p} {l,n,q} {l,o,p} {l,o,q} {l,p,q} {m,n,o} {m,n,p} {m,n,q} {m,o,p} {m,o,q} {m,p,q} {n,o,p} {n,o,q} {n,p,q} {o,p,q}

If you need more information.  The calculator can be found at:

Combinations and Permutations Calculator

http://www.mathsisfun.com/combinatorics/combinations-permutations-calculator.html

Thanks
JC
0
 
LVL 84

Assisted Solution

by:ozo
ozo earned 20 total points
ID: 39829985
17!/(17-3)!/3!
0
 
LVL 32

Accepted Solution

by:
phoffric earned 360 total points
ID: 39830000
>> the results are always in alphabetical order.
>> ACB
   Why is this allowed? Shouldn't it be ABC?

If you want options that are larger than 3 (or even 2, or just 1), then the total number of options is 2^17 less 1. To see why, take a binary word that is 17 bits long. If you select ABDE, then that could map to:
11011000000000000

To select all options, you would select all possibilities of 1's and 0's. There are 2^17 such possibilities. One of those possibilities is all 0's which means none are selected. That is why the total number of options is 2^17 less 1.
0
 
LVL 37

Assisted Solution

by:TommySzalapski
TommySzalapski earned 100 total points
ID: 39830004
Are you always selecting three?
If you can select any number, than the total possible combinations is
2^17 (which includes the case where you select none and the one where you select all)
So valid cases
[blank]
A
B
AB
ACDG
GHPQ
ABCDEFGHIJKLMNOPQ
etc

Oops phoffric beat me to the punch.
0
 
LVL 16

Author Comment

by:hankknight
ID: 39830028
Thank you-- 2 to the power of 17 minus one is the answer I was looking for.
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
When there is a disconnect between the intentions of their creator and the recipient, when algorithms go awry, they can have disastrous consequences.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question