Hi this is my first time posting on this forum, mainly because I am new to Fortran.
I have to do a project based on a problem called Mrs. Perkin's Quilt. I posted a link at the end for further info in case of any confusion. The basic idea is to take an nxn square and dissect it into smaller squares. These dissections must be prime, which I take to mean that there must be at least a single one by one square used. All the surface area of the square must be covered, and the goal is to do this using the least amount of squares. That link also has a nice visual, which one would understand the general thing I am trying to program.
I know most of the basics to programming, and I was wondering if anyone can help me step in the right direction as to how to approach programming a program that can solve this. The program doesn't need to find the exact solution, but a good solution. My goal is to get the least solution for n=1-15 and for n> 15 a decent solution would be optimal. I am unsure how I can create an algorithm using fortran to place squares within the main square and what not.
I figure that the user would input n for the initial square size. Then the program would start with the biggest possible square that is n-1, and find a solution for that (solution being the number of squares used). Then it would do this starting with a block n-2, and it would continue as such then compare the amounts used and determine which one was minimum. Then it would output the least # of squares used and maybe possibly i can draw this solution in PGplot but that would be done after I get the basics first. Could anyone please give me some advice,
Thanks
here is the link
I have to do a project based on a problem called Mrs. Perkin's Quilt. I posted a link at the end for further info in case of any confusion. The basic idea is to take an nxn square and dissect it into smaller squares. These dissections must be prime, which I take to mean that there must be at least a single one by one square used. All the surface area of the square must be covered, and the goal is to do this using the least amount of squares. That link also has a nice visual, which one would understand the general thing I am trying to program.
I know most of the basics to programming, and I was wondering if anyone can help me step in the right direction as to how to approach programming a program that can solve this. The program doesn't need to find the exact solution, but a good solution. My goal is to get the least solution for n=1-15 and for n> 15 a decent solution would be optimal. I am unsure how I can create an algorithm using fortran to place squares within the main square and what not.
I figure that the user would input n for the initial square size. Then the program would start with the biggest possible square that is n-1, and find a solution for that (solution being the number of squares used). Then it would do this starting with a block n-2, and it would continue as such then compare the amounts used and determine which one was minimum. Then it would output the least # of squares used and maybe possibly i can draw this solution in PGplot but that would be done after I get the basics first. Could anyone please give me some advice,
Thanks
here is the link