Issue with the solution to the 6s problem

I recently came across a posted solutions to the 6s problem. I’m going to argue that several these solutions are invalid. Or, more precisely, I am going to argue that they are only conidered valid due to a convention in notation.

Part of the problem definition states that you cannot add additional digits to get to the solution, only operators. The operators that are used start with addition, subtraction, multiplication, division, and factorial. To solve some of the more difficult lines of the problem, they introduce the square root operator. This, however, is the degenerate form of the a fractional exponent. In other words, you can write either

{\sqrt {2}}



Note that in the bottom case, you introduce two new digits: a 1 and a 2.

To be fair, the factorial operator is also shorthand for a fairly long operations. If it was written in product notation, it would be:

Which also introduces and additional 1.

This arbitrary distinction occured to me when I was looking at the solution for the 8s problem. It occurred to me that 2^3 is 8, and so a more elegant solution would be to take the cube root of 8 for each digit and sum them. However, this explicitly violates the rules of the puzzle, as the symbol for the cube root is the same as square root, but with a superscript 3.

Why do I care: because there is a pattern with notation that mixes the default case with the more explicit non-default expansions. For example, look at these two network devices names:

enp1s0f0np0 and enP4p4s0f0np0.

You have to look close to parse the difference. It is easier to see when they are stacked:

  • enp1s0f0np0
  • enP4p4s0f0np0

The fact that the second one is longer helps your eye see that the thrid chracter is a lowercase p in the first and uppercase in the second. Why? That field indicates some aspect of the internal configuration of the machine, something about the bridge to which the device is attached. The first is attached to bridge 0, which is the default, and is thus elided. The second is attached to bridge 4, and is thus explicitly named.

Yeah, it is a pain to differentiate.

So the solution to the problem is based on context sensitive parsing of the definition of the problem, to include the fact that the square root is considered a standard symbol without a digit to explicitly state what root is being taken.

Let’s take that option off the table. Are there still solutions to the 6s problem when defined more strictly. What are the set of acceptable operators that can be used to solve this puzzle? What is the smallest set?

Network traffic for an Ironic Node

I’ve set up a second cluster, and the Ironic nodes are not PXE booting. Specifically, if I watch the nodes boot via an IPMI serial-on-lan console, I see that they send out a DHCP request and never get a response back.

This is a problem I am familiar with from my days at Penguin. Time to dig in and understand the networking setup on the controller to see why it is not getting the packet. Or, possibly, why it is getting it and the response is getting dropped.

I have another cluster that is working properly, and I am going to look at the setup there to try and contrast it with the broken set up, and figure out my problem.

Continue reading

Multiplication by Halving and Doubling in AARCH64 Assembly

While multiplication is defined in the context of repeated addition, implementing it that way algorithmically is not nearly as efficient as some other approaches. One algorithm for multiplication that is an order of magnitude faster is to halve one number while doubling the other. I gave myself the challenge of implementing this algorithm in AARCH64 Assembly, and it was not too hard.

Continue reading

Understanding the MIXAL insertion sort.

A debugger is a wonderful tool for understanding what actually happens in a piece of code. Donald Knuth’s coding in TAOCP is archaic enough that I do not understand it just by reading through. This is due to a combination of my unfamiliarity with MIXAL, as well as some of the coding conventions he’s chosen. So, I’m going to step through the MIXAL code in mixvm, and annotate what I find.

Continue reading