Number of ways to group digits in {1,2,3,4,5,6,7,8,9} into numbers, while maintaining order

84 Views Asked by At

I have a set of integers from 1 to 9, call it A:

$$A=[1,2,3,4,5,6,7,8,9]$$

How could I find the total number of possible combination of numbers within that set, while maintaining order? For example, a few possibilities would be:

$$[12,34,56,78,9]$$ $$[1,23,45,67,89]$$ $$[123,456,789]$$ $$[12,3456,78,9]$$

I was thinking that each comma (,) could be thought of as either being TRUE or FALSE, and would be $\require{cancel} \cancel{2^9} 2^8 $ total possibilities?

2

There are 2 best solutions below

1
On BEST ANSWER

There are two ways of thinking about this (that I can come up with off the top of my head).

First is what you suggested, except there are $8$ commas to choose from, so you have $2^8$ total possibilities.

Second, the more brute force, way is to sum over the number of commas you use. Once you decide on $i$ commas, you can choose $i$ spots out of $8$ for your commas. So you have $$\sum_{i=0}^8 \binom{8}{i} = 2^8$$ total possibilities.

0
On

You have 8 places for your comma. And think of the comma as being either on or off. so your idea is close...