• No results found

IST 4 Information and Logic

N/A
N/A
Protected

Academic year: 2021

Share "IST 4 Information and Logic"

Copied!
70
0
0

Loading.... (view fulltext now)

Full text

(1)

IST 4

Information and Logic

(2)

mon tue wed thr fri

3 M1

1

10 M1

17

1 2

M2

24

2

1

M2

8

3

15

3 4

22 4 5

29

5

5

x= hw#x out x= hw#x due

Mx= MQx out Mx= MQx due

midterms

oh oh

oh oh

oh oh

oh

oh

oh oh

oh

oh oh oh

oh

oh oh

oh = office hours T oh

= today

T oh

oh

oh

oh

sun

(3)

Everyone has a gift! MQ2

Due TODAY, 5/2/2017, by 10pm

Please email PDF

lastname-firstname.pdf

to [email protected]

(4)

Intention   Memory  

Evolution   Algorizms   Information  System  

Languages   External    

Memory  

(5)

Building Blocks

finite number of building blocks à

‘infinitely’ many descriptions

DNA natural languages

(6)

Building Blocks

finite number of building blocks à

‘infinitely’ many descriptions

Separation

Separation A

between syntax and semantics

Separation B

between what is represented and reality, feasibility, time, space, ...

Separation C

between algorithms and implementation

(7)

The appearance of life is

the first Information Megamorphosis

The appearance of the human brain is the second Information Megamorphosis

DNA ~3.7 Billion ya

Spoken languages ~60Kya

(8)

The language of numbers

positional number systems mathematics

Written languages ~5,000ya

Babylonians

our number sense is 3

(9)

Axioms Theorems

Proofs

Euclid,300BC

Greeks

Pythagoras 570-495 BC

~2,500ya

Formal languages

(10)

Logic

Syllogism Inference

...

Aristotle 384-322 BC

Greeks

•  People that are wise are Babylonians

•  Leibniz was wise

•  Leibniz was a Babylonian

our logical sense is 3

Formal languages

~2,500ya

(11)

Algorizms

~300ya

Algorizmi

780-850AD 1170-1250AD Fibonacci

Algorizms for everything!!

Gottfried Leibniz 1646-1716

~1000ya

(12)

Formal languages for ideas

Gottfried Leibniz 1646-1716

“Let us calculate without further ado, to see who is right"

Let’s Google it!!

Let’s Leibniz it!!

(13)

Algorizms and syntax boxes

Gottfried Leibniz 1646-1716

“...instead of progression by

tens, I have for many years

used the most simple of all,

which goes by two...”

(14)

The Binary

Gottfried Leibniz 1646-1716

2 symbol adder c

s

d1 d2

c

parity majority

a b m 0 0

1 0

1 0 1 1

1 1 1 0

magic box

finite universality

(15)

Gottfried Leibniz 1646-1716

We need a

language for ...

we need a

language for ...

The ‘Leibniz challenges’:

(16)

George Boole 1815–1864

~2000 years after Aristotle...

Calculus for logic,1847

“Boole was a Babylonian...”

and Calculus for

syntax boxes...1938

No perfection but…

a lot of inspiration

Shannon 1916-2001

(17)

Boolean Algebra

Huntington 1904; concise set of axioms

Edward Huntington

April 26, 1874-1952 Undergrad and Masters at Harvard

PhD at the U of Strasbourg, Germany (1901) Professor at Harvard – until 1941

“Huntington was a Greek...”

(18)

The Algebra (Boolean Calculus )

Algebraic system: set of elements B,

two binary operations + and

B has at least two elements (0 and 1) If the following axioms are true

then it is a Boolean Algebra:

A1. identity

A2. complement A3. commutative A4. distributive

(19)

consistent

independent complete

Properties of an Axiomatic System

consistent

(20)

Can we prove

‘EVERYTHING’?

Complete: Every true statement in the math theory can be derived using the axioms

Can we build

‘EVERYTHING’?

(21)

Can we prove

‘EVERYTHING’?

Is everything

‘countable’?

A simpler question:

(22)

Are infinite length binary strings countable?

1 1 0 0 0 0 0 0 0 0 0 ...

2 1 1 1 1 1 1 1 1 1 1 ...

3 0 0 0 0 0 0 0 0 0 1 ...

4 0 0 0 0 0 0 0 0 1 1 ...

5 0 0 0 0 0 0 0 1 1 1 ...

6 0 0 0 0 0 0 1 1 1 1 ...

7 0 0 0 0 0 1 1 1 1 1 ...

8 0 0 0 0 1 1 1 1 1 1 ...

9 0 0 0 1 1 1 1 1 1 1 ...

10 0 0 1 1 1 1 1 1 1 1 ...

...

... ... ... ... ... ... ... ...

Proof by contradiction:

Assume that it is countable and reach a contradiction

(23)

Are infinite length binary strings countable?

1 1 0 0 0 0 0 0 0 0 0 ...

2 1 1 1 1 1 1 1 1 1 1 ...

3 0 0 0 0 0 0 0 0 0 1 ...

4 0 0 0 0 0 0 0 0 1 1 ...

5 0 0 0 0 0 0 0 1 1 1 ...

6 0 0 0 0 0 0 1 1 1 1 ...

7 0 0 0 0 0 1 1 1 1 1 ...

8 0 0 0 0 1 1 1 1 1 1 ...

9 0 0 0 1 1 1 1 1 1 1 ...

10 0 0 1 1 1 1 1 1 1 1 ...

...

... ... ... ... ... ... ... ...

? 0 0 1 1 1 1 0 0 0 0 ...

Idea: Complement the diagonal

This string is binary and is not counted, contradiction!…

‘Diagonal argument’

George Cantor, 1891

Cantor 1845-1918

(24)

Can we prove

‘EVERYTHING’?

Is everything

‘countable’?

NO

(25)

Complete: Every true statement in the math theory can be derived using the axioms

Consistent: No contradictions in the math theory

Kurt Gödel

April 28, 1906-1978

1931: For any axiomatic system that is powerful enough to describe the arithmetic of the natural numbers:

If the system is consistent, it cannot be complete

In a consistent system there are statements that are not provable....

The key idea: represent the axiomatic system using numbers, use the diagonal argument of Cantor

(26)

Can we prove

‘EVERYTHING’?

A simple example

(27)

6, 3, 10, 5, 16, 8, 4, 2, 1

11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1

Source: wikipedia

(28)

6, 3, 10, 5, 16, 8, 4, 2, 1

11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1

Source: wikipedia

n even

n odd

Does it always reach 1?

Other options?

(29)

Which number in 1-15 has the longest sequence to reach 1?

Source: wikipedia

13, 40, 20, 10, 5, 16, 8, 4, 2, 1 16, 8, 4, 2, 1

17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1

(30)

Source: wikipedia

The number 9, a sequence with 20 numbers

7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1

Which number in 1-15 has the longest sequence to reach 1?

9, 28, 14, 7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1

(31)

Lothar Collatz

1910-1990 The Collatz conjecture (1937):

For every starting value m, the sequence always reaches 1

Verified up to some large number (2009): 5 × 260 ≈ 5.764×1018

“Empirical evidence:”

True False

Prove that it is impossible to decide

if the conjecture is true or false

(32)

Lothar Collatz

1910-1990 The Collatz conjecture (1937):

For every starting value m, the sequence always reaches 1

A generalization:

(33)

Undecidable:

Given a function f, does the Collatz sequence reach 1, for all n>0?

Undecidable even if p = 6480 is fixed The Collatz conjecture (1937):

For every starting value m, the sequence always reaches 1

This generalization is undecidable, J. Conway, 1972

We can prove that it is

impossible to decide if true or false

Open problem...

(34)

There are problems that

cannot be solved by an algorizm

Algorizmi 780-850AD

There are theorems that

cannot be proved

Euclid,300BC

There are objects that

cannot be counted

Cantor 1845-1918

Gödel 1906-1978

Turing 1912-1954

Languages:: possible

and impossible

(35)

consistent

independent

complete

Boolean Algebra is:

(36)

Boolean Algebra

Proving theorems

You have to see a giraffe to believe it exists…

Intuition is not natural… it

comes with practice

(37)

Proving theorems

Intuition is not natural… it

comes with practice

(38)

If I satisfy the

axioms then I am a Boolean Algebra

You do not need to

see it to believe it

exists!

(39)

Boolean Algebra

0-1 algebra

You can see this one

(40)

0-1 Boolean Algebra

Boolean Algebra: set of elements B={0,1},

two binary operations OR and AND xy OR(x,y)

00 01 10 11

0 1 1 1

xy AND(x,y)

00 01 10 11

0 0 0 1

0 iff both x and y are 0 1 iff both x and y are 1 Is it a Boolean Algebra?

(41)

0-1 Boolean Algebra

Boolean Algebra: set of elements B={0,1},

two binary operations OR and AND The following axioms are

obviously

true:

A1. identity

A2. complement A3. commutative A4. distributive

???

(42)

0-1 Boolean Algebra

Boolean Algebra: set of elements B={0,1},

two binary operations OR and AND A1. identity

xy AND(x,y)

00 01 10 11

0 0 0 1

xy OR(x,y)

00 01 10 11

0 1 1 1

a + 0 = a a x 1 = a

(43)

0-1 Boolean Algebra

Boolean Algebra: set of elements B={0,1},

two binary operations OR and AND A1. identity

xy AND(x,y)

00 01 10 11

0 0 0 1

xy OR(x,y)

00 01 10 11

0 1 1 1

a + 0 = a a x 1 = a 0 + 0 = 0

1 + 0 = 1

(44)

0-1 Boolean Algebra

Boolean Algebra: set of elements B={0,1},

two binary operations OR and AND A1. identity

xy AND(x,y)

00 01 10 11

0 0 0 1

xy OR(x,y)

00 01 10 11

0 1 1 1

a + 0 = a a x 1 = a 0 x 1 = 0 1 x 1 = 1

(45)

0-1 Boolean Algebra

Boolean Algebra: set of elements B={0,1},

two binary operations OR and AND A2. complement

xy OR(x,y)

00 01 10 11

0 1 1 1

xy AND(x,y)

00 01 10 11

0 0 0 1

a + a = 1 a x a = 0

(46)

0-1 Boolean Algebra

Boolean Algebra: set of elements B={0,1},

two binary operations OR and AND A2. complement

xy OR(x,y)

00 01 10 11

0 1 1 1

xy AND(x,y)

00 01 10 11

0 0 0 1

0 a complement of 1 1 a complement of 0 a + a = 1 a x a = 0 0 + 1 = 1

1 + 0 = 1

0 x 1 = 0 1 x 0 = 0

(47)

0-1 Boolean Algebra

Boolean Algebra: set of elements B={0,1},

two binary operations OR and AND A3. commutative

xy OR(x,y)

00 01 10 11

0 1 1 1

xy AND(x,y)

00 01 10 11

0 0 0 1

a + b = b + a a x b = b x a

(48)

0-1 Boolean Algebra

Boolean Algebra: set of elements B={0,1},

two binary operations OR and AND A3. commutative

xy OR(x,y)

00 01 10 11

0 1 1 1

xy AND(x,y)

00 01 10 11

0 0 0 1

a + b = b + a a x b = b x a 0 + 0 = 0 + 0

0 + 1 = 1 + 0 1 + 0 = 0 + 1 1 + 1 = 1 + 1

0 x 0 = 0 x 0 0 x 1 = 1 x 0 1 x 0 = 0 x 1 1 x 1 = 1 x 1

(49)

0-1 Boolean Algebra

Boolean Algebra: set of elements B={0,1},

two binary operations OR and AND A4. distributive a + (b x c) = (a + b) x (a + c)

a x (b + c) = (a x b) + (a x c)

xy AND(x,y)

00 01 10 11

0 0 0 1

xy OR(x,y)

00 01 10 11

0 1 1 1

(50)

0-1 Boolean Algebra

Boolean Algebra: set of elements B={0,1},

two binary operations OR and AND A4. distributive a + (b x c) = (a + b) x (a + c)

0 + (1 x 0) = (0 + 1) x (0 + 0)

xy AND(x,y)

00 01 10 11

0 0 0 1

xy OR(x,y)

00 01 10 11

0 1 1 1

1 + (0 x 0) = (1 + 0) x (1 + 0) We can check all the cases...

(51)

Now, to our

first Boolean

proof

(52)

Lemma 1:

Proof:

Self

Absorption

xy AND(x,y)

00 01 10 11

0 0 0 1

xy OR(x,y)

00 01 10 11

0 1 1 1

Is the lemma true?

Two-valued Boolean Algebra:

set of elements B={0,1},

two binary operations OR and AND ME-MYSELF&I

(53)

Lemma 1:

Proof:

A1

A2 A4 A2

A1 Q

Self

Absorption

ME-MYSELF&I

(54)

Lemma 1:

Proof:

Self

Absorption

We only proved that Need to prove

ME-MYSELF&I

Ideas?

(55)

Boolean Algebra

Duality

(56)

Duality

Theorem 0:

Any identity that is true in a Boolean algebra, is also true

if + and are interchanged, and 0 and 1 are interchanged.

(57)

Lemma 1:

Proof:

A1 A2 A4 A2 A1

ME-MYSELF&I

if + and

.

are interchanged, and 0 and 1 are interchanged

(58)

Duality

Proof: ????

Theorem 0:

Any identity that is true in a Boolean algebra, is also true

if + and are interchanged, and 0 and 1 are interchanged.

(59)

It is a syntax machine:

It is true for the axioms!

Theorem 0:

Any identity that is true algebra, is also true

if + and

.

are interchanged, and 0 and 1 are interchanged.

(60)

Back to the Axioms

Q1: Is the complement unique / well defined?

(61)

Boolean Algebra

One way to say NO

(62)

Theorem 1:

Each element of a Boolean Algebra has exactly one complement.

Proof:

One Way to Say No!

Assume that:

By Lemma 1:

??

Warm-up: First we will prove that an element is not self-complement

However by A2:

L1: Self Absorption

(63)

Theorem 1:

Each element of a Boolean Algebra has exactly one complement.

Proof:

Warm-up: First we will prove that an element is not self-complement

Q

One Way to Say No!

Assume that:

By Lemma 1:

However by A2:

Contradiction!

By duality:

0 and 1 are distinct

L1: Self Absorption

(64)

One Way to Say No!

Theorem 1:

Each element of a Boolean Algebra has exactly one complement.

Proof:

Next will prove that the complement is unique

We proved that an element is not self-complement

(65)

One Way to Say No!

Proof:

Need to prove that the complement is unique

By contradiction: Assume an element has two distinct complements

A1 A2 A4

A2 A3

(66)

One Way to Say No!

Proof:

Need to prove that the complement is unique

By contradiction: Assume an element has two distinct complements

A1 A2 A4

A2 A3

A1 A2 A4

(67)

One Way to Say No!

Proof:

Need to prove that the complement is unique

By contradiction: Assume an element has two distinct complements

Contradiction! Q

A1 A2 A4

A2 A3

A3

A2 A1

A2 A4

(68)

So far… True for any Boolean Algebra

T1: one complement per element

T0: duality principle

L1: Self Absorption

(69)

Quiz time

(70)

Quiz #5 – 10min

Prove that the following statement is true for a 0-1 Boolean algebra:

0-1 Boolean Algebra:

set of elements B={0,1}

two binary operations OR and AND xy OR(x,y)

00 01 10 11

0 1 1 1

xy AND(x,y)

00 01 10 11

0 0 0 1

References

Related documents

Hungry rats are trained to press n times on blue followed by pressing once on.. green – to

The human brain – natural languages, memory, teaching - Lecture 3: Artificial languages - numbers and writing.. (limited) memory and innovation process

5.  Ashwin Hari: The gift of musical composition 6.  Jessica Nassimi: Evolution—a gift in disguise 7.  Serena Delgadillo: The gift of self-expression 8.  Megan Keehan: Gift

The original concept referred to a flat stone covered with sand or dust, with pebbles being placed on lines drawn in the sand.

The original concept referred to a flat stone covered with sand or dust, with pebbles being placed on lines drawn in the sand.

finite number of different parts  ‘infinitely’ many structures Natural language: the composition of a small number.. of parts (letters/words) results in infinitely many

Instead of “thinking” let’s “calculate with magic

Instead of “thinking” let’s “calculate with magic