Open Side Menu Go to the Top
Register
What's the minimum number of switches, and in what orientation? What's the minimum number of switches, and in what orientation?

09-27-2020 , 12:00 AM
We have an unknown number of on/off switches. If at least one of the switches is off, the system is 'off.' It all the switches are on, the system is on. If all the switches are off, the system is off.

Each individual switch can be set to automatically turn off or on, and can be timed in half hour time chunks. (There is an 'on' time setting and an 'off' time setting, only 1 on setting and one off setting time per switch per 24 hours.) Each switch has to be off or on for a minimum of a half hour per 24 hours.

Ex: i can set my on time to 11am and my off time to 11pm for a 12on/12off cycle, or at the extremes set my on time for 11am and off time to 1130am for a minimum 30 minute on setting per 24hrs, or vice versa, or any setting in between.

How many switches do we need to have an on 6hrs/off 2hrs cycle and in what orientation? What mathematics can we use to determine this? I considered a truth table, let me know if there is a better method.

EDIT: I already know the answer, I'm curious about the underlying mathematics.

Last edited by Wittgenheiny; 09-27-2020 at 12:18 AM.
What's the minimum number of switches, and in what orientation? Quote
09-27-2020 , 07:20 AM
"How many switches do we need to have an on 6hrs/off 2hrs cycle and in what orientation? What mathematics can we use to determine this? I considered a truth table, let me know if there is a better method."


I don't understand the question.


PairTheBoard
What's the minimum number of switches, and in what orientation? Quote
09-27-2020 , 08:32 AM
a diagram might help
What's the minimum number of switches, and in what orientation? Quote
09-27-2020 , 09:55 AM
++++++--++++++--++++++--
What's the minimum number of switches, and in what orientation? Quote
09-27-2020 , 06:53 PM
Sorry if I didn't word it properly.

The correct answer is:

Switch 1:
++++++--++++++++++++++++
Switch 2:
++++++++++++++--++++++++
Switch 3:
++++++++++++++++++++++--

You can see all the switches are on for 6 hours, with at least one off every 6 hours for 2 hours. So the minimum solution is 3 switches in this orientation.

What I'm asking about is the underlying math behind this, what is it? How do we solve more complicated problems? Which problems have no solutions (obviously anything less than a 30 minutes cycle is unsolvable)? Is every half hour interval do-able?

For example, let's say we want the on-off to follow a 30min-on, 2hr-off, 6hr-on, 12hr off, 3hr-on, 30min-off cycle. How do we solve a problem like this, mathematically?

Last edited by Wittgenheiny; 09-27-2020 at 07:00 PM.
What's the minimum number of switches, and in what orientation? Quote
09-27-2020 , 07:30 PM
You have a linear order, sets which are either intervals or complements or intervals, and want to know which subsets are intersections of such sets.
What's the minimum number of switches, and in what orientation? Quote
09-27-2020 , 07:40 PM
Quote:
Originally Posted by lastcardcharlie
You have a linear order, sets which are either intervals or complements or intervals, and want to know which subsets are intersections of such sets.
Ok thanks, this answers my question.
What's the minimum number of switches, and in what orientation? Quote
09-27-2020 , 07:47 PM
Actually, it's unclear which intervals you are allowing. If:

++++++--++++++++++++++++

is allowed, is:

------++----------------

also allowed?
What's the minimum number of switches, and in what orientation? Quote
09-27-2020 , 10:17 PM
Quote:
Originally Posted by lastcardcharlie
Actually, it's unclear which intervals you are allowing. If:

++++++--++++++++++++++++

is allowed, is:

------++----------------

also allowed?
Yes. Every switch must switch from on to off once and off to on once every 24 hours, and only once. They can be timed for a minimum 30 minute interval (on or off for 30 minutes minimum) up to a maximum 23.5 hrs.
What's the minimum number of switches, and in what orientation? Quote
10-02-2020 , 06:27 PM
Quote:
Originally Posted by Wittgenheiny
We have an unknown number of on/off switches. If at least one of the switches is off, the system is 'off.' It all the switches are on, the system is on. If all the switches are off, the system is off.

.
Could stop you right here and presuppose that the system is composed of a single on/off switch.
What's the minimum number of switches, and in what orientation? Quote
10-06-2020 , 06:59 PM
It seems like the simplest way to view this is to consider all switches to have a default state of on that can be toggled for once for some amount of time during a 24 hour period. Because we assume all switches are on by default and we only need to change a single switch state from on to off to change the entire system state, the solution is simply that we need as many switches as there are periods that the system should be off. The amount of time the system needs to be on/off for is irrelevant for determining the required number of switches, the only thing that matters is the number of times the state changes. Therefore in the example in the OP the system is off 3 times during the 24 hour period so 3 switches are needed.

There is some logic involved in parsing the problem but that logic is the only particularly interesting aspect. Once the problem has been understood I don't think there is any mathematics required beyond counting.
What's the minimum number of switches, and in what orientation? Quote

      
m