# Combinations

#### julianb

##### New member
Hi

I work fo an Audio Visual company and we install TV Screens into meeting rooms

Quite often there is an automated touch screen that lets you turn the screen on and set the correct input for your laptop . All very simple

Sometimes we install screens into meeting rooms that have removable rooms so you can make one big room out of two adjacent rooms . The control panel detects that the wall has been removed and then control both screens and increases the amount of inputs available in the new room state

The same thing happens for a three way divisible meeting room . Two partition walls can be removed to make one big room with 3 screens or alternately two rooms can be joined leaving one spare
These are the combinations for this room :-

Rooms 1,2,3 separate
Rooms 1,2 joined and 3 seperate
Rooms 2, 3 joined and 1 seperate
Rooms 1,3 joined and 2 seperate ( a virtual state but sometimes requested by clients )

My question is , is there a formula that i can use to work out the room states ?
We have a 6 and an 8 way room to setup soon how many different room combinations exist ? Would be good to understand the maths behind this

#### Dr.Peterson

##### Elite Member
I think it may depend on the details of the configuration, so you may not be able to describe it with only a couple variables, and therefore no formula would work in general.

For example, if I suppose that "6-way room" means a room that can be divided into 6 parts, I can envision it as 6 in a row (abcdef), or as a 2 by 3 rectangle (abc/def). In the former case, one configuration would be a/b/cd/e/f; in the latter, cd can't be joined, but something like ad/be/cf would be possible. Another example would abce/d/f, as three rooms. (Draw it out to see what I mean, unless I've got the whole idea wrong.)

But in fact, this would be just a matter of which dividers are opened, which is easy, and would depend not on the number of rooms, but the number of dividers. With m dividers, there are 2^m ways to open some and close others. For 3 rooms in a row, there are 2 dividers, giving 2^2 = 4 possibilities (the last one being 1, 2, and 3 separate).

But I just noticed that you allow 1 and 3 to be considered a single "room"; so are there no contiguity conditions based on the geometry? In that case, it doesn't really even depend on which dividers are opened. You could in principle leave all dividers closed and still have all possible combinations! Am I right?

If so, then you are asking "merely" for the number of ways to put n objects into any number of baskets, that is, partitioning a set into arbitrary subsets. Unfortunately, such partitioning leads to complicated formulas or algorithms. Here, if I'm thinking right, we want to partition n distinguishable rooms into any number of indistinguishable subsets, and the number you want would be the Bell number B_n. The first example there under Set Partitions is your three-room case.

#### julianb

##### New member

Maybe if i explain this a different way

I am selling ice-creams at a fair and on my stall i have 6 ice-creams

There is a queue of people and the first person comes up and takes 2 ice creams . That means the next person now has a choice of buying all 4 remaining or buying 3 or 2 or 1 ... Depending on the previous choice this limits the choices of the subsequent customer

Again i have 6 ice-creams and the first person comes up and buys 5 therefore the next person only has the 1 choice

Am i making any sense here

Kind regards

#### Dr.Peterson

##### Elite Member
Are you sure this is equivalent to your problem? It's easy to make mistakes in remodeling a combinatoric problem.

What you appear to be saying is that the 6 rooms are all in a row, and only consecutive rooms can be joined -- eliminating the possibility you mentioned that non-adjacent rooms can be virtually joined.

Assuming you are right, we have 6 rooms, * * * * * *.
If the first 2 rooms are joined, then the next 1 is alone, then the last 3 are joined, we can model it as * *|*|* * *.

In this case, my model of closing a subset of the 5 dividers would be correct; the number of possibilities would be 2^5 = 32, because we can choose any or all of them to be closed, giving 2 choices for each of 5 dividers.

That same model works even if the rooms are not in a row, as long as you count the dividers, not the rooms. For example, this arrangement,
* * *​
* * *​
would have 7 dividers, and 2^7 = 128 ways to combine them.

#### julianb

##### New member
Thats why i love Maths. Bell numbers are exactly correct . The example below is exactly how we setup our control code for 3 rooms and all room states are made available on the various room systems like lighting control and heating control , sound and vision systems

For example, the set {1, 2, 3} can be partitioned in the following ways:

• {{1}, {2}, {3}}
• {{1, 2}, {3}}
• {{1, 3}, {2}}
• {{1}, {2, 3}}
• {{1, 2, 3}}.

I stated earlier that on larger rooms with more room dividers that virtual states could be used , again Bell numbers take this into account. with a 4 way room having 15 possible states and a 5 way room having 52

Is there a way to only work out states where rooms are adjacent , as in the real world this is usually all that's required in said spaces

#### Dr.Peterson

##### Elite Member
When you only allow adjacent rooms to be combined, I think my model of counting states of the dividers (in my last message) is the way to go. This gives 2^n, where n is the number of dividers.

#### julianb

##### New member
Ah yes , sorry need to learn to read too

Could you try and explain how the Bell number sequence is derived , Is there a way of predicting what a certain state will be in the sequence

For example the 4th state here is
• {{1}, {2, 3}}
taken from the following list
• {{1}, {2}, {3}}
• {{1, 2}, {3}}
• {{1, 3}, {2}}
• {{1}, {2, 3}}
• {{1, 2, 3}}.
Is this possible as all ststes are unique and i guess dont have to fall into a sequence at all

Regards

#### Dr.Peterson

##### Elite Member
I'm not sure what you're asking. Are you assuming there is a specific order to the partitions in your list? Bell numbers themselves form a sequence, but the sets of partitions that they count are not themselves sequences with a particular order. But I don't know why that would matter, anyway.

In any case, I'm not at all expert in Bell numbers. I'm mostly just aware of them. The reference I gave will tell you more than I know, including how the recurrence for them is derived.

#### pka

##### Elite Member
Ah yes , sorry need to learn to read too
Could you try and explain how the Bell number sequence is derived , Is there a way of predicting what a certain state will be in the sequence
Here is a presentation file I wrote some fifteen to twenty years ago.

#### Attachments

• 24.1 KB Views: 12