• Non ci sono risultati.

Numbering Systems Numbering Systems and Infinity and Infinity

N/A
N/A
Protected

Academic year: 2021

Condividi "Numbering Systems Numbering Systems and Infinity and Infinity"

Copied!
16
0
0

Testo completo

(1)

Numbering Systems Numbering Systems

and Infinity and Infinity

Moreno Marzolla

Dip. di Informatica—Scienza e Ingegneria (DISI) Università di Bologna

http://www.moreno.marzolla.name/

(2)

Copyright © 2014, Moreno Marzolla, Università di Bologna, Italy (http://www.moreno.marzolla.name/teaching/CS2013/)

This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 License (CC-BY-SA). To view a copy of this license, visit http://creativecommons.org/licenses/by- sa/3.0/ or send a letter to Creative Commons, 543 Howard Street, 5th Floor, San

Francisco, California, 94105, USA.

Image credits: the Web; The Computational Beauty of Nature website http://mitpress.mit.edu/sites/default/files/titles/content/cbnhtml/home.html

(3)

Summary

Infinity plays an important role in several topics we will

address (e.g., fractals), therefore it is appropriate that

we give a closer look at it

(4)

Zeno's Paradox

Achille runs 1 Km in 1 min

The Tortoise runs 1 / 2 Km in 1 min

The Tortoise is given 1Km advantage

After 1 min, the Tortoise is 1 / 2 Km ahead

After 1 / 2 min the Tortoise is 1 / 4 Km ahead

After 1 / 4 min the Tortoise is 1 / 8 Km ahead

The Tortoise is always ahead

of Achille !?

(5)

Enter Infinity

To reach the Tortoise, Achille needs to run for

We now know that this sum of infinite elements is indeed finite!

1+ 1

2 + 1

4 + 1

8 +…

1 1/2

1/4 1/8 1/16

i=0

a

i

= 1−a 1 , if 0<a<1

...

(6)

Counting numbers: naturals

There are infinitely many natural numbers (1, 2, 3, …)

Even naturals (2, 4, 6, …) are a proper subset of naturals...

...so there seem to be less even numbers than natural numbers, right?

Wrong!!

There are as many naturals as there are even naturals

1 2 3 4 5 6 7 8 9 10 11 12 ...

1

2 4 6 8 10 12

2 3 4 5 6

(7)

The Extraordinary Hotel

The Extraordinary Hotel or the Thousand and First Journey of Ion the Quiet

Attributed to Stanislaw Lem, but probably written by the russian mathematician Naum Yakovlevich Vilenkin

You are the director of an hotel with (countably)

infinitely many rooms {1, 2, 3, ...}

(8)

The Extraordinary Hotel

The hotel is fully booked, i.e., all rooms are already occupied by a guest

A new guest arrives. What should you do?

1 2 3 4 5 6 7 8 ...

g

Hotel (infinitely many rooms, fully booked)

New guest

(9)

The Extraordinary Hotel

Again, the hotel is fully booked.

Now, (countably) infinitely many new guests arrive at the same time. What should you do?

1 2 3 4 5 6 7 8 ...

Hotel (infinitely many rooms, fully booked)

Infinitely many new guests g4

... g3 g2 g1

(10)

Complex Systems 10

The Extraordinary Hotel

Suppose that there are infinitely many hotels, each with infinitely many rooms.

All hotels are fully booked, but all of them (except for one) have to be closed down for restructuring. The one hotel which is not to be closed is empty.

Therefore, you should try to fit infinitely many guests from infinitely many hotels into a single (infinite) hotel.

What should you do?

1 2 3 4 5 6 7 8 ...

Hotel (infinitely many rooms, empty)

g1,4

... g1,3 g1,2 g1,1

g2,4

... g2,3 g2,2 g2,1

(11)

Counting numbers: rationals

(Positive) rational numbers are those of the form p / q, with p, q naturals

The set of rational

numbers if countable, and therefore we can define a one-to-one mapping from the set of naturals

Therefore, there are as many natural numbers as there are rationals

1/1

1/2 2/2

1/3 2/3 3/3

1/4 2/4 3/4 4/4

1/5 2/5 3/5 4/5 5/5

1/6 2/6 3/6 4/6 5/6 6/6

...

(12)

Rationals

There are infinitely many rationals between any two rational numbers (p / q) < (r / s) (p, q, r, s integers)

Proof: (p/q + r/s) / 2 = (sp + rq) / 2qs is a rational number between p/q and r/s

A single rational number can be used to encode the whole content of the RAM of your PC!

Proof: the content of the memory of your PC is just a very long but finite sequence of 0 and 1, e.g.,

0110100100101010. Write the sequence as

0.0110100100101010 and you have a rational number encoding the whole value.

(13)

Counting numbers: irrationals

Irrational numbers are those who can not be expressed as p / q

They have infinite, nonperiodic decimal representation

The set of irrationals is not countable

Therefore, there are more irrational numbers than rational (and natural) numbers

x11 x12 x13 x14 x15 0.

x21 x22 x23 x24 x25 0.

x31 x32 x33 x34 x35 0.

x41 x42 x43 x44 x45 0.

0. ...

(14)

Counting numbers: reals

Consider a closed interval I = [a, b], and the open half- infinite interval J = [0, +∞). Are there more real

numbers in J than I?

(15)

Counting numbers: reals

Consider a closed interval I = [a, b], and the open half- infinite interval J = [0, +∞). Are there more real

numbers in J than I?

Answer: both contain the same (infinite) quantity of

real numbers

(16)

Conclusions

Natural numbers occupy fixed and equally-spaced positions on the real line

There are “as many” natural numbers as there are rational numbers

Yet, between any two naturals there are infinitely many rationals

There are “more” real numbers than rational (or natural) numbers

There are “as many” real numbers in a (finite) segment

than in the whole real line!

Riferimenti

Documenti correlati

Only a few examples exist (e.g., caddis larvae feeding on salmon carcasses) in lotic envi- ronments, although insects are the most important group of benthic invertebrates in

[r]

While the usual formulations of the infinity axiom (Inf) make use of formulae involving (at least) alternations of universal and existential restricted quantifiers, [PP88]

Under the priority inheritance protocol, a task can be blocked by another lower priority task for at most the duration of one critical section. A task can be blocked more than once,

Tasks with intermediate priority τ 2 cannot interfere with τ 1 However, τ 2 has a blocking time, even if it does not use any resource.. This is called indirect blocking

 sharing stack space means that two task instances can use the same stack memory area in different time instants.  in normal preemptive fixed priority schedulers, tasks cannot

In some cases, data refer to the annual average proportion of the total number of apprentices enrolled in apprenticeships in a country in a specific year – regardless of the scheme

My activities mainly consisted in the management of the Linked Data of the project and the design and development of a tool for the annotation of manuscripts using Semantic