Re:Why Don't Computer Scientists Learn Math?
by gravypod on Saturday November 19, 2016 @11:55AM
(#12994260)
Or there could be a standardized notation for expressing functions and the concept of mapping can be derived from taking a function and applying it to a set of elements.
Function and Map are different concepts that should not be described together.
In CS I'd just say
B = map(some_function, A)
B is the Mapping of `some_function` over the elements in A.
Re:Why Don't Computer Scientists Learn Math?
by gizmo686 on Saturday November 19, 2016 @12:37PM
(#12994484)
>Function and Map are different concepts that should not be described together
Not in this context. Assuming you are using `map` in the CS sense, B is what is called the "image" of some_function (over the domain A).
In math, a function is a mapping.
Consider the type of `some_function`. In C like notation, it would be `foo some_function(goo x)`. Which indicates that some_function takes an arguement of type `goo` and returns a value of type `foo`. In other words, some_function maps Goo to Foo (where Goo and Foo represent the set of all values of type goo and foo).
Re:Why Don't Computer Scientists Learn Math?
by krakensden on Saturday November 19, 2016 @12:25PM
(#12994410)
That's all fine, but surely there is a middle ground between 'single letter variables or bust' and 'parody of enterprise Java'. It wouldn't kill anyone to use short words instead of re-using phi.
Mathematics also comes with comments, many papers essentially consists of one giant comment for the proof in the appendix. Granted, many variable names could be a bit less terse, but it's just easier to write "let f be an arbitrary function A -> B" once instead of using arbitraryFunctionMappingTheSetOf{DefinitionOfElementsOfA}toTheSetOf{DefinitionOfElementsOfB} every time.