Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does this definition of contiguous subsequences mean?

Tags:

I don't understand the following definition of a contiguous subsequence:

A contiguous subsequence of a list S is a subsequence made up of consecutive elements of S.

If S is {5, 15, -30, 10, -5, 40, 10}
then 15, -30, 10 is a contiguous subsequence.

What makes 15, -30, 10 a contiguous subsequence?

like image 643
user466796 Avatar asked Oct 21 '10 14:10

user466796


People also ask

What is meant by contiguous Subarray?

A contiguous subarray is simply a subarray of an array with a condition that the elements of the subarray should be in exact sequence as the sequence of the elements in the array.

What is meant by a subsequence?

In mathematics, a subsequence of a given sequence is a sequence that can be derived from the given sequence by deleting some or no elements without changing the order of the remaining elements. For example, the sequence is a subsequence of obtained after removal of elements.

What is contiguous number?

In this case, the word "contiguous" is referenced a consecutive numbers in ascending order of the ports in the interfaces and the "comma" separate with another group of consecutive numbers in ascending order of the ports in the interfaces.

What are contiguous segments?

1 touching along the side or boundary; in contact. 2 physically adjacent; neighbouring. 3 preceding or following in time.


1 Answers

Lets say you have some elements in a subsequence,

then it will be called contiguous iff the elements taken in order are consecutive in original set.

E.g,

Sequence=2,3,abc,5.6,4,abhishek;

Subsequence=5.6,2,abhishek;

Contiguous Subsequence=3,abc,5.6 or 5.6,4,abhishek or abc,5.6.

Remember, The sequence itself is always a contiguous subsequence.

Hope it makes the concept clear!

like image 144
Abhishek Kaushik Avatar answered Oct 04 '22 21:10

Abhishek Kaushik