Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I'm working on simple expression evaluation in one competition.

Now i'm wondering how should i evaluate empty brackets. I think i should evaluate them as zeros. Is that mathematically right or should i treat them as errors?

$()+5 = 5$

$()*5 = 0$

$()^5 = 0$

share|improve this question
    
Um, where exactly are you seeing empty brackets? Either you're making it up yourself, or it refers to some kind of empty sum, or it refers to an expression the reader is expected to understand from previous steps/commentary but the author is too lazy to write. Seems quite a localized thing because I've never seen it before. Elaborate on the context maybe? –  anon Nov 18 '11 at 21:31
1  
@MiroK: It looks like you're misreading $0$ as $()$... –  Zhen Lin Nov 18 '11 at 22:26
    
@anon I was doing little exercise in programming :) –  Miro May 28 '12 at 16:22

1 Answer 1

up vote 2 down vote accepted

Empty brackets make no sense in themselves.

By convention, empty products are always 1, and empty sums are always 0. So the interpretation would depend on what was inside the brackets before they were emptied. The general rule is that "a binary operation applied to no operands" produces the neutral element for that operation. If the operation has no neutral element (or if it is not unique), it makes no sense to apply it to no operands.

In cases where it doesn't make sense to ask which operation you're seeing an empty application of, it's either an error, or something really strange that you should seek further clarification on from the source that gave you the expression.

In other words, if you see something like $\sum_{n=1}^{k} f(n)$, then when $k=0$ you should unfold this directly to "$0$", rather than supposing that it means "$()$" and that the latter has some inherent meaning. Similarly

  • $\prod_{n=1}^0 g(n)$ should unfold directly to "$1$".
  • $\bigcup_{n=1}^0 A_n$ is always $\varnothing$.
  • $\bigcap_{n=1}^0 B_n$ is undefined, except if it's clear that the result is to be a subset of some particular universe, and arguably not even then.
share|improve this answer
    
The symbol 1 makes no sense in and of itself as well. We put meanting to it. –  user17522 Nov 18 '11 at 21:43
    
Sure. We don't put any meaning to $()$, though. –  Henning Makholm Nov 18 '11 at 21:45
    
The 0-tuple (that's a zero, not the letter O) I have seen before many a time denoted as (). –  user17522 Nov 18 '11 at 21:52
    
Okay. Right. Not that that would make much sense in the OP's context. –  Henning Makholm Nov 18 '11 at 22:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.