I'm working on a problem right now and am having a bit of trouble.
Here's the question:
I've gotten to a point in the program where I can generate all possible rows for a given length and can calculate the number of other rows that align with each other. I can calculate base cases fairly quick, but my program is very naive and calculates walls recursively, with each of the possible rows as bases of a wall and which builds walls recursively on each possible leaf combination. As you can imaging, this isn't very efficient, and for anything above height 6 my program takes a very, very long time.
I've seen this problem on the forum from an earlier, but my question wasn't really answered and I couldn't reply to it. Help/ideas is/are greatly appreciated.
Oh, and I'm writing the program in c++.
EDIT: I'm having a lot of trouble, could someone look at my code and suggest improvements?
EDIT2: Ok, I have an answer now, I get 806844323190414 possible walls for a 48x10 inch wall. If anyone wants, I can post post my methodology/code, or just general advice.