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

Post on 15-Jul-2020

0 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

IST 4Information and Logic

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

It is all about Algorizmi780-850AD Gottfried Leibniz

1646-1716???

George Booleg1815 –1864

Boolean Proofs: Axioms + Fun

Proof Dependency

A1 A4

Dependency

A1-A4

L1 T1L2 T0

T2

T3

T4

Core Ideain a Proof

A1 A4

in a Proof

A1-A4

L1 T1L2 T0

Core Ideain a Proof

A1 A4

in a Proof

A1-A4

L1 T1L2 T0

P fProofscreating

“simple and correct” simple and correct proofs

How to create“simple and correct” proofs?

lHenri Poincaré Mathematical CreativityHenri Poincaré1854-1912

French mathematician- Topologyp gy- Chaos - Relativity

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

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

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

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 .

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

B l Al bBoolean AlgebraBoolean is not Binary...

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

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|

Example: S =

Operations: union and intersection

Elements:

Complement:

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

S t O tiSet Operationsgraphical representation

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

Algebra of Subsets: OperationsAlgebra of Subsets Operations

A B

+ is union of sets:

A B

Algebra of Subsets: OperationsAlgebra of Subsets Operations

A B

is intersection of sets:

A B

John Venn 1834 1923

Venn Diagram

1834 - 1923

ACA B ABC

AC

C

B C

A

B C

DD

BCD

ABCD

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

3

Source: Wikipedia

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

3

Source: Wikipedia

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

3

Source: Wikipedia

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

3

Source: Wikipedia

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

3

Source: Wikipedia

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

3

Source: Wikipedia

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

3

Source: Wikipedia

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

3

10

2

1

1

0

3

2

2 32

21

Source: Wikipedia

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

5

55

Source: WikipediaConstruction due to Edwards

6

Source: WikipediaConstruction due to Edwards

6

Source: WikipediaConstruction due to Edwards

6

44

63

1 6 15 20 15 6 1

Source: Wikipedia

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

Construction due to Edwards

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

Example: S =

Operations: union and intersection

Elements:

Complement:

Algebra of SubsetsAlgebra of Subsets

Union

Algebra of SubsetsAlgebra of Subsets

Intersection

Is the Algebra of Subsets Boolean?

YES

??

A = A

A S A

A ASA S = A S

Algebra of SubsetsAlgebra of Subsets

Union

A = A

Algebra of SubsetsAlgebra of Subsets

Intersection

A S = A

Is the Algebra of Subsets Boolean?

YES

??

AA = SA

??

A ASA A =

Is the Algebra of Subsets Boolean?

YES

union and intersectionare commutative

A Bare commutative

Is the Algebra of Subsets Boolean?

YES

A B A BA B

C

A B

C

Is the Algebra of Subsets Boolean?

YES

A B A BA B

C

A B

C

Is the Algebra of Subsets Boolean?

YES

A B A BA B

C

A B

C

Absorption Theoremp

Th 2Theorem 2:

A B

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

Boolean algebraBoolean algebra0 1 vectors0-1 vectors |s|

S =

Corresponding 0-1 vectors:

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

Elements:

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

01 1100 10

( ), ( ), ( ), ( )

01 1100 10

0000

10

01

11

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

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

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

Boolean algebraBoolean algebraBoolean integersBoolean integers |s|

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

Least Common Multiple

297 = 3x3x3x11 4455 = 3x3x3x3x5x11405 = 3x3x3x3x5

Greatest Common Divisor

297 = 3x3x3x11 27 = 3x3x3405 = 3x3x3x3x5

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

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

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

Two illuminating questions:Two illuminating questions:

1. Why does it work only for Boolean integers?

2. What is the complement?

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

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

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:

Arithmetic / SubsetsArithmetic / Subsets

1 2 3 6lcm

1 1 2 3 6

2 22 6 6

3 63 3 6

6 66 6 6

Arithmetic / SubsetsArithmetic / Subsets

gcd 1 2 3 6

1 1 1 1 1

2 2 21 1

3 3 31 1

6 6321

Boolean algebraBoolean algebraan amazing theoreman amazing theorem

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

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

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

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

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

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

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

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

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

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

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!

One week!

3Prove 1 Prove 2

1 2 4

multiply

Need to provide a complete proof

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

top related