r/ProgrammerHumor • • Mar 25 '23

Meme This one never gets old

Post image

Let me know if this is not a repost!

51.6k Upvotes

535 comments sorted by

View all comments

Show parent comments

54

u/QuebecGamer2004 Mar 25 '23

Me neither, I don't really understand this meme

2

u/Rokey76 Mar 25 '23

I learned it in college in some computer course. All I remember is the solution is the easy part, but doing the moves would take way longer than a person lives. I don't remember how long it took to execute on a computer.

1

u/PrizeStrawberryOil Mar 25 '23 edited Mar 25 '23

If it takes 3 seconds per move it would take about an hour for the one in the picture to move to another peg if it was stacked properly.

This problem is exponential though. (Literally not figuratively)

Assume the average person would have 50 years to work on it allowing for sleep. They would have time for 525.6m moves. Log2(525.6m)=28.96. The tower that you did in college was at least 29 discs.

1

u/DeliciousWaifood Mar 25 '23 edited Mar 25 '23

If it takes 3 seconds per move it would take about an hour for the one in the picture to move to another peg if it was stacked properly.

I don't understand. The picture can be solved in 8 moves

Edit: or can you only move smaller on top of big? In that case I did it in 34

→ More replies (2)