IST 4
Information and Logic
mon tue wed thr fri
2 M1
1
9 M1
16
1 2
M223
PCP
30
2
M27
3
14
21
3 4
28
4 5
4
5
x= hw#x out x= hw#x due
Mx= MQx out Mx= MQx due
classno
oh oh
oh oh
oh oh
oh
oh oh oh
oh
oh oh oh
oh oh
oh = office hours oh
T
= today
T oh
oh
oh
sun
oh
revised 4/19/2018
PCP = Programing Challenge
midterms
oh
oh oh
- Lecture 1: Life – DNA sequences and evolution - Lecture 2: The 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: Babylonians
- Lecture 5: Babylonian mathematics vs Greek mathematics - Lecture 6: Flow of ideas over time and space
Babylonians to Euclid to Leibniz
Babylonian tablets
‘HOW’ Greek proofs
‘WHY’
Euclid, 300BC 2000BC
Algorithms Greek proofs
‘WHY’
Euclid, 300BC
How are algorithms
similar to proofs?
Algorithms
How are algorithms similar to proofs?
premise / axioms / input
‘Legal’ steps
Theorem-QED
correct output
Squaring the Rectangle
Algorithms
Squaring the Rectangle
Tiling the rectangle with squares
Smallest number of squares
Can we find a smaller number of identical squares?
Can we find a smaller number of identical squares?
How?
Idea: Be greedy
How?
We are almost done!
Now what?
From Geometry to Numbers?
Euclidean algorithm for finding the GCD Greatest Common Divisor
15 40
GCD = 5
Euclid,300BC 10
15 5
10
??
The flow of ideas
2000BC Euclid, 300BC
Pythagoras 570-495 BC
Will be posted
on the class website
“In November 26, 1949, Albert Einstein published an essay in the Saturday Review of Literature in which he described two pivotal moments in his childhood.”
“The first involved a compass that his father showed him when he was four or five. Einstein recalled his sense of wonderment that the needle always pointed north, even
though nothing appeared to be pulling it in that direction. He came to a conclusion, then and there, about the structure of the physical world:
“Something deeply hidden had to be behind things.””
Will be posted
on the class website
“The second moment occurred soon after he turned twelve,
when he was given “a little book dealing with Euclidean plane geometry.””
The book’s “lucidity,” he wrote—the idea that a mathematical assertion could
“be proved with such certainty that any doubt appeared to be out of the question”— provoked
“wonder of a totally different nature.”
“Pure thought could be just as powerful as geomagnetism.”
How does pure
thought travel?
“ Pure thought could be just as
powerful as geomagnetism” S.
StrogatzCommunications: books, interaction
Trade and imperialism
How does pure
thought travel?
Babylonians and Egyptians
~5000 years ago
source: wikipedia
Greek - Alexander
~2500 years ago
Roman Empire
~2000 years ago
source: wikipedia
Arabs
~1200 years ago
Muhammad ibn Mūsā al-Khwārizmī
House of Wisdom, Bagdad
source: wikipedia
source: wikipedia Merv, 2014
Merv, 2014
Dunhuang
Trade:
Silk Road
The geography
and flow of ideas
number system
Roman numerals and the abacus
Roman
Numeral Number
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
A Refresher on the Roman Numeral System
Large Roman
Numerals Number
V 5,000
X 10,000
L 50,000
C 100,000
D 500,000
M 1,000,000 LCD Monitor
I V
X L
C D V
M LL
DD
C M
VV X
IIIII XXXXX
V
CCCCC MMMMM
L D V
The Abacus:
It’s all About Syntax
What is the number?
I V
X L
C D V
M LL
DD
C M
VV X
IIIII XXXXX
V
CCCCC MMMMM
L D V
The Abacus:
It’s all About Syntax
What is the number?
DCI 601
I V
X L
C D V
M LL
DD
C M
VV X
IIIII XXXXX
V
CCCCC MMMMM
L D V
DCI 601
The Abacus:
It’s all About Syntax
Touch the middle: Yes or No
it is a binary mechanism
The first actual calculating mechanism known to us is the abacus, which is thought to have been invented
by the
Babylonians
sometime between 1,000 BC and 500 BCThe Abacus
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
Source: Wikipedia
The original concept referred to a flat stone covered with sand or dust, with pebbles being placed on lines drawn in the sand
The Abacus
Calculating Machine are Based on Syntax
In Phoenician the word abak means sand
In Hebrew the word abhaq
ק בָ אָ
means dustCalculus is Latin for
pebble
? ?
Source: Wikipedia
The Abacus:
It’s all About Syntax
I V
X L
C D V
M LL
DD
C M
VV X
IIIII XXXXX
V
CCCCC MMMMM
L D V
2 1
5 1
I V
X L
C D V
M LL
DD
C M
VV X
IIIII XXXXX
V
CCCCC MMMMM
L D V
DCI 601
The Abacus:
It’s all About Syntax
I V
X L
C D V
M LL
DD
C M
VV X
IIIII XXXXX
V
CCCCC MMMMM
L D V
CCCCLXXXVIIII 489
The Abacus:
It’s all About Syntax
What is the number?
I V
X L
C D V
M
CCCCLXXXVIIII 489 DCI 601 +
The Abacus:
It’s all About Syntax
2 1
5 1
I V
X L
C D V
M
CCCCLXXXVIIII 489 DCI 601 +
The Abacus:
It’s all About Syntax
2 1
5 1
I V
X L
C D V
M
CCCCLXXXVIIII 489 DCI 601 +
The Abacus:
It’s all About Syntax
2 1
5 1
I V
X L
C D V
M
CCCCLXXXVIIII 489 DCI 601 +
The Abacus:
It’s all About Syntax
2 1
5 1
I V
X L
C D V
M
CCCCLXXXVIIII 489 DCI 601 +
The Abacus:
It’s all About Syntax
2 1
5 1
I V
X L
C D V
M
CCCCLXXXVIIII 489 DCI 601 +
The Abacus:
It’s all About Syntax
2 1
5 1
I V
X L
C D V
M
CCCCLXXXVIIII 489 DCI 601 +
The Abacus:
It’s all About Syntax
2 1
5 1
I V
X L
C D V
M
CCCCLXXXVIIII 489 DCI 601 +
The Abacus:
It’s all About Syntax
2 1
5 1
I V
X L
C D V
M
CCCCLXXXVIIII 489 DCI 601 +
The Abacus:
It’s all About Syntax
2 1
5 1
I V
X L
C D V
M
CCCCLXXXVIIII 489 DCI 601 +
The Abacus:
It’s all About Syntax
2 1
5 1
I V
X L
C D V
M
MLXXXX
CCCCLXXXVIIII 489 DCI 601 +
The Abacus:
It’s all About Syntax
What is the decimal representation?
??
I V
X L
C D V
M
MLXXXX 1 0 9 0
What’s surprising in this picture?
CCCCLXXXVIIII 489 DCI 601 +
The Abacus:
It’s all About Syntax
What is the decimal representation?
Roman Numerals and Base 10 Systems
I V
X L
C D V
M
MLXXXX
0 9
0 1
Roman numerals used for number
representation
For
calculation
: we used the abacusThe
representation in the abacus
is a
positional base 10
representationFrom Physical (abacus) to Symbols
Algorizms
Algorizmi
A positional number system is a key enabler for efficient arithmetic operations
Operations are done on syntax
Muhammad ibn Mūsā al-Khwārizmī ﻣ
ﺣ ﻣ د ﺑ ن ﻣ و ﺳ ﻰ اﻟ ﺧ و ا ر ز ﻣ
ﻲ 780-850AD
A Persian mathematician, who wrote on Hindu-Arabic
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
The Beginning of the “Algebra Book ” by “Algorizmi ” Everything requires computation...
The Beginning of the “Algebra Book ” by “Algorizmi ” Positional: order is important; the base – multiplication by 10;
from 1 to infinity...
Example from the “Algebra Book ” by “Algorizmi ”
It is rhetorical (words) no symbols
??
computation = single digit syntax manipulation
Left to right…
Algorithms and Algebra in Europe
Leonardo Fibonacci 1170-1250AD
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.
In 1202, at age 32, he published what he had learned in Liber Abaci, or Book of Calculation
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 the Arabic numeral system
Source: Wikipedia
Liber Abaci – First Chapter
Introduction of the syntax; from 1 to infinity...
Liber Abaci – First Chapter
Positional: order is important
Algorizmi
“brain surgery” and
0 1 2 3 4 5 6 7 8 9
0 0 1 2 3 4 5 6 7 8 9
1 1 2 3 4 5 6 7 8 9 10
2 2 3 4 5 6 7 8 9 10 11
3 3 4 5 6 7 8 9 10 11 12
4 4 5 6 7 8 9 10 11 12 13 5 5 6 7 8 9 10 11 12 13 14 6 6 7 8 9 10 11 12 13 14 15 7 7 8 9 10 11 12 13 14 15 16 8 8 9 10 11 12 13 14 15 16 17 9 9 10 11 12 13 14 15 16 17 18
In first grade:
We use our BRAIN for remembering
Algorizmi’s syntax
Arithmetic boxes
decimal
Algorithms – Syntax Manipulation
2 symbol adder digit 1 digit 2
carry
sum
carry
Algorithms – Syntax Manipulation
2 symbol adder
8 6
digit 1 digit 2
carry
sum
carry 0
Algorithms – Syntax Manipulation
2 symbol adder
8 6
4
digit 1 digit 2
carry
sum
1 0 carry
2 symbol adder c
c
d1 d2
c
1891 + 8709 = ??
2 symbol adder c
c
d1 d2
c c 2 symbol adder c
d1 d2
c c 2 symbol adder c
d1 d2
c
2 symbol adder c
c
1 d2
c c 2 symbol adder c
8 d2
c c 2 symbol adder c
9 d2
c c 2 symbol adder c
1 d2
0
1891 + 8709 = ??
2 symbol adder c
c
1 8
c c 2 symbol adder c
8 7
c c 2 symbol adder c
9 0
c c 2 symbol adder c
1 9
0
1891 + 8709 = ??
2 symbol adder c
c
1 8
c c 2 symbol adder c
8 7
c c 2 symbol adder c
9 0
c 1 2 symbol adder 0
1 9
0
1891 + 8709 = ??
2 symbol adder c
c
1 8
c c 2 symbol adder c
8 7
c 1 2 symbol adder
0
1 9
0 2 symbol adder
1
0
9 0
1
1891 + 8709 = ??
2 symbol adder c
c
1 8
c 1 2 symbol adder 6
8 7
1 1 2 symbol adder 0
9 0
1 1 2 symbol adder 0
1 9
0
1891 + 8709 = ??
2 symbol adder 1
0
1 8
1 1 2 symbol adder 6
8 7
1 1 2 symbol adder 0
9 0
1 1 2 symbol adder 0
1 9
0
1891 + 8709 = ??
2 symbol adder 1
0
1 8
1 1 2 symbol adder 6
8 7
1 1 2 symbol adder 0
9 0
1 1 2 symbol adder 0
1 9
0
1891 + 8709 = 10,600
Algorithm =
a procedure for syntax manipulation
Dear Algo and Fibo,
we get confused with those large tables... can we use a
smaller syntax?
The Binary
When was the binary system “invented”?
(11010100111) 2 (1703) 10
1024+512+128+32+4+2+1 = 1703
Leibniz – Binary System
Gottfried Leibniz 1646-1716
Gottfried Leibniz 1646-1716
Gottfried Leibniz 1646-1716
Gottfried Leibniz 1646-1716
8
??
Use the smallest syntax possible Binary – 0 and 1
Binary Addition
carry
Gottfried Leibniz 1646-1716
Binary Multiplication
Addition of
shifted versions
3 6
5 5
10 20
Gottfried Leibniz 1646-1716
Leibniz:
No Need for Flash Cards!
Invented the Binary System?
Gottfried Leibniz 1646-1716
Leibniz – Binary System
Gottfried Leibniz 1646-1716
Wen Wang (who flourished in about 1150 BC) is traditionally thought to have been author of the present hexagrams
63
Leibniz – Binary System
Gottfried Leibniz 1646-1716
We are learning about people with
good ideas and strong initiative…
• You are invited to write short essay on the topic of the
Magenta Question. Extra Credit of 3 points Entrepreneurship:
Good ideas and strong initiative!
MQ2
Due Tuesday 5/1/2018 at 10pm• Your story – ideas, dreams
• Someone you know
• Someone known
• Anything…
• You are invited to write short essay on the topic of the
Magenta Question.
• Recommended length is 3 pages (not more)
• Submit the essay in PDF format to istta4@paradise.caltech.edu file name lastname-firstname.pdf
•
No collaboration. No extensions
MQ2
Grading of MQ:
3 points (out of 105)
50% for content quality, 50% for writing quality Some students will be given an opportunity
to give a short presentation for up to 3 additional points Due Tuesday 5/1/2018 at 10pm
Quiz time
Quiz #4 – 10min
Compute the multiplication base-2 (in base-2) Show your work!
1010 x 1000
?
1011 x 1011
?
100111 x 101
?
Addition of