Talk:Set of real numbers: Difference between revisions

Content added Content deleted
Line 24: Line 24:
:# If your set implementation allows a straightforward calculation of the length, the same method might be easily extended to do other things such as integrating a function over a set. The length of set A itself can be thought as integrating constant function f(x) = 1 for x in A.
:# If your set implementation allows a straightforward calculation of the length, the same method might be easily extended to do other things such as integrating a function over a set. The length of set A itself can be thought as integrating constant function f(x) = 1 for x in A.
:# If for neither of the above, the optional goal can be used as a measure of efficiency of your implementation. It easily specifies a relative large number of continuous regions (100ish) that you need to deal with for the set arithmetic. --[[User:Ledrug|Ledrug]] 23:15, 2 October 2011 (UTC)
:# If for neither of the above, the optional goal can be used as a measure of efficiency of your implementation. It easily specifies a relative large number of continuous regions (100ish) that you need to deal with for the set arithmetic. --[[User:Ledrug|Ledrug]] 23:15, 2 October 2011 (UTC)
::Nevertheless, finding the zeros of an arbitrary computation has little to do with this task. The easiest way of solving the extra credit in a language that does not already implement the required zero finding involves manipulation of the underlying expressions by the programmer -- something that can be easier to do outside of the context of set notation. Though it's true that the set implementation might be used to determine which of the regions bounded by the zeros are in the set and which of those reason are outside of the set. --[[User:Rdm|Rdm]] 10:48, 3 October 2011 (UTC)
::Nevertheless, finding the zeros of an arbitrary computation has little to do with this task. The easiest way of solving the extra credit in a language that does not already implement the required zero finding involves manipulation of the underlying expressions by the programmer -- something that can be easier to do outside of the context of set notation. Though it's true that the set implementation might be used to determine which of the regions bounded by the zeros are in the set and which of those reason are outside of the set.
::Put differently, it's a modularity violation. Simple zero finding algorithms, like hill climbing, are going to be baffled by the interface provided by set membership -- there is no slope. So that pushes the implementation of this algorithm inside the set implementation. But zero finding becomes arbitrarily complex when presented with arbitrary computations. --[[User:Rdm|Rdm]] 10:48, 3 October 2011 (UTC)