HMCS: Day 1, Page 1.
I feel encouraged. On the first page of the book, it talks about sets. Sets seemed obvious and pointless to even discuss in math class in school.
But, today my opinion has changed.
set = array
It looks like sets are the same thing as an array. In HMCS, the notation is the same as that of an array. That is GREAT news for me and other programmers. I totally understand how sets are useful.
javascript: set = {element, element}
'math': X = {p, q}
Fancy symbol that says an element is in a set:
element ∈ Set
p ∈ X
Hmmm...how to say that in programming?
$X = array($p);
$p = in_array($X, $p);
Well, sort of, does not feel totally right. It is trying to say p is in set X. Don't think it makes much difference out of context.
My important take away lesson:
Math has symbols, but maybe they will not be so awful if I actually learn what they mean. And Especially if it turns out that the symbols all correspond to programming.
÷ Division sign Option+/
± Plus/minus sign Shift+Option+=
° The degree symbol Shift+Option+8
¬ "not" symbol Option+L
≥ Greater than or equal to Option+>
≤ Lesser than or equal to Option+<
√ square root radical sign Option+V
π Pi symbol Option+P
∞ Infinity symbol Option+5
≈ Approximately Option+X
Δ Delta/Difference Option+J
Σ Sum Sign Option+W
∏ Product Pi Symbol Shift+Option+P
Ω Ohm sign Option+Z
µ Micro Option+M
∂ Partial Derivative Option+D
∫ Integral Sign Option+B
‰ Per Mil (1/1000) Sign Shift+Option+R


Comments
Cartesian product
On page 3 HMCS shows adding, subtracting and even multiplying sets.
What was Relevant to Programmers is that multiplying sets seems to produce the coordinates of a square.
x€X y€Y
x={1,2}
y={3,4}
X times Y = {(1,3),(2,3),(1,4),(2,4)}
Post new comment