SoatDev IT Consulting
SoatDev IT Consulting
  • About us
  • Expertise
  • Services
  • How it works
  • Contact Us
  • News
  • August 6, 2025
  • Rss Fetcher

We often want to reduce something that’s inherently two-dimensional into something one-dimensional. We want to turn graph into a list.

And we’d like to do this with some kind of faithfulness. We’d like things that are close together in 2D space to be close together in their 1D representation, and vice versa, to the extent possible.

For example, postal codes are a way of imposing a linear order on geographic regions. You would like (or maybe naively assume) that regions whose zip codes are numerically close together are geographically close together. This is roughly true. See this post to explore that further.

Tours are another way to turn a graph into a list. A Traveling Salesman tour is a path of shortest length through a set of points. For example, here is a Traveling Salesman tour of Texas counties. Counties that are visited consecutively are close together, though it may take a long time to come back to a county close to the one you’re in at a given time.

Sometimes there are purely mathematical reasons to flatten a 2D structure into a linear tour, such as Hilbert curves or Cantor’s diagonal trick.

All this came to mind because I saw a post on Hacker News this morning about a way to enumerate a zigzag spiral.

The remarkable thing about this article is that the author gives a sequence of closed-form expressions for the number at position (m, n) in the grid.

Related posts

  • A Traveling Salesman Tour of Africa
  • Maidenhead Geocode System
  • Information Theory and Coordinates

The post Making the two-dimensional one-dimensional first appeared on John D. Cook.

Previous Post
Next Post

Recent Posts

  • The Browser Company launches a $20 monthly subscription for its AI-powered browser
  • Using TF-IDF to pick out important words
  • Two teens charged in attack on former DOGE official Edward “Big Balls” Coristine
  • Upwork is buying its way into corporate staffing beyond freelancers
  • Google denies AI search features are killing website traffic

Categories

  • Industry News
  • Programming
  • RSS Fetched Articles
  • Uncategorized

Archives

  • August 2025
  • July 2025
  • June 2025
  • May 2025
  • April 2025
  • February 2025
  • January 2025
  • December 2024
  • November 2024
  • October 2024
  • September 2024
  • August 2024
  • July 2024
  • June 2024
  • May 2024
  • April 2024
  • March 2024
  • February 2024
  • January 2024
  • December 2023
  • November 2023
  • October 2023
  • September 2023
  • August 2023
  • July 2023
  • June 2023
  • May 2023
  • April 2023

Tap into the power of Microservices, MVC Architecture, Cloud, Containers, UML, and Scrum methodologies to bolster your project planning, execution, and application development processes.

Solutions

  • IT Consultation
  • Agile Transformation
  • Software Development
  • DevOps & CI/CD

Regions Covered

  • Montreal
  • New York
  • Paris
  • Mauritius
  • Abidjan
  • Dakar

Subscribe to Newsletter

Join our monthly newsletter subscribers to get the latest news and insights.

© Copyright 2023. All Rights Reserved by Soatdev IT Consulting Inc.