Problem 42698. Why the heck are they blinking!?!?
Merry Christmas everyone! Sadly, the lights you've had on your tree for so many years burned out, and it's time to get a new set. Being a skilled (and cheap!) mathematician, you realize that you can estimate the total length of the strings of lights you'll need for your tree with two simple parameters:
- The radius of the base of the tree (in feet)
- The Number of rows of lights you want on your tree, from top to bottom.
The rows of lights are equally spaced vertically around the tree. Given these two variables, calculate how long your string of lights has to be in order to wrap around your tree. You want to buy the minimum possible length of lights, because NOBODY likes having to untangle any more lights than they have to!
Helpful hints - The answers calculated below model the lights on your tree as a two-dimensional Spiral of Archimedes, so the number of rows of lights is equal to the number of times your spiral makes a full 360-degree loop. The final Cartesian coordinate of your spiral should be (width, 0). If someone far smarter than I am wants to make the full three-dimensional version of this problem, knock yourself out!
Solution Stats
Problem Comments
-
8 Comments
Got the same results as Tim. My tree was upside down: γ=2∙π∙n, x(θ)=w/γ∙θ∙cos(θ), y(θ)=w/γ∙θ∙sin(θ), z(θ)=h/γ∙θ, L=∫̥ᵞ √(x’²+y’²+z’²)dθ. Anyway, h→∞≡L→∞, proves that h matters.
I wasn't really sure how to model the z-coordinate as a function of height. I had a hunch it would be the case, but I couldn't actually figure out how to do it. Thanks to the smart people in the thread for coming up with the equations for it!
The problem description should mention that the spiral starts at (0,0).
Solution Comments
Show commentsGroup

Advent of Code
- 25 Problems
- 5 Finishers
- Calculate days until Christmas
- How many Christmas presents under the tree?
- Snow Accumulation and Structural Risks To Residential Properties
- Scrabble Scores
- The twelve days of Christmas
- Calculate Wind Chill Factor
- Air Mass to Star for an Observer at Mean Sea Level
- Determine when snow started
- Mechanical Advantage of a Gear Train
- Similar Triangles - find the height of the tree
- Sleeping Queens 1
- Solve the Sudoku Row
- Fractal: area and perimeter of Koch snowflake
- Calculate Amount of Cake Frosting
- The cake is a lie...
- You LOVES Matlab 41%
- Minkowski distance
- Where the Four Corners Am I?
- Most Frequent Word - 01
- Design a tubesheet for shell-and-tube heat exchangers
- Lights Out 1 - 5x5, 3 moves
- Why the heck are they blinking!?!?
- Calculate the Distance to Source of Lightning
- Radiation Heat Transfer — View Factors (1)
- How many days?!?
Problem Recent Solvers28
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!