ist 4 information and logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114...

85
IST 4 Information and Logic

Upload: others

Post on 15-Jul-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

IST 4Information and Logic

Page 2: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

mon tue wed thr fri31 M1 1= todayT

7 M1

14 1 2M2x= hw#x out

= todayT

oh oh

oh oh

21 228 M2

x= hw#x due

idt

oh oh

h h28 M2

5 312 3 4Mx= MQx out

midterms

T

oh

oh oh

oh = office hours oh

12 3 419 4 526

Mx= MQx out

Mx= MQx dueoh oh

ohoh

26

2 5oh

oh

oh

oh

Page 3: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

It is all about Algorizmi780-850AD Gottfried Leibniz

1646-1716???

George Booleg1815 –1864

Page 4: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Boolean Proofs: Axioms + Fun

Page 5: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Proof Dependency

A1 A4

Dependency

A1-A4

L1 T1L2 T0

T2

T3

T4

Page 6: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Core Ideain a Proof

A1 A4

in a Proof

A1-A4

L1 T1L2 T0

Page 7: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Core Ideain a Proof

A1 A4

in a Proof

A1-A4

L1 T1L2 T0

Page 8: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

P fProofscreating

“simple and correct” simple and correct proofs

Page 9: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

How to create“simple and correct” proofs?

lHenri Poincaré Mathematical CreativityHenri Poincaré1854-1912

French mathematician- Topologyp gy- Chaos - Relativity

WooooooW- WooooooW.....- .........

Page 10: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Henri Poincaré1854-1912

What is Mathematical Creation?What is Mathematical Creation?“It does not consist in making new combinations with mathematical entities already known Any one could do mathematical entities already known. Any one could do that...”

vnIeiontn csioiche“To create consists precisely in not making uselesscombinations and in making those which are useful and

vnIeiontn...csioiche

combinations and in making those which are useful and which are only a small minority. Invention is discernment, choice.”

Invention is choice...

Page 11: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Henri Poincaré1854-1912

Start with ignorance...“For fifteen days I strove to prove that there could not be any functions like those I have since called Fuchsian functions. I was then very ignorant; every day I seated myself at myI was then very ignorant; every day I seated myself at mywork table, stayed an hour or two, tried a great number of combinations and reached no results....”

“One evening, contrary to my custom, I drank black coffee d ld l d d f l h

Persistent work... have a break...

and could not sleep. Ideas rose in crowds; I felt them collide until pairs interlocked, so to speak, making a stablecombination..”“...the next morning I had established the existence of a class of Fuchsian functions...”

Page 12: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Henri Poincaré1854-1912

Work... and relax...“Often when one works at a hard question, nothing good is accomplished at the first attack.”p

“Then one takes a rest, longer or shorter, and sits gdown anew to the work.”

““During the first half-hour, as before, nothing is found, and then all of a sudden the decisiveidea presents itself to the mind.”a pr s nts ts f to th m n .

Page 13: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Henri Poincaré1854-1912

Conscious and unconscious“It might be said that the conscious work has been more fruitful because it has been interrupted and the prest has given back to the mind its forceand freshness.”

“But it is more probable that this rest has been

Rest vs unconscious work...But it is more probable that this rest has been

filled out with unconscious work and that the result of this work has afterwards revealed it lf ”itself...”

Page 14: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

B l Al bBoolean AlgebraBoolean is not Binary...

Page 15: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Examples of Boolean Algebrasp g

• 0-1 (two valued) Boolean algebra OR / ANDOR / AND

• Arithmetic Boolean algebras moreglcm / gcd

l b f b

more

• Algebra of subsetsunion / intersection

next

• 0-1 vectors next

Page 16: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Algebra of SubsetsAlgebra of Subsets

S is the set of all pointsS is the set of all points

Elements: all possible subsets of a set Sp

+ is union of sets:is intersection of setsis intersection of sets

How many elements? 2|s|

Page 17: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Example: S =

Operations: union and intersection

Elements:

Complement:

Page 18: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Algebra of SubsetsAlgebra of Subsets

Students at Caltech – the “points”Students at Caltech the points

Houses – some of the “elements”

Blacker, Dabney, Fleming, Ricketts 1931

Lloyd, Page, Ruddock

A

1960

1996Avery 1996

An inter-house is a union-houseAn inter house is a union house

Page 19: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

S t O tiSet Operationsgraphical representation

Page 20: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Algebra of SubsetsAlgebra of Subsets

Elements: all possible subsets of a set S

+ is union of sets:

Elements: all possible subsets of a set S

+ is union of sets:is intersection of sets:

A AComplement A

Page 21: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Algebra of Subsets: OperationsAlgebra of Subsets Operations

A B

+ is union of sets:

A B

Page 22: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Algebra of Subsets: OperationsAlgebra of Subsets Operations

A B

is intersection of sets:

A B

Page 23: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

John Venn 1834 1923

Venn Diagram

1834 - 1923

ACA B ABC

AC

C

B C

A

B C

DD

BCD

ABCD

Page 24: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Construction due to Anthony Edwards, Cambridge U., UK1935-

3

Source: Wikipedia

Page 25: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Construction due to Anthony Edwards, Cambridge U., UK1935-

3

Source: Wikipedia

Page 26: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Construction due to Anthony Edwards, Cambridge U., UK1935-

3

Source: Wikipedia

Page 27: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Construction due to Anthony Edwards, Cambridge U., UK1935-

3

Source: Wikipedia

Page 28: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Construction due to Anthony Edwards, Cambridge U., UK1935-

3

Source: Wikipedia

Page 29: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Construction due to Anthony Edwards, Cambridge U., UK1935-

3

Source: Wikipedia

Page 30: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Construction due to Anthony Edwards, Cambridge U., UK1935-

3

Source: Wikipedia

Page 31: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Construction due to Anthony Edwards, Cambridge U., UK1935-

3

10

2

1

1

0

3

2

2 32

21

Source: Wikipedia

Page 32: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

4How many subsets?

24 = 16

0 11,4,6,4,1

11

22

4

1 2

2

3

3 422 33

1 2

Source: WikipediaConstruction due to Edwards

Page 33: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

5

55

Source: WikipediaConstruction due to Edwards

Page 34: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

6

Source: WikipediaConstruction due to Edwards

Page 35: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

6

Source: WikipediaConstruction due to Edwards

Page 36: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

6

44

63

1 6 15 20 15 6 1

Source: Wikipedia

1, 6, 15, 20, 15, 6, 1

Construction due to Edwards

Page 37: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

What are 0 and 1?

empty set everything

Algebra of Subsets

Elements: all possible subsets of S (there are 2 subsets)|s|Elements all possible subsets of S (there are 2 subsets)

Operations: union and intersection

Page 38: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Example: S =

Operations: union and intersection

Elements:

Complement:

Page 39: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Algebra of SubsetsAlgebra of Subsets

Union

Page 40: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Algebra of SubsetsAlgebra of Subsets

Intersection

Page 41: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Is the Algebra of Subsets Boolean?

YES

??

A = A

A S A

A ASA S = A S

Page 42: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Algebra of SubsetsAlgebra of Subsets

Union

A = A

Page 43: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Algebra of SubsetsAlgebra of Subsets

Intersection

A S = A

Page 44: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Is the Algebra of Subsets Boolean?

YES

??

AA = SA

??

A ASA A =

Page 45: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Is the Algebra of Subsets Boolean?

YES

union and intersectionare commutative

A Bare commutative

Page 46: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Is the Algebra of Subsets Boolean?

YES

A B A BA B

C

A B

C

Page 47: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Is the Algebra of Subsets Boolean?

YES

A B A BA B

C

A B

C

Page 48: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Is the Algebra of Subsets Boolean?

YES

A B A BA B

C

A B

C

Page 49: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Absorption Theoremp

Th 2Theorem 2:

A B

Page 50: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Examples of Boolean Algebrasp g

• 0-1 (two valued) Boolean algebra OR / ANDOR / AND

• Arithmetic Boolean algebras moreglcm / gcd

l b f b

more

• Algebra of subsetsunion / intersection

• 0-1 vectors next

Page 51: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Boolean algebraBoolean algebra0 1 vectors0-1 vectors |s|

Page 52: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

S =

Corresponding 0-1 vectors:

(10)(00) (11) (01)

Elements:

Page 53: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Elements are: (00), (11), (10), (01)

01 1100 10

( ), ( ), ( ), ( )

01 1100 10

0000

10

01

11

Page 54: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Union? Bitwise OR

Elements are: (00), (11), (10), (01)

01 1100 10

( ), ( ), ( ), ( )

01 1100 10

00 00 10 01 1100

10

00 10 01 11

10 10 11 11

01 01 1111 01

11 11 111111

Page 55: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Intersection? Bitwise AND

Elements are: (00), (11), (10), (01)

Bitwise AND ( ), ( ), ( ), ( )

01 1100 10 01 1100 10

00 00 00 00 0000

10

00 00 00 00

00 10 00 10

01 00 00 01 01

11 00 10 01 11

Page 56: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Examples of Boolean Algebrasp g

• 0-1 (two valued) Boolean algebra OR / ANDOR / AND

• Arithmetic Boolean algebras moreglcm / gcd

l b f b

more

• Algebra of subsetsunion / intersection

• 0-1 vectors

Page 57: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Boolean algebraBoolean algebraBoolean integersBoolean integers |s|

Page 58: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Bunitskiy Algebra1899

Euclid, 300BCGeorge Boole1815 –1864

1899

Boolean Integers2 x 3 x 5 = 302 x 3 x 7 = 42

Every prime in the prime factorization is a power of one (square-free integer)Elements:

The set of divisors of a Boolean integerThe set of divisors of a Boolean integer

{1,2,3,5,6,10,15,30}

The operations: lcm and gcdThe operations: lcm and gcd

The 0 and 1 elements: 1 and 30

Page 59: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Least Common Multiple

297 = 3x3x3x11 4455 = 3x3x3x3x5x11405 = 3x3x3x3x5

Page 60: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Greatest Common Divisor

297 = 3x3x3x11 27 = 3x3x3405 = 3x3x3x3x5

Page 61: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Euclid, 300BCGeorge Boole1815 –1864 Bunitskiy Algebra

1899

The set of elements: {1,2,3,6}

1899

f { , , , }

The operations: lcm and gcd1 is Boolean 0 6 is Boolean 1

lcm = lowest common multipled d

1 is Boolean 0 6 is Boolean 1

gcd = greatest common divisor

Elements: Set of divisors of an integerElements: Set of divisors of an integer

Page 62: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Is Bunitskiy Algebra a Boolean Algebra?Is Bunitskiy Algebra a Boolean Algebra?YES

6 = 3x2 11

LCM GCD

3 = 3 10 11 01

2 = 2 01Bitwise OR Bitwise AND

1 = 1 00

D

Page 63: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Is Bunitskiy Algebra a Boolean Algebra?Is Bunitskiy Algebra a Boolean Algebra?

30 = 5X3x2 111

YES

30 = 5X3x2

15 = 5X3

111LCM GCD

110

10 = 5X2

6 = 3X2

101

011 111100

6 3X2

100

011

Bitwise OR Bitwise AND5 = 5

D3 = 3

2 = 2

010

0012 = 2

1 = 1

001

000

Page 64: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Two illuminating questions:Two illuminating questions:

1. Why does it work only for Boolean integers?

2. What is the complement?

Page 65: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

For which n d s it k?does it work?

6 2 36 = 2 x 3

a and a together must

1 62 3

have all the factors of n

2 33 26 1

a and a can not share factorsneed to be relatively prime6 1 need to be relatively prime

Prime factors appear at most once in n pp

Page 66: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Examples of Boolean Algebrasp gSize 2k They are isomorphic!

• 0-1 (two valued) Boolean algebra OR / ANDOR / AND

• Arithmetic Boolean algebrasglcm / gcd

l b f b• Algebra of subsetsunion / intersection

• 0-1 vectors

Page 67: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Arithmetic Boolean AlgebrasI hi t Al b f S b t Isomorphic to Algebra of Subsets

The set of divisors of a Boolean integerThe set of divisors of a Boolean integer

{1,2,3,6}

The operations: lcm and gcd

The special elements: 1 and 6

Isomorphic to:

Page 68: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Arithmetic / SubsetsArithmetic / Subsets

1 2 3 6lcm

1 1 2 3 6

2 22 6 6

3 63 3 6

6 66 6 6

Page 69: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Arithmetic / SubsetsArithmetic / Subsets

gcd 1 2 3 6

1 1 1 1 1

2 2 21 1

3 3 31 1

6 6321

Page 70: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Boolean algebraBoolean algebraan amazing theoreman amazing theorem

Page 71: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Representation Theorem (Stone 1936):Representation Theorem (Stone 1936):Every finite Boolean algebra is isomorphic to a Booleanalgebra of subsets of some finite set S.

Algebra 1 Algebra 2

elements elements

operations operations

Page 72: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Marshall StoneMarshall Stone

1903-1989

Proved in 1936 90AB = years After BooleyThe Boolean Syntax invented in 1847 has a unique representative semantic!!!M h ll d H d i 1919 Marshall entered Harvard in 1919 intending to continue his studies at Harvard law school; fell in love with

Harlan Fiske Stone12th Ch f J f h

Mathematics, and the rest is history…

12th Chief Justice of the US1941-1946

Marshall had a passion for travel He began Marshall had a passion for travel. He began traveling when he was young and was on a trip to India when he died....

Page 73: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

R t ti Th (St 1936)Representation Theorem (Stone 1936):Every finite Boolean algebra is isomorphic to a Booleanl b ith l t b i bit t f fi it l th algebra with elements being bit vectors of finite length

with bitwise operations OR and AND

Two Boolean algebras with m elements are isomorphic

Every Boolean algebra has 2 elementsk

Provides intuition beyond the axioms:We can ‘naturally’ reason about results in Boolean algebra

Every Boolean algebra has 2 elements

We can naturally reason about results in Boolean algebra

Page 74: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Boolean algebraBoolean algebrait is 0 1 it is 0-1... |s|

Page 75: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

The 0-1 Theorem

0-1 Theorem:0 1 Theorem:An identity is true for any finite Boolean algebra if and only if it is true for a two valued (0-1)Boolean algebra

Proof: h dProof: The easy direction

Assume an identity true for any finite Boolean algebraAssume an identity true for any finite Boolean algebra

True for 0-1 Boolean algebraTrue for 0 1 Boolean algebra

Page 76: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

The 0-1 Theorem

0-1 Theorem:0 1 Theorem:An identity is true for any finite Boolean algebra if and only if it is true for a two valued (0-1)

Proof: h b d

Boolean algebra.

Proof: The non-obvious directionAssume an identity true for a 0-1 Boolean algebraNeed to prove true for any finite Boolean algebra

The key: Stone’s representation theoremy pwlog we can consider bit vectors

Page 77: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Absorption Theoremp

Th 2Theorem 2:

Proof: The identity is true for 0 1 Boolean algebraProof: The identity is true for 0-1 Boolean algebra

0 + 0 0 = 0×0 + 0 1 = 0×1 1 0 11 + 1 0 = 1×1 + 1 1 = 1×

Need to prove it for any Boolean algebra

Page 78: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Example: 0-1 Theoremp

Th 2

By contradiction Assume true for all 0-1 assignmentsand not true for some other assignment

Theorem 2:

Proof (for general algebra):Hence, there must be iti i th bi Proof (for general algebra):

If an identity is not true in general; then there is an assignment of

a position in the binary vector that is violated

g m felements that violates the equality

There exists a 0-1 assignment to the identity that violates the equality, CONTRADICTION!!

Page 79: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Recap: The 0-1 TheorempAn identity is true for any finite Boolean algebra if and only if it is true for a two valued (0-1)Boolean algebra.

Proof: The easy direction• Assume an identity true for any finite Boolean algebra

• 0-1 is a special case: True for 0-1 Boolean algebraThe non-obvious direction• Assume an identity true for a 0-1 Boolean algebra

CONTRADICTION!!

Q• Need to prove true for any finite Boolean algebra• The key: Stone’s representation theorem

A th i t l ‘id tit i l ti ’ i t• Assume there exists a general ‘identity violating’ assignment

• Show that there is a 0-1 ‘identity violating’ assignment

Page 80: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

The 0-1 Theorem: Why Only Identities?Why Only Identities?

Cl 0 1 B l l bClaim: Assume 0-1 Boolean algebra

If

Then or

Proof: xy OR(x,y)000110

01110

1111

Q

Page 81: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

The 0-1 Theorem: Why Only Identities?Why Only Identities?

Cl b B l l bClaim: Arbitrary Boolean algebra

If

Then or Proof: Claim is NOT TRUE in general!

Page 82: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

One week!

Page 83: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

3Prove 1 Prove 2

1 2 4

multiply

Page 84: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND
Page 85: IST 4 Information and Logic - paradise.caltech.eduparadise.caltech.edu/ist4/lectures/lect 1114 p.pdfExamppgles of Boolean Algebras • 0-1 (two valued) Boolean algebra OR / AND

Need to provide a complete proof

For (c): Sum of products (no need to expand to DNF)