Alex Bru wrote:Logically, I would think that a tent can only be [X+1][Y], [X-1][Y], [X][Y+1], and [X][Y-1] from the tree, right?
Junilu Lacar wrote:What I don't understand is how you can place trees and tents at random. You'd think that if this were a puzzle, there would be a specific configuration and a corresponding unique solution. If you just put trees in the grid at random, wouldn't it be possible to have a configuration that has no solution?
Alex Bru wrote:I'm not sure - do you have another method in mind?
Alex Bru wrote:I am trying to understand the tents and trees puzzle (maybe you have heard of it, maybe not) in terms of arrays.
My approach
I am not near having a workable solution. As a start, I am denoting my trees in a 2D-array as a "1" and the tents as a "2".
What should come next? Logically, I would think that a tent can only be [X+1][Y], [X-1][Y], [X][Y+1], and [X][Y-1] from the tree, right?
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
There are three kinds of actuaries: those who can count, and those who can't.
Piet Souris wrote:The complexity of this puzzle is much less than that of a sudoku, so I would not compare it to a sudoku puzzle
We can fix it! We just need some baling wire, some WD-40, a bit of duct tape and this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
|