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.

This is actually a question I'm asking for an algorithm I write, but I think that this is the right place for the question.

I know that the definition of a descending sequence is that for every $n$:
$$a_n > a_{n+1}$$

A single number does not apply to the definition, does it mean that a single number isn't a descending series by definition?

Edit: The task asks me to write a function that gets a natural number, and outputs true if the digits of the number are a descending series, or false if not. I'm trying to think of radical possible inputs.

share|improve this question
    
I would say that sequence fails to be descending if there is some $n$ such that $a_n\leq a_{n+1}$ Could this happen with a single term? –  Old John Nov 27 '12 at 22:51
2  
What definition you use depends on what definition is more useful to you. –  Qiaochu Yuan Nov 27 '12 at 22:51
    
It depends on the precise definition you use, but it appears that sequences of length one are strictly increasing and strictly decreasing at the same time. Maybe you rather don't want to call it a sequence at all? ;) –  Hagen von Eitzen Nov 27 '12 at 22:56
    
jeez, I'm confused @_o –  Georgey Nov 27 '12 at 23:02
add comment

1 Answer

up vote 4 down vote accepted

Precisely: def. a finite sequence $a_1,..,a_N$ is descending, iff $\forall n\in\{1,..,N-1\}$ we have $a_n>a_{n+1}$.

Then, for $N=1$, $n$ is coming from the empty set, hence the $\forall n\in\emptyset:\dots$ becomes true.

share|improve this answer
add comment

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.