acm-header
Sign In

Communications of the ACM

Last Byte

Tidy Towers


stack of colored cubes, illustration

Credit: Vecteezy

You are given a tower consisting of identical cubes, each of which has the same colors on the vertical sides in the same clockwise order as in Figure 1. The goal is for all cubes to be aligned in that all colors are the same vertically. A tower with such an alignment is called tidy.

f1.jpg
Figure 1. The vertical sides of each cube consist of the colors red, green, blue, and yellow in clockwise order.

Two kinds of operations are allowed: rotate a cube and then all cubes above it rotate as well or rotate a cube c1 and hold a cube c2 above c1 so that neither cube c2 nor the cubes above c2 rotate but all cubes starting with c1 and up to the cube just below c2 rotate.


 

No entries found

Log in to Read the Full Article

Sign In

Sign in using your ACM Web Account username and password to access premium content if you are an ACM member, Communications subscriber or Digital Library subscriber.

Need Access?

Please select one of the options below for access to premium content and features.

Create a Web Account

If you are already an ACM member, Communications subscriber, or Digital Library subscriber, please set up a web account to access premium content on this site.

Join the ACM

Become a member to take full advantage of ACM's outstanding computing information resources, networking opportunities, and other benefits.
  

Subscribe to Communications of the ACM Magazine

Get full access to 50+ years of CACM content and receive the print version of the magazine monthly.

Purchase the Article

Non-members can purchase this article or a copy of the magazine in which it appears.
Sign In for Full Access
» Forgot Password? » Create an ACM Web Account