1

Is their a formula to calculate the combination of two patterns?: Lets say I have rows of lightbulbs, a pattern representes the space between two turned-on lightbulbs. Easier to explain with an example:

Pattern 1: 4, 3
Pattern 2: 3

The meaning of the patterns:

lightbulb on: |
lightbulb off: -

Pattern 1: |---|--|---|--|---|--|---|--|---|--|---|--|---|--|---|--|---|--| Pattern 2: |--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|--|

Combined : |-----------------|--|-----------------|--|-----------------|--| New Combined Pattern: 18, 3

  • 1
    Well, for starters... if the sum of the spacings in the first pattern is $a$ and the sum of the spacings in the second pattern is $b$, then you only need to consider the first $\text{lcm}(a,b)$ positions since it will repeat. As for specifically what happens within that range... well... that would depend largely on what specific patterns you have. – JMoravitz Nov 29 '22 at 22:03
  • @JMoravitz Isn't there a formula to find the combined positions within 'that' range? – Sean Griffin Nov 29 '22 at 22:08
  • 1
    Multiple repeated applications of chinese remainder theorem? Doesn't really seem worth it to me – JMoravitz Nov 29 '22 at 22:09

0 Answers0