![]() ![]() If the riddle matrix has a common value with a hint matrix then: If the hint matrix can be merged into the riddle matrix without the need to add new rows to the riddle matrix, then merge the hint matrix into the riddle matrix, otherwise reject. ![]() If a hint matrix has a common value with other hint matrix then: If both matrices can be merged (no matter if new rows should be added to the first matrix), then merge both hints, otherwise reject. The algorithm is pretty straightforward, and it's based on three rules (the use of the operators defined previously, has been highlighted): Rules based on the use of the matrix operators In this part we'll be talking about this algorithm, and a JavaScript implementation which will allow solving this riddle and any other grid riddle similar to this one. In the previous part of this article we formulated the Einstein's riddle in terms of matrices, and presented three matrix operations that will be the base for an algorithm to solve the riddle. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |