Jump to content

Wikipedia:Reference desk/Archives/Mathematics/2008 August 25

From Wikipedia, the free encyclopedia
Mathematics desk
< August 24 << Jul | August | Sep >> August 26 >
Welcome to the Wikipedia Mathematics Reference Desk Archives
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


August 25

[edit]

Mathematical notation equivalent

[edit]

What is the equivalent mathematical notation for the "countif" function in Excel? The function gives a count of the occurrences of a specified criteria. For instance, in the list of "1,1,3,4,3,5,4,5,3" "countif" function with a criteria of "1" would provide result of "2". How would I indicate the list contained 9 integers, etc.? —Preceding unsigned comment added by 71.100.13.184 (talk) 09:23, 25 August 2008 (UTC)[reply]

I don't know how to get the right symbols, but you could do something like that with a bit of logical notation, and maybe a multiset. Let P(x) be the condition you're placing on the count, which evaluates to True when it finds something it's looking for and False otherwise. For instance, P(x) = "x is an integer." Let S be the set, and let m(x) equal the multiplicity of x in S. Then what you're looking for is the sum over all x (in S, such that P(x)) of m(x). Black Carrot (talk) 10:43, 25 August 2008 (UTC)[reply]

What I have done is to use vx for P(x) with the expression looking like this:... where is a multiplier of with an additional subscript, l, to denote summation of all multiplicities for all possible values for x in S, with the expression looking like this:... but I'm not sure if mathematical notation can be used in this way in place of logical notation to express the idea so that it is comprehendable for the reader. —Preceding unsigned comment added by 71.100.13.184 (talk) 13:09, 25 August 2008 (UTC)[reply]
For whatever reason, lists aren't usually treated as mathematical objects. You can say "S is a set" and talk about properties of S like its cardinality |S|, but you don't normally say "L is a list" or talk about properties of L. Instead you always write out the list by its elements—e.g. is a list of length n. You might write the number of list elements satisfying a predicate P as . -- BenRG (talk) 13:31, 25 August 2008 (UTC)[reply]
What do you thing about this? —Preceding unsigned comment added by 71.100.13.184 (talk) 15:06, 25 August 2008 (UTC)[reply]
I don't think it would help you with what you're doing. It's using generating function techniques to shortcut some computations, but not the ones you're looking for. Black Carrot (talk) 15:26, 25 August 2008 (UTC)[reply]
Cardinality is probably what you want Dmcq (talk) 20:56, 25 August 2008 (UTC)[reply]
That notation would usually be interpreted as a set rather than a multiset, though, so it would just tell you if the number appears in the list, not how many times. --Tango (talk) 23:53, 25 August 2008 (UTC)[reply]
Thanks. Um yeah I'd only get 0 or 1! I do seem to do a lot of cut twice measure once Dmcq (talk) 18:59, 26 August 2008 (UTC)[reply]
I'd write the list as a function over the natural numbers (or subset thereof), and then write the "countif" as a sum of indicator functions, like where I(S) = 1 if S is true, 0 otherwise. Confusing Manifestation(Say hi!) 00:00, 26 August 2008 (UTC)[reply]

Thanks for all of this help! After looking at every suggestion I decided to see if I could develop a function using Mathcad. Once over the hurdle of using indexes in a way which Mathcad would accept I was able to do every step with equalities, which are easily reproduced in LaTeX. I'll post what I've found here tomorrow. Thanks very much again for the help! —Preceding unsigned comment added by 71.100.13.184 (talk) 04:14, 26 August 2008 (UTC)[reply]




The J (programming language) uses Iverson bracket for the indicator function of a condition, and summation of the result, like this

  +/ ((1, 1, 3, 4, 3, 5, 4, 5, 3) = 1)

and the result reported is 2. Bo Jacoby (talk) 08:26, 26 August 2008 (UTC).[reply]

Any programming language normally provides user function capability but the problem is not in getting the results or even displaying them in even pseudo code but rather in using conventional mathematical notation to do both which Mathcad has allowed to be done by means of the close similarity between its symbolics and that of LaTeX.

northest point

[edit]

Can someone please tell me which is the northest point "country" on earth.

T.Cauchi80.254.93.170 (talk) 13:46, 25 August 2008 (UTC)[reply]

Santa's toy shop. Black Carrot (talk) 15:29, 25 August 2008 (UTC)[reply]
The northernmost point on land is Kaffeklubben Island outside Greenland, so unless you consider Greenland a country, that's Denmark. See Extreme points of Earth for more of this stuff. -- Jao (talk) 15:33, 25 August 2008 (UTC)[reply]