IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf ·...

103
IST 4 Information and Logic

Transcript of IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf ·...

Page 1: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

IST 4Information and Logic

Page 2: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

mon tue wed thr fri31 M1 1= todayT

7 M1

14 1 2M2x= hw#x out

= todayT

T

oh oh

oh oh

21 228 M2

x= hw#x due

idt

oh oh

h h28 M2

5 312 3 4Mx= MQx out

midtermsoh

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 - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

Last lecture: Associative Memories, Yue Li

William Scoville(1906 – 1984)

Brenda Milner(1918 - )

Henry Molaison or H. M. (1926-2008)Suzanne Corkin

Alexander Luria(1902 – 1977)

J h FSarnoff A. Mednick

Joshua Foer

Page 4: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

MQ2Q

Page 5: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

MemoryMQ2• You are invited to write short essay on the topic of theM t Q ti

QDeadline Thursday 4/29/2014 at 10pm

Magenta Question.• Recommended length is 3 pages (not more)• Submit the essay in PDF format to [email protected] the essay in PDF format to [email protected]

file name lastname-firstname.pdf• No collaboration. No extensionsGrading of MQ:3 points (out of 103)

50% for content quality, 50% for writing quality

Some students will be given an opportunityto give a short presentation for up to 3 additional points

Page 6: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

A word that is associated with the following?with the following?

Page 7: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

Life: Unique Origin – 3.5 Bya

Origins ??Memory

DNA

Novelty Novelty Selection?Editing? Mutation?g

New species?

Page 8: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

Human brain: Unique Origin:2 000 l

Origins2,000 people in Africa – 60 Kyag

Memoryy

m yLanguages

Novelty g g

Novelty Interaction, editing, selection , g,

New ideas/languages

Page 9: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

Funes the MemoriousWill be posted on the class website

Funes the MemoriousA short story by: Jorge Luis Borges

1899-19861899 1986

“With no effort, he had learned English French Portuguese andEnglish, French, Portuguese andLatin. I suspect, however, that he was not very capable of thought.”

“To think is to forget differences, generalize make abstractions Ingeneralize, make abstractions. Inthe teeming world of Funes, there were only details, almost immediate in th i ”their presence.”

Page 10: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

Babylonian Clay Tablets G k P fGreek Proofs...

Memoryyof mathematical knowledge

Page 11: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

MCMXX = 1930MCMXX = 1930

Page 12: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

Some History on Roman Numeralsy

Origins of roman numerals are believed to be Origins of roman numerals are believed to be in the form of notches on tally sticks, such as those used by European shepherds

Page 13: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

The Roman Numeral Puzzle: Very slow impact of the

Babylonians???Babylonians???Positional number

Babylonia 5,000 yasystem influence

Greek, India, Chinese 2,500 ya

Persia, Arabs 1,500 ya

Europe 500 ya

Page 14: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

The Syntax of Roman Numerals

Page 15: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

A Refresher on the Roman Numeral SystemRoman Numeral System

Roman Numeral Number Large

Roman NumberI 1V 5

NumeralsV 5,000

X 10L 50

X 10,000L 50,000C 100 000C 100

D 500M 1000

C 100,000D 500,000M 1 000 000M 1000 M 1,000,000

LCD Monitor

Page 16: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

The Abacus: It’s all About SyntaxIt s all About Syntax

VLDVIIIII V VLDVIIIII

XXXXX

V

L

CCCCC D

MMMMM V

IXCM

LL C

VV X

LL

DD

C

M

Page 17: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

The Abacus: It’s all About Syntax

VLDVIIIII V

It s all About SyntaxWhat is the number?

VLDVIIIII

XXXXX

V

L

CCCCC D

MMMMM V

IXCM

LL C

VV X

LL

DD

C

M

Page 18: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

The Abacus: It’s all About Syntax

VLDVIIIII V

It s all About SyntaxWhat is the number?

VLDVIIIII

XXXXX

V

L

CCCCC D

MMMMM V

IXCM

LL C

VV X

LL

DD

C

MDCI 601

Page 19: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

The Abacus: It’s all About Syntax

VLDVIIIII V

It s all About Syntax

Touch the middle: Yes or NoVLDVIIIII

XXXXX

V

Lit is a binary mechanism

CCCCC D

MMMMM V

IXCM

LL C

VV X

LL

DD

C

MDCI 601

Page 20: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

The AbacusCalculating Machine are Based on Syntax

The first actual calculating mechanism known to us is th b s hi h is th ht t h b n in nt d

Calculating Machine are Based on Syntax

the abacus, which is thought to have been invented by the Babylonians sometime between 1,000 BC and 500 BC

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

Source: Wikipedia

Page 21: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

The AbacusCalculating Machine are Based on Syntax

The original concept referred to a flat stone covered

Calculating Machine are Based on Syntax

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

?

In Phoenician the word abak means sand

In Hebrew the word abhaq ָאָבק means dust

Calculus is Latin for pebble

Source: Wikipedia

Page 22: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

The Abacus: It’s all About Syntax

VLDVIIIII V

It s all About Syntax

VLDVIIIII

XXXXX

V

L

CCCCC D

MMMMM V

IXCM

LL C

VV X

LL

DD

C

MDCI 601

Page 23: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

The Abacus: It’s all About Syntax

VLDVIIIII V

It s all About SyntaxWhat is the number?

VLDVIIIII

XXXXX

V

L

CCCCC D

MMMMM V

IXCM

LL C

VV X

LL

DD

C

MCCCCLXXXVIIII 489

Page 24: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

The Abacus: It’s all About Syntax

VLDV

It s all About Syntax

VLDV

IXCM

CCCCLXXXVIIII 489DCI 601 +

Page 25: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

The Abacus: It’s all About Syntax

VLDV

It s all About Syntax

VLDV

IXCM

CCCCLXXXVIIII 489DCI 601 +

Page 26: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

The Abacus: It’s all About Syntax

VLDV

It s all About Syntax

VLDV

IXCM

CCCCLXXXVIIII 489DCI 601 +

Page 27: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

The Abacus: It’s all About Syntax

VLDV

It s all About Syntax

VLDV

IXCM

CCCCLXXXVIIII 489DCI 601 +

Page 28: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

The Abacus: It’s all About Syntax

VLDV

It s all About Syntax

VLDV

IXCM

CCCCLXXXVIIII 489DCI 601 +

Page 29: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

The Abacus: It’s all About Syntax

VLDV

It s all About Syntax

VLDV

IXCM

CCCCLXXXVIIII 489DCI 601 +

Page 30: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

The Abacus: It’s all About Syntax

VLDV

It s all About Syntax

VLDV

IXCM

CCCCLXXXVIIII 489DCI 601 +

Page 31: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

The Abacus: It’s all About Syntax

VLDV

It s all About Syntax

VLDV

IXCM

CCCCLXXXVIIII 489DCI 601 +

Page 32: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

The Abacus: It’s all About Syntax

VLDV

It s all About Syntax

VLDV

IXCM

CCCCLXXXVIIII 489DCI 601 +

Page 33: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

The Abacus: It’s all About Syntax

VLDV

It s all About Syntax

VLDV

IXCM

CCCCLXXXVIIII 489DCI 601 +

Page 34: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

The Abacus: It’s all About Syntax

VLDV

It s all About Syntax

What is the decimal VLDVWhat is the decimal representation?

MLXXXX ??

IXCM

CCCCLXXXVIIII 489DCI 601 +

Page 35: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

The Abacus: It’s all About Syntax

VLDV

It s all About Syntax

What is the decimal VLDVWhat is the decimal representation?

MLXXXX 0901

IXCMWhat’s wrongwith this picture?

CCCCLXXXVIIII 489DCI 601 +

Page 36: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

Roman Numerals and Base 10 Systemsy

VLDVMLXXXX VLDVMLXXXXRoman numerals

The representation in the abacusis a positional base 10 representation

0901m um

used for numberRepresentation

is a positional base 10 representation

For calculation:we used the abacus

IXCMwe used the abacus

Page 37: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

From Physical (abacus) From Physical (abacus) to Symbols

Algorizmsg

Page 38: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

Algorizmig

A positional number system Operations are done on syntaxp yis a key enabler for efficient arithmetic operations

Operations are done on syntax

Muhammad ibn Mūsā al-Khwārizmī

الخوارزمي موسى بن محمد 780 850ADي رز و ى و 850AD-780 بن

A Persian mathematician, who wrote on Hindu-Arabic numerals and was among the first to use zero as a place numerals and was among the first to use zero as a place holder in positional base notation. The word algorithm derives from his name. His book Kitab al-jabr w'al-muqabala gives us the word algebra

Source: Wikipedia

Page 39: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

The Beginning of the “Algebra Book ” by “Algorizmi ”

Everything requires computation...

Page 40: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

The Beginning of the “Algebra Book ” by “Algorizmi ”

Positional: order is important; from 1 to infinity...

Page 41: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

Example from the “Algebra Book ” by “Algorizmi ”computation = syntax manipulation

????

It is rhetorical (words) no symbols

Page 42: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

Algorithms and Algebra in Europeg g pLeonardo Fibonacci1170-1250AD Leonardo was born in Pisa his father directed Leonardo was born in Pisa, his father directed

a trading post in Bugia, a port east of Algiers in North Africa, as a young boy Leonardo traveled there to help him This is where he learned about there to help him. This is where he learned about the Arabic numeral system

Perceiving that arithmetic with Arabic numerals is simpler and more efficient than with Roman numerals, Fibonacci traveled ,throughout the Mediterranean world to study under the leading Arab mathematicians of the time, returning around 1200. t me, return ng around 00. In 1202, at age 32, he published what he had learned in Liber Abaci, or Book of Calculation

Source: Wikipedia

Page 43: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

Liber Abaci – First ChapterL F p

Introduction of the syntax; from 1 to infinity...

Page 44: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

Liber Abaci – First ChapterL F p

Positional: order is importantPositional: order is important

Page 45: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

al-Khwarizmi Dear Caltech students al Khwarizmi780-850AD an algorizm is a procedure

for syntax (language) i ( iti )processing (composition)

Dear Mr. Algorizmi, how would you define an algorithm??? Thank you!

Page 46: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

In first grade:We use our BRAIN for remembering We use our BRAIN for remembering

Algorizmi’s syntax

Page 47: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

In first grade:We use our BRAIN for remembering We use our BRAIN for remembering

Algorizmi’s syntax

Avoiding headaches!U b f b i Use syntax-boxes for remembering

Algorizmi’s syntaxg y

Page 48: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

Syntax BoxesSyntax Boxescomposition and magiccomposition and magic

Page 49: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

Syntax Manipulation with Boxesy p

ba b

inputs

a b o

S-Box

outputso

p

Page 50: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

Syntax Manipulation with Boxesy p

b0 0

inputs

a b o

0 0 0

outputs0

p

Page 51: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

Syntax Manipulation with Boxesy p

b0 1

inputs

a b o

0 0 010 1

outputs1

p

Page 52: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

Syntax Manipulation with Boxesy p

b0 2

inputs

a b o

0 0 010

0 212

outputs2

p

Page 53: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

Syntax Manipulation with Boxesy p

b1 2

inputs

a b o

0 0 010

0 212

21 2

outputs

21 2

2p

Page 54: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

Syntax Manipulation with Boxesy p

b2 1

inputs

a b o

0 0 010

0 212

21 2

outputs

2

1

1

2

2

22p 12 2

Page 55: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

Syntax Manipulation with Boxesy p

bCan we ‘compute’ max (a,b,c) with this s-box?

a binputs

a b o

0 0 010

0 21 0

1211 0

12

11

112

?outputs

201

122

222o

p 1222

22

o = max (a,b)

Page 56: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

Syntax Manipulation with Boxesy p

o = max (a,b)Can we ‘compute’ max (a,b,c) with this s-box?

a b

Page 57: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

Syntax Manipulation with Boxesy p

Can we ‘compute’ max (a,b,c) with this s-box? o = max (a,b)

a b Composition:build big s-boxes

c

build big s boxes from small s-boxes

c

Page 58: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

Syntax Manipulation with Boxesy p

bCan we ‘compute’ zwith the max s-box?

a ba b o

0 0 0

with the max s box?

?10

0 21 0

121

a b z

0 0 0 1 012

11

112

0 010

1 0

011 2

01

122

222

1 011

11

o 1222

22

o = max (a,b)YES

Page 59: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

Syntax Manipulation with Boxesy p

bCan we ‘compute’ wwith the max s-box?

a ba b o

0 0 0

with the max s box?

?10

0 21 0

121

a b w

0 0 0 1 012

11

112

0 010

1 0

011 2

01

122

222

1 011

10

o 1222

22

o = max (a,b)NO Why not?

Page 60: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

Syntax Manipulation with Boxesy p

Can we ‘compute’ wwith the max s-box? Composition:

a b

with the max s box?

?

pbuild big s-boxes from small s-boxes

a b

0 0 0

The output of every small s-box is bigger or equal to its inputs

w

Big s-box0 0

101 0

011

or equal to its inputs

1 011

10 The output of the big

s-box must be bigger l t it i t

w

or equal to its inputsNO Why not?

Page 61: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

fi it i lIs there a finite universal set of building blocks?

‘ thi ’Can construct ‘everything’.The most important idea in InformationThe most important idea in Information

DNAABCDE DNAABCDE...

Page 62: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

A Magic (Universal) Boxg ( )

A binary s box that can A binary s-box that can compute any binary s-box?

a ba b m

p y y

a b m

0 010

1110

1 011

110

HW#1

11 0m

Page 63: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

A Magic Boxg

Can you compute the min(x,y)

Can you compute the following with the magic box?

a ba b m x y oa b m

0 010

11

x y

0 010

o

0010

1 011

110

101 0

11

00111 0

m11 1

Page 64: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

A Magic BoxHint 1: g

Can you compute the

Hint 1: min(x,y)

Can you compute the following with the magic box?

a ba b m x y oa b m

0 010

11

x y

0 010

o

0010

1 011

110

101 0

11

00111 0

m11 1

Page 65: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

A Magic BoxHint 2: g

Can you compute the

Hint 2: min(x,y)

Can you compute the following with the magic box?

a ba b m x y oa b m

0 010

11

x y

0 010

o

0010

1 011

110

101 0

11

00111 0

m11 1

Page 66: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

A Magic Boxg

x y

min(x,y)

x y

a b m x y o1a b m

0 010

11

x y

0 010

o

00

1

101 0

11

110

101 0

11

00111 0 11 1

o0

Page 67: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

A Magic Boxg

x y

min(x,y)

x y

a b m x y o0a b m

0 010

11

x y

0 010

o

00

0

101 0

11

110

101 0

11

00111 0 11 1

o1

Page 68: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

A Magic BoxHINT

g

Can you compute the

HINT max(x,y)

Can you compute the following with the m-box?

a ba b m x y oa b m

0 010

11

x y

0 010

o

0110

1 011

110

101 0

11

11111 0

m11 1

Page 69: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

A Magic Boxg

x y

max(x,y)

x y

a b m x y oa b m

0 010

11

x y

0 010

o

0110

1 011

110

101 0

11

11111 0 11 1

o

Page 70: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

A Magic Boxg

x y

max(x,y)

x y0 0

a b m x y oa b m

0 010

11

x y

0 010

o

0110

1 011

110

101 0

11

111

11

11 0 11 1

o0

Page 71: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

A Magic Boxg

x y

max(x,y)

x y0 1

a b m x y oa b m

0 010

11

x y

0 010

o

0110

1 011

110

101 0

11

111

01

11 0 11 1

o1

Page 72: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

A Magic Boxg

x y

max(x,y)

x y1 1

a b m x y oa b m

0 010

11

x y

0 010

o

0110

1 011

110

101 0

11

111

00

11 0 11 1

o1

Page 73: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

m-Box: A two input binary syntax nbox that can compute any (two

input) binary syntax box?input) binary syntax box?How many differentbinary 2 input How will you prove it?

a ba b m x y o

binary 2-input s-boxes?

How will you prove it?24 = 16

a b m

0 010

11

x y

0 010

o

**10

1 011

110

101 0

11

***11 0

m

11

Page 74: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

S nt x B xSyntax Boxesproof of universalityproof of universality

Page 75: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

4 Useful Boxes

min(x,y) 1-y 1

x y o

0 0 1

x y o

0 0 1 0 010

1 0

111

0 010

1 0

101

max(x,y)

1 011

11

1 011

10

Page 76: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

1-y

yy

a b m x y oa b m

0 010

11

x y o

0 010

1010

1 011

110

101 0

11

010

o

11 0 11 0

Page 77: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

1

y 1-y

a b m x y oa b m

0 010

11

x y o

0 010

1110

1 011

110

101 0

11

111

o

11 0 11 1

Page 78: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

4 Useful Boxes

min(x,y) 1-y 1

( ) So what?max(x,y)

Need to prove:So what?

Need to prove:any (t i t) bin nt x any (two input) binary syntax box can be computed by box can be computed by the 4 Useful Boxes

Page 79: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

An Arbitrary Two Input Box

x y oTwo 1-input boxes!

0 010

**

1 011

**

x= 0 then

x= 1 then x= 1 then

What are the possible values of p

00

01

10

110 1 0 1

Page 80: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

An Arbitrary Two Input Box

min(x,y) 1-y 1

( )max(x,y)

y

What are the possible values of

y

x y op

00

01

10

11

0 010

**0 1 0 1

Can we compute it with the m-box?1 0

11**

Page 81: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

An Arbitrary Two Input Box

x y o

0 0 *

x= 0 then

1 th 0 010

1 0

***

x= 1 then How can you compute this box?

1 011 *

x

o

Page 82: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

x= 0 then

x= 1 then

1-x x1 x x

min(a,b) min(a,b)

max(a,b)

o

Page 83: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

x= 0 then

x= 1 then

0 10 1

min(a,b) min(a,b)

0

max(a,b)

0

o

Page 84: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

x= 0 then

x= 1 then

1 01 0

min(a,b) min(a,b)

0

max(a,b)

0

o

QED

Page 85: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

Does the magic continue?D m g u

Given a 2-input binary box that can compute any 2-input binary box

Can it compute any 3-input binary box?

a b x zy

m-box

o o

Page 86: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

3-input binary s-box

x y ozHow many differentbinary 3-input s boxes?

0 010

**

00

s-boxes?

28 = 2561 0

11**

0 0 *

0010 0

101 0

***

1111 0

11**

11

Page 87: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

3-input binary s-box

x y ozTwo 2-input boxes!

0 010

**

00

1 011

**

0 0 *

001

z= 0 then

z= 1 then 0 010

1 0

***

111

z= 1 then

1 011

**

11

Page 88: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

x y o

0 0 *

z

0x y x y

0 010

1 0**

000

11 *0 0 *

01

101 0

**

11

11 *1

z

z= 0 then o z= 1 then

Page 89: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

x y o

0 0 *

z

0z= 0 then

0 010

1 0**

000

???? z z= 1 then

11 *0 0 *

01

o

101 0

**

11

z1-z

11 *1min(a,b) min(a,b)

m x( b)max(a,b)

o

Page 90: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

x y o

0 0 *

z

00 010

1 0**

00001

11 *0 0 *

01

101 0

**

11

min(a,b) min(a,b)

0 11 *1max(a,b)

0

o

Page 91: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

x y o

0 0 *

z

00 010

1 0**

00010

11 *0 0 *

01

101 0

**

11

min(a,b) min(a,b)

0 11 *1max(a,b)

0

o

Page 92: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

Does the magic continue?

G l b f 2 b b

D m g u

Given a magical box for any 2-input binary box

We proved that it is magical for any 3-input binary box!p g f y p y

Is it magical for any n-input binary box????YES!!!!Proof by induction on the number of inputs

a bProof by induction on the number of inputs

m-box

....

o o

Page 93: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

z= 0 then

1 th Are tables with n 1 variablesz= 1 then

1

Are tables with n-1 variables

z1-z

min(a,b) min(a,b)

max(a b)max(a,b)

o

Page 94: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

We need a language forS boxes!!S-boxes!!

Questions about building blocks?Feasibility

Questions about building blocks?

Given a set of building blocks: What can/cannot be constructed?

Efficiency and complexity

Given a set of building blocks and a description of a structure:Given a set of building blocks and a description of a structure:

Size: If feasible, how many blocks are needed?

Time: How long will it take to complete the construction?

Page 95: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

A word that is associated with the following?with the following?

FaceFace

Page 96: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

A word that is associated with the following?with the following?

FaceFace

Page 97: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

You have one week!You have one week!

Page 98: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1
Page 99: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1
Page 100: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1

Diff i i ti 7 di it b 60Difference in approximation - 7 digits base 60

Page 101: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1
Page 102: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1
Page 103: IST 4 Information and Logic - Paradiseparadise.caltech.edu/ist4/lectures/lect 0614 p.pdf · 2015-01-20 · IST 4 Information and Logic. mon tue wed thr fri = today 31 M1 1 T 7 M1