• No results found

IST 4 Information and Logic

N/A
N/A
Protected

Academic year: 2021

Share "IST 4 Information and Logic"

Copied!
66
0
0

Loading.... (view fulltext now)

Full text

(1)

IST 4

Information and Logic

(2)

mon tue wed thr fri

1 M1 1

8 M1

15 1 2 M2

22 PCP 2

29 M2

6 3

13 3 4

20 PCP 4 5

27

3 5

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

Mx= MQx out Mx= MQx due

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

PCP= Programming Challenge

Midterms

(3)

- Lecture 1: Life: DNA sequences and evolution

- Lecture 2: Human brain: natural languages

- Lecture 3: Artificial languages: numbers and writing

(limited) memory and innovation process (artificial languages)

information systems

- Lecture 4: Languages for quantities: Babylonian mathematics

- Lecture 5: Contrast: Babylonian mathematics vs Greek mathematics

- Lecture 6: Flow: Euclid to Algorizmi to Fibonacci to Leibniz

- Lecture 9: Boolean Algebra – a new language for logic

- Lecture 7: beyond arithmetic – a language of syntax boxes - Lecture 8: Leibniz – syntax for reasoning, Aristotle and Boole

(4)

Midterm Perspective

(5)

We are “memory machines”

However,

our memory sense is limited

We discovered how to augment our memory

external memories and new languages

Managing external memories algorizms and computing

(6)

The language of numbers

positional number systems mathematics

Written languages

~5,000ya Babylonians

our number sense is 3

(7)

Axioms Theorems

Proofs

Euclid,300BC

Greeks

Pythagoras 570-495 BC

~2,500ya

Formal languages

(8)

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

(9)

Algorizms

~300ya

Algorizmi

780-850AD 1170-1250ADFibonacci

It is all about (small) syntax!!

Gottfried Leibniz 1646-1716

~1000ya

(10)

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

Algorizms and syntax boxes

(11)

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!!

~300ya

(12)

Gottfried Leibniz 1646-1716

We need a

language for ...

we need a

language for ...

The ‘Leibniz challenges’:

~300ya

Aristotle

Algorizmi

(13)

George Boole 1815–1864

Calculus for logic,1847

“Boole was a Babylonian...”

and Calculus for

syntax boxes...1938

No perfection but…

a lot of inspiration

Shannon 1916-2001

~170ya

~80ya

Progress on ‘Leibniz challenges’:

(14)

Boolean Algebra

Huntington 1904; concise set of axioms

Edward Huntington

1874-1952 Undergrad and Masters at Harvard

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

“Huntington was a Greek...”

(15)

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

(16)

consistent

independent complete

Properties of an Axiomatic System consistent

(17)

Can we prove

‘EVERYTHING’?

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

Can we build

‘EVERYTHING’?

(18)

Can we prove

‘EVERYTHING’?

Is everything

‘countable’?

A simpler question:

(19)

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

(20)

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

(21)

Can we prove

‘EVERYTHING’?

Is everything

‘countable’? NO

(22)

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

Consistent: No contradictions in the math theory

Kurt Gödel

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

@IAS Princeton

(23)

Can we prove

‘EVERYTHING’?

A simple example

(24)

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

(25)

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? cycle or infinity

(26)

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

(27)

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

(28)

Lothar Collatz

1910-1990 The Collatz conjecture (1937):

For every starting value m, the sequence always reaches 1

Verified up to some large number (2017): 87 x 260

“Empirical evidence:”

True False

Prove that it is impossible to decide if the conjecture is true or false

(29)

Lothar Collatz

1910-1990 The Collatz conjecture (1937):

For every starting value m, the sequence always reaches 1

A generalization:

1/2 3

0 1

p equations:

(30)

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...

(31)

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

(32)

consistent

independent complete

Boolean Algebra is:

(33)

Boolean Algebra

Proving theorems Syntax, syntax, syntax

Intuition is not natural… it comes with practice

(34)

Boolean Algebra

A simple example 0-1 algebra

(35)

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?

(36)

If I satisfy the

axioms then I am a Boolean Algebra

(37)

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

???

(38)

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

(39)

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

(40)

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

(41)

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

(42)

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

(43)

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

(44)

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

(45)

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

(46)

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...

(47)

Now, to our

first

Boolean

proof

(48)

Lemma 1:

Proof:

AbsorptionSelf

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

(49)

Lemma 1:

Proof: A1

A2 A4 A2

A1 Q

AbsorptionSelf

ME-MYSELF&I

(50)

Lemma 1:

Proof:

AbsorptionSelf

We only proved that Need to prove

ME-MYSELF&I

Ideas?

(51)

Boolean Algebra

Duality

(52)

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.

(53)

Lemma 1:

Proof:

A1 A2 A4 A2 A1

ME-MYSELF&I

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

(54)

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.

(55)

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.

(56)

Back to the Axioms

Q1: Is the complement unique / well defined?

(57)

Boolean Algebra

One way to say NO

(58)

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

(59)

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

(60)

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

(61)

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

(62)

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

(63)

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

(64)

So far… True for any Boolean Algebra

T1: one complement per element

T0: duality principle

L1: Self Absorption

(65)

Quiz time

(66)

Quiz #7 – 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

No need to use the axioms!

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