Live data from Hacker News

Counting the Hard Way

rupertmckay.com

1–10 of 23 posts

Re: Counting the Hard Way

#2
>"The Quarter-Imaginary numeral system was first proposed by Donald Knuth in 1960.

The trick with this base is recognising that powers of 2i "rotate" through the Gaussian plane."

Powers:

-1: -(1/2)i, 0: 1, 1: 2i, 2: -4, 3: -8i, 4: 16, 5: 32i, 6: -64 etc.

PDS: Now this is highly interesting to me! A system which collapses a 2D number system, that is, non-imaginary + imaginary numbers (AKA, the "Complex (2D) Plane") -- back into what is basically a number line -- or a single-dimensional linear system (choose whatever terminology or linguistics you prefer...)

But the point is -- it reduces dimensionality from N to N-1 dimensions -- while still preserving imaginary numbers...

To accomplish this weird trick, Knuth spaces out imaginary numbers (and negative numbers) at intervals of 4 -- basically you cycle through properties (positive real, positive imaginary, negative real, negative imaginary) with every cycle of 4.

Could this be accomplished with other bases and other number systems having more than one dimension?

Based on Knuth's example, it would seem to be very possible!

I can only wonder what interesting mathematical properties future mathematicians might discover by using such structures...

They might turn out to be useful for a lot of things!

I'd be highly curious if there is any Mathematician who has applied such a structure to one or more specfic problems, and if it helped them solve a specific problem in an elegant or novel way...

What would also be interesting would be a list of mathematical problems (like a wiki page) whose computation could be aided by using such a structure, and how specifically to perform calculations using the structure, etc., etc.

Re: Counting the Hard Way

#3

>"The Quarter-Imaginary numeral system was first proposed by Donald Knuth in 1960. The trick with this base is recognising that powers of 2i "rotate" through the Gaussian plane. " Powers: -1: -(1/2)i, 0: 1, 1: 2i, 2: -4, 3: -8i, 4: 16, 5: 32i, 6: -64 etc. PDS: Now this is highly interesting to me! A system which collapses a 2D number system, that is, non-imaginary + imaginary numbers (AKA, the "Complex (2D) Plane") -…

> Could this be accomplished with other bases and other number systems having more than one dimension?

Yes, all sets ℤⁿ (n > 0) have cardinality ℵ₀ and therefore a bijection can be defined for any set ℤⁿ↔ℤ.

The "computer science" way to think of this is, you can always e.g. interleave the bits of any number of integers, to encode them as a single unique integer. For two dimensions this is the Z-order curve [1].

[1] https://en.wikipedia.org/wiki/Z-order_curve

Re: Counting the Hard Way

#4

>"The Quarter-Imaginary numeral system was first proposed by Donald Knuth in 1960. The trick with this base is recognising that powers of 2i "rotate" through the Gaussian plane. " Powers: -1: -(1/2)i, 0: 1, 1: 2i, 2: -4, 3: -8i, 4: 16, 5: 32i, 6: -64 etc. PDS: Now this is highly interesting to me! A system which collapses a 2D number system, that is, non-imaginary + imaginary numbers (AKA, the "Complex (2D) Plane") -…

> Could this be accomplished with other bases and other number systems having more than one dimension? Yes, all sets ℤⁿ (n > 0) have cardinality ℵ₀ and therefore a bijection can be defined for any set ℤⁿ↔ℤ. The "computer science" way to think of this is, you can always e.g. interleave the bits of any number of integers, to encode them as a single unique integer. For two dimensions this is the Z-order curve [1]. [1] h…

Never would have thought of the relationship between this and the Z-order curve -- but yes, upon consideration, I see the relationship!

Brilliant!

Re: Counting the Hard Way

#5

>"The Quarter-Imaginary numeral system was first proposed by Donald Knuth in 1960. The trick with this base is recognising that powers of 2i "rotate" through the Gaussian plane. " Powers: -1: -(1/2)i, 0: 1, 1: 2i, 2: -4, 3: -8i, 4: 16, 5: 32i, 6: -64 etc. PDS: Now this is highly interesting to me! A system which collapses a 2D number system, that is, non-imaginary + imaginary numbers (AKA, the "Complex (2D) Plane") -…

Nothing surprising here.

The cross products of countable set are countable and a bijection between N and NxN which you can then extend as been known for ages.

The whole thing falls apart as soon as you use continuous set.

Re: Counting the Hard Way

#6

>"The Quarter-Imaginary numeral system was first proposed by Donald Knuth in 1960. The trick with this base is recognising that powers of 2i "rotate" through the Gaussian plane. " Powers: -1: -(1/2)i, 0: 1, 1: 2i, 2: -4, 3: -8i, 4: 16, 5: 32i, 6: -64 etc. PDS: Now this is highly interesting to me! A system which collapses a 2D number system, that is, non-imaginary + imaginary numbers (AKA, the "Complex (2D) Plane") -…

Nothing surprising here. The cross products of countable set are countable and a bijection between N and NxN which you can then extend as been known for ages. The whole thing falls apart as soon as you use continuous set.

The cross product of continuum sets is also equivalent to a continuum, so it does not fall apart, it forms a space-filling curve on complex plane. See z-curve section of https://en.m.wikipedia.org/wiki/Quater-imaginary_base

Re: Counting the Hard Way

#7

>"The Quarter-Imaginary numeral system was first proposed by Donald Knuth in 1960. The trick with this base is recognising that powers of 2i "rotate" through the Gaussian plane. " Powers: -1: -(1/2)i, 0: 1, 1: 2i, 2: -4, 3: -8i, 4: 16, 5: 32i, 6: -64 etc. PDS: Now this is highly interesting to me! A system which collapses a 2D number system, that is, non-imaginary + imaginary numbers (AKA, the "Complex (2D) Plane") -…

Another example of this kind of thing is demonstrating that the set of rational numbers are countable.

Each rational number has the form a / b for a pair of integers (a, b). This representation could be non-unique, e.g. 1/2 = -3/-6 are two different representations of the same rational number as fractions of integers. For this representation to be unique let's require the denominator b to be positive and a, b to have no common divisor. Let's consider (a, b) a point with integer coordinates on the lattice Z x Z, where Z is the set of integers (Z = { ..., -2, -1, 0, 1, 2, ... }).

We can count each of these points if we begin by labeling the origin (0, 0) as "0" then (1, 0) as "1" then (0, 1) as "2",(-1, 0) as "3", etc. We can order these integer lattice points first by their increasing magnitude |a| + |b| from the origin and then by the angle they make relative to the origin and count them all one by one.

Informally this shows that the set of rational numbers is not larger (in the sense of cardinality) as N_{>=0}, the set of non-negative integers. It's not smaller either as the set of non-negative integers N_{>=0} are a subset of rational numbers.

Post reply on HN