I'm having an issue determining the best pathway. I have a bookshelf custom-made and here's a photo of it:
And here are the measurements of the same bookshelf. Other than the topmost rectangle which has a height of 42cm, the rest of them are equal and smaller i.e. 35.5cm. The width of all rectangles is the same i.e. 55cm and the extra non-rectangle one-side open portion is 25cm thus the total width of the shelf is 80cm. 
I purchased 10m USB-based string light (which has a USB port on one end and is just a linear piece of wire with bulbs on it) and this is supposed to go along the front rims of the shelf (cannot go inside as books are placed) starting from ORIGIN point (marked in red) which is where its power source is. I intend to tape over it so that when I switch it on, the shelf lights up beautifully. I'm trying to find the best path to take to cover the entirety of the bookshelf. I do not see a single straight pathway and so overlapping is unavoidable. However, since it is unavoidable I would like to overlap the main rectangles if possible to maximize the bulbs and give the bookshelf the best overall appearance. How can I determine the best pathway for this structure? Thanks.
You have a total of $6 \times 80$ horizontal cm and $2 \times 182$ vertical cm for a total of $444$ cm. That's less than half the $10$ m of light strip.
That suggests to me that you should just start at the outlet and follow the edges until they are all doubled. That's mathematically possible. It's a little tricky but a nice puzzle. You should be able to figure out a way to do it.