Presentation is loading. Please wait.

Presentation is loading. Please wait.

Hilbert CurvesSlide 1 Introduction to the Hilbert Curves This slide sequence will show several different ways to view the recursive Hilbert curves invented.

Similar presentations


Presentation on theme: "Hilbert CurvesSlide 1 Introduction to the Hilbert Curves This slide sequence will show several different ways to view the recursive Hilbert curves invented."— Presentation transcript:

1 Hilbert CurvesSlide 1 Introduction to the Hilbert Curves This slide sequence will show several different ways to view the recursive Hilbert curves invented by the mathematician David Hilbert about 100 years ago. The slides will be organized as a sequence of images and the mathematical explanation will follow at the end. The Hilbert curves were used as an illustration of the power of recursion in the famous text: Nicklaus Wirth, “Algorithms + Data Structures = Programs”, Prentice-Hall, 1976. The images in this presentation were created in Java using the Java Power Tools developed at Northeastern University in Boston. Copyright 2001, Richard Rasala.

2 Hilbert CurvesSlide 2 Hilbert Curve at Recursion Level 1

3 Hilbert CurvesSlide 3 Hilbert Curve at Recursion Level 2

4 Hilbert CurvesSlide 4 Hilbert Curve at Recursion Level 3

5 Hilbert CurvesSlide 5 Hilbert Curve at Recursion Level 4

6 Hilbert CurvesSlide 6 Hilbert Curve at Recursion Level 5

7 Hilbert CurvesSlide 7 Hilbert Curve at Recursion Level 6

8 Hilbert CurvesSlide 8 Hilbert Curve at Recursion Level 7

9 Hilbert CurvesSlide 9 Hilbert Curve at Recursion Level 8

10 Hilbert CurvesSlide 10 Hilbert Curve at Recursion Level 9

11 Hilbert CurvesSlide 11 Composite View of Hilbert Curves from Levels 1 to 5

12 Hilbert CurvesSlide 12 Hilbert at Level 1 Showing North, East, South, West Views

13 Hilbert CurvesSlide 13 Hilbert at Level 2 Showing North, East, South, West Views

14 Hilbert CurvesSlide 14 Hilbert at Level 3 Showing North, East, South, West Views

15 Hilbert CurvesSlide 15 Hilbert at Level 4 Showing North, East, South, West Views

16 Hilbert CurvesSlide 16 Hilbert at Level 1 as a Visitor to a Planar Tiling

17 Hilbert CurvesSlide 17 Hilbert at Level 2 as a Visitor to a Planar Tiling

18 Hilbert CurvesSlide 18 Hilbert at Level 3 as a Visitor to a Planar Tiling

19 Hilbert CurvesSlide 19 Hilbert at Level 4 as a Visitor to a Planar Tiling

20 Hilbert CurvesSlide 20 Hilbert at Level 5 as a Visitor to a Planar Tiling

21 Hilbert CurvesSlide 21 Hilbert at Level 6 as a Visitor to a Planar Tiling

22 Hilbert CurvesSlide 22 The Base 4 Hilbert Numbering: Level 1

23 Hilbert CurvesSlide 23 The Base 4 Hilbert Numbering: Level 2

24 Hilbert CurvesSlide 24 The Base 4 Hilbert Numbering: Level 3

25 Hilbert CurvesSlide 25 The Base 4 Hilbert Numbering: Level 4

26 Hilbert CurvesSlide 26 The Base 4 Hilbert Numbering from Levels 1 to 2

27 Hilbert CurvesSlide 27 The Base 4 Hilbert Numbering from Levels 1 to 3

28 Hilbert CurvesSlide 28 The Base 4 Hilbert Numbering from Levels 1 to 4

29 Hilbert CurvesSlide 29 Mathematics of the Hilbert Curves The Hilbert Curves were invented by the mathematician David Hilbert about 100 years ago to answer the Space Filling Curves Problem. In its simplest version, the Space Filling Curves Problem asks if there exists a continuous function from the unit interval [0, 1] that maps onto the unit square in the plane. The answer to this question is Yes. The sequence of Hilbert curves give a constructive definition of the function from the unit interval to the unit square. To obtain this function, one must “pass to the limit” as the level N of recursion goes to infinity. Is it possible to understand the limiting function that maps the unit interval onto the unit square in a concrete fashion? Yes -- Use the base 4 numbering scheme!

30 Hilbert CurvesSlide 30 Explanation of the Base 4 Numbering Scheme For each finite level N of recursion, the Hilbert curve contains 4 N points that lie at the centers of a tiling of the unit square into 4 N squares. Thus, at level 1, there are 4 points; at level 2, there are 16 points; at level 3, there are 64 points; at level 4, there are 256 points; etc. The base 4 numbering scheme numbers the 4 N points at level N using a sequence of N digits in base 4. At level 1, the points are numbered 0, 1, 2, 3. At level 2, the points are numbered 00, 01, 02, 03, 10, 11, 12, 13, 20, 21, 22, 23, 30, 31, 32, 33. At level 3, all 3 digit sequences abc in base 4 are used. At level 4, all 4 digit sequences abcd in base 4 are used. Etc.

31 Hilbert CurvesSlide 31 Explanation of the Base 4 Numbering Scheme: Level 1 Think of the base 4 numbers as the leading digits in the base 4 expansion of a fraction between 0 and 1. This is similar to the “decimal expansion” except that base 4 is used. Let us call the base 4 expansion the “4-mal expansion”. Consider the Hilbert curve of level 1 (next slide). The 4 points numbered 0, 1, 2, 3 are centered in 4 squares. We can now say the following about the limiting Hilbert mapping: –All points x in [0, 1] whose 4-mal expansion begins with 0 will map to a point in the square labeled with 0. –All points x in [0, 1] whose 4-mal expansion begins with 1 will map to a point in the square labeled with 1. –All points x in [0, 1] whose 4-mal expansion begins with 2 will map to a point in the square labeled with 2. –All points x in [0, 1] whose 4-mal expansion begins with 3 will map to a point in the square labeled with 3.

32 Hilbert CurvesSlide 32 Explanation of the Base 4 Numbering Scheme: Level 1

33 Hilbert CurvesSlide 33 Explanation of the Base 4 Numbering Scheme: Level 2 Consider the Hilbert curve of level 2 (next slide). The 16 points numbered 00, 01, 02, 03, 10, 11, 12, 13, 20, 21, 22, 23, 30, 31, 32, 33 are centered in 16 squares. We can now say the following about the limiting Hilbert mapping: –All points x in [0, 1] whose 4-mal expansion begins with a pair of digits ab will map to a point in the square labeled with ab. –Notice that the squares labeled with ab for some b all lie within the larger square labeled by a at level 1.

34 Hilbert CurvesSlide 34 Explanation of the Base 4 Numbering Scheme: Level 2

35 Hilbert CurvesSlide 35 Explanation of the Base 4 Numbering Scheme: Level 3 Consider the Hilbert curve of level 3 (next slide). The 64 points numbered by sequences abc are centered in 64 squares. We can now say the following about the limiting Hilbert mapping: –All points x in [0, 1] whose 4-mal expansion begins with a triple of digits abc will map to a point in the square labeled with abc. –Notice that the squares labeled with abc for some c all lie within the larger square labeled by ab at level 2.

36 Hilbert CurvesSlide 36 Explanation of the Base 4 Numbering Scheme: Level 3

37 Hilbert CurvesSlide 37 Explanation of the Base 4 Numbering Scheme: Level 4 We can now “pass to the limit” in our minds and develop the following rule for specifying the limiting Hilbert mapping. To determine the image of a point x in the interval [0, 1] under the limiting Hilbert mapping to within an accuracy of 1/2 N in the x and y directions, find the 4-mal expansion of x with N digits: d 1 d 2 …d N. Then, the image of x will lie within the square labeled by d 1 d 2 …d N when the Hilbert curve of level N is drawn. The manner in which increasing the number of 4-mal digits of a number leads to nested squares within the unit square is shown very well by the next slide.

38 Hilbert CurvesSlide 38 Explanation of the Base 4 Numbering Scheme: Level 4

39 Hilbert CurvesSlide 39 The Hilbert Mapping on Particular Points Looking at the diagrams that show the nesting of squares and the base 4 numbering, it is possible to deduce the image of various points under the Hilbert mapping. 00.0000…Maps to SW corner of the main square 1/120.0111…Maps to the center of the S edge of the main square 1/60.0222…Maps to the center of the main square 1/40.1000…Maps to the center of the W edge of the main square 1/30.1111…Maps to NW corner of the main square 5/120.1222…Maps to the center of the N edge of the main square 1/20.2000…Maps to the center of the main square 7/120.2111…Maps to the center of the N edge of the main square 2/30.2222…Maps to NE corner of the main square 3/40.3000…Maps to the center of the E edge of the main square 5/60.3111…Maps to the center of the main square 11/120.3222…Maps to the center of the S edge of the main square 11.0000…Maps to SE corner of the main square

40 Hilbert CurvesSlide 40 Concluding Remarks The Hilbert mapping maps the unit interval onto the unit square but the mapping is not 1-to-1. As shown in the preceding table, several points in the interval map to the center of the main square. Hilbert curves can be applied to storing 2-dimensional data in databases. Imagine the planar region of the data divided into a number of small square tiles as in the Hilbert images. Then use the base 4 numbering to define a database key for storing the associated data. The nice property of this key system is that, for most subsets of the region, data that is geographically close will also be physically close in the database. Exceptions to this nice situation occur at places such as the center of the main square at which several branches of the Hilbert curve converge.


Download ppt "Hilbert CurvesSlide 1 Introduction to the Hilbert Curves This slide sequence will show several different ways to view the recursive Hilbert curves invented."

Similar presentations


Ads by Google