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

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <h3> <h4> <strike> <img><iframe><embed><param><object>
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Insert Flickr images: [flickr-photo:id=230452326,size=s] or [flickr-photoset:id=72157594262419167,size=m].
  • Images can be added to this post.

More information about formatting options

Mollom CAPTCHA (play audio CAPTCHA)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.