Algorithms For Present Wrapping
Written by Lucy Black   
Tuesday, 22 December 2015

How do you wrap yours? If you are a programmer, or I suppose a mathematician, you might just follow an algorithm. Here's a video that shows you how to wrap different shapes for that perfect package. 

Do you, like me, sort of take a run at it and just hope that the paper and the present come together in an aesthetically pleasing way? Some people have been rude enough to ask if I just throw the present and the paper then attempt to subdue them with lots of tape. I also have to agree that tape overuse is one of my failings when it comes to wrapping. I'm a bit like a spider wrapping its prey in silk thread.

Well this year everything is going to be different. After watching Katie Steckles perform wonders of mathematical wrapping I think I've got sufficient algorithmic wrapping loaded and ready to run to deal with any shape:

 

 

Wasn't she economical with the tape! Once piece for a whole package!

The diagonal wrapping technique is worth knowing about. It was discovered a few years back and quickly adopted by chocolate bar makers as a way of saving money on foil - it uses a lot less foil than the obvious way of wrapping. 

 

wrapping

Apart from ensuring my presents look like something that Luke Skywalker might want to feel, it is also a reminder that algorithmic thought is everywhere. I also have to make sure that I put a selection of chocolates into gift boxes so they just fit. Thankfully I understand the knapsack problem and the greedy algorithms needed to solve it.

And they say you shouldn't teach programming in schools!

They deserve poorly wrapped presents.

wappingicon

Credit:The Man's Guide To Wrapping Presents

More Information

Gift wrapping algorithm

Related Articles

The Knapsack Problem 

$10K Contest To Solve A Problem Worth Millions       

Faster Jigsaw Solving

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on, Twitter, FacebookGoogle+ or Linkedin

 

Banner


JetBrains AI Assistant - A Welcome Time Saver
28/02/2024

JetBrains AI Assistant saves developers up to eight hours per week and they appreciate its help.  77% of users feel more productive, 75% express that they are happier with their IDE experien [ ... ]



Master Large Language Model Ops
20/03/2024

New technology brings with it more career opportunities. You may never have imagined becoming an LLMOps consultant,  but there's now a Coursera Specialization which provides preparation for this  [ ... ]


More News

 

raspberry pi books

 

Comments




or email your comment to: comments@i-programmer.info

Gift wrapping algorithm

Last Updated ( Tuesday, 22 December 2015 )