Problem 45182. Takuzu row
Takuzu row is one row in a logic puzzle of a rectangular grid. The rules are as follows:
(1) The row is filled with 1s and 0s only.
(2) There is an equal number of 1s and 0s in the row.
(3) No more than two of either number can be adjacent to each other.
Example:
x = [0 1]; is a Takuzu row, so tf = 1;
x = [1 1 1 0]; is not, so tf = 0;
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers16
Suggested Problems
-
2241 Solvers
-
Matrix indexing with two vectors of indices
770 Solvers
-
Find the elements of a matrix according to a defined property.
91 Solvers
-
364 Solvers
-
count upper and lower case characters
54 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!