Note about the images:
The 2nd and 4th layers are omitted for simplicity. The edges that connect different layers are not explicitly drawn, except the ones that connect the top and bottom layers which are indicated with a green X in the middle layer.
Variant A
A solution
exists:
If you rotate the entire 3D grid 90 degrees, you can put two faces with five dots on the top and bottom layers, and just two dots on the center layer. I fiddled with a partial route that goes through all five dots without escaping the layer, and got a nice simple solution above.
Variant B
A solution
exists:
I tried various partial paths connecting the four dots on one layer. Connecting all four dots with one path didn't seem to help, so I tried using two paths, and got the one on the first layer in the above solution. Then I spotted a possible symmetry with the cross-layer edges. Putting a 180-degree turn on the opposing layer gave two loops, and putting a reflection instead worked.
Variant C
A solution
does not exist.
There are 14 black dots and 13 small diamonds. Each black dot adds 2 to the number of edges connected to small diamonds, which makes 28 in total. By pigeonhole principle, some diamond has at least 3 edges going into it, which violates the rule of Masyu.
Variant D
A solution
does not exist.
The logic for this one is more involved and probably not perfect, but I'll try anyway.
The center dot has to connect to two of the diamonds that are not opposite to each other. Let's rotate the cube so both edges are oriented as in the image above.
There are 13 black dots and 14 diamonds. By the same logic ans Variant C, 13 or 14 diamonds must be used. This means that all 5 diamonds are used on the top or bottom layer, and at least 4 are used on the opposite one.
If the top layer uses 5 diamonds, at least 6 edges must come out of the layer. If it uses 4 diamonds, at least 4 must come out. It can be the case that all 14 diamonds are used but two of them have only one edge coming from black dots; a layer containing one of them gives at least 5 edges coming out of the layer. In any case, at least 10 edges in total are coming into the middle layer.
On the other hand, there can be at most one connection that connects the top and bottom layers, since such connections cannot go through dots, the diamonds on the east and south are unavailable, and one of the north and west diamonds must connect to the northwest dot. The center dot cannot accept any cross-layer edges, so the center layer can only accept nine such edges in total, leading to contradiction.
>!
. But,A
andB
supposed to be warming up tasks before forC
,D
, rot13(naq cebonoyl, pregnva sbyybj-hc ceboyrz) $\endgroup$