Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
function f(x, y, z, w) {
return (!!w && !!y) || !!x <= !!w === !!y <= !!z;
}
Insert cell
function solve() {
const result = [];
for (let x of [0, 1]) {
for (let y of [0, 1]) {
for (let z of [0, 1]) {
for (let w of [0, 1]) {
if (!f(x, y, z, w)) {
result.push([+x, +y, +z, +w]);
}
}
}
}
}
return result;
}
Insert cell
solve(f)
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more