Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

is a "non-decreasing" sequence "increasing"?

Tags:

algorithm

While studying the book "Introduction to Algorithms by Cormen", I found a strange thing. Everywhere if it refers to an increasing order, the book refers it as "non-decreasing" order.. I mean, if a series (2,5,6,3) is to be arranged in "non-decreasing" order.. is'nt it already right?? or "increasing" and "non-decreasing" words mean one and the same?

like image 624
Vaibhav Avatar asked Dec 26 '09 14:12

Vaibhav


People also ask

Can a sequence be non-increasing and non-decreasing?

A sequence which is either increasing, decreasing, non-increasing, or non-decreasing is called a monotone sequence. A sequence which is either increasing, or decreasing is called strictly monotone.

What is a non-decreasing sequence?

Non-decreasing sequences are a generalization of binary covering arrays, which has made research on non-decreasing sequences important in both math and computer science. The goal of this research is to find properties of these non- decreasing sequences as the variables d, s, and t change.

How do you know if a sequence is non-increasing or decreasing?

If an≤an+1 a n ≤ a n + 1 for all n, then the sequence is non-decreasing . If an>an+1 a n > a n + 1 for all n, then the sequence is decreasing or strictly decreasing . If an≥an+1 a n ≥ a n + 1 then the sequence is non-increasing .

Is a sequence increasing or decreasing?

Definition A sequence (an) is: strictly increasing if, for all n, an < an+1; increasing if, for all n, an ≤ an+1; strictly decreasing if, for all n, an > an+1; decreasing if, for all n, an ≥ an+1; monotonic if it is increasing or decreasing or both; non-monotonic if it is neither increasing nor decreasing.


1 Answers

Increasing - 1 2 3 4

Nondecreasing - 1 1 2 3

The difference being that in an increasing sequence, for x(n) and x(n+1), x(n+1) > x(n) whereas in a non-decreasing sequence, x(n+1) >= x(n)

like image 52
danben Avatar answered Sep 16 '22 23:09

danben