Back to General discussions forum
What you are allowed to do:
Problem Statement: You are given two polygons P1 and P2. P1 and P2 both have the same area. Give a sequence of cutting and glueing actions which starts with a single polygon P1 and ends up with a single polygon P2.
Fun Fact: Not only is this always possible. It is always possible even if you restrict yourself to "hinged dissections"
Vadim, Hi - and thanks for another much curious topic :)
This reminds of classical cutting puzzles like those by Loyd and Dudeney. Though these fellows generally requested minimize number of parts.
I googled a bit to find out explanations (heard of theorem but never knew details).
Honestly, this sounds like a real "coffin" to program :))) Even cutting polygons already requires good deal of coding with memory objects (but this hints about possible intermediate problems).
I probably shall at least try to code this, though perhaps not immediately (much frightened!) - so if you feel in the great mood to provide generator/checker code for such task yourself - just tell :)
Honestly, this sounds like a real "coffin" to program
Without having started writing any code for it (but already knowing a solution that would work) it does seem to me like this would be cumbersome in terms of representing the sequence of actions and verifying a solution. Perhaps the solution verification can be simplified if we restrict vertices of polygons (including intermediate polygons) to integer coordinates.
Actually, maybe that would be too easy.
Actually no, that should be perfectly fine. If we use doubles for coordinates, then those are just rational values, and multiplying by an appropriate power of 2 would make them integers. We can use large integer coordinates.
so if you feel in the great mood to provide generator/checker code for such task yourself - just tell
Speaking of this, I actually have another problem which I wanted to suggest adding, which I already have a solution for but wanted to save it until I had generator/checker ready. How should the generator/checker be formed? As in, what format or style should it follow or what languages am I allowed to use?
Vadim, Hi, and sorry for delay!
How should the generator/checker be formed? As in, what format or style should it follow or what languages am I allowed to use?
This approach is much "work in progres" yet, so while brief instruction is by the link below, any suggestions are welcome.
(just found instruction is even without examples - added a couple of them now)