HN user

lialuna

56 karma
Posts0
Comments2
View on HN
No posts found.

I’m 33, when I was ~17 I took a discrete math course. During class teacher posed a challenge- to find algorithm for minimal number of cross beams to make an n by m lattice rigid, so it can’t flex like a parallelogram because triangles are fixing angles. I was asleep, realized I was dreaming, and decided to “work” on the problem. I found a solution, woke up and wrote it down. I think it was helpful to be dreaming because usually I cannot visualize more than simple shape, but while dreaming, I could try things out without using paper and pencil.

The reason they are not uniform is that the first part is essentially a time stamp. From the docs:

UUID() returns a value that conforms to UUID version 1 as described in RFC 4122. The value is a 128-bit number represented as a utf8 string of five hexadecimal numbers in aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee format:

The first three numbers are generated from the low, middle, and high parts of a timestamp. The high part also includes the UUID version number.

The fourth number preserves temporal uniqueness in case the timestamp value loses monotonicity (for example, due to daylight saving time).

The fifth number is an IEEE 802 node number that provides spatial uniqueness. A random number is substituted if the latter is not available (for example, because the host device has no Ethernet card, or it is unknown how to find the hardware address of an interface on the host operating system). In this case, spatial uniqueness cannot be guaranteed. Nevertheless, a collision should have very low probability.

The MAC address of an interface is taken into account only on FreeBSD and Linux. On other operating systems, MySQL uses a randomly generated 48-bit number.