ArticleslgStudy

computer science

Complexity index

Complexity index is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Complexity index rather than just read about it. In short: In modern computer science and statistics, the complexity index of a function denotes the level of informational content, which in turn affects the difficulty of learning the function from examples. This is different from computational complexity, which is the difficulty to compute a function.

Complexity index — main illustration
Complexity index — illustration

Key takeaways

  • Complexity index belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Complexity index to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Complexity index from memory before moving on to harder problems.

Reference excerpt

In modern computer science and statistics, the complexity index of a function denotes the level of informational content, which in turn affects the difficulty of learning the function from examples. This is different from computational complexity, which is the difficulty to compute a function. Complexity indices characterize the entire class of functions to which the one we are interested in belongs. Focusing on Boolean functions, the detail of a class 𝖢 of Boolean functions c essentially denotes how deeply the class is articulated.

Technical definition To identify this index we must first define a sentry function of 𝖢. Let us focus for a moment on a single function c, call it a concept defined on a set 𝒳 of elements that we may figure as points in a Euclidean space. In this framework, the above function associates to c a set of points that, since are defined to be external to the concept, prevent it from expanding into another function of 𝖢. We may dually define these points in terms of sentinelling a given concept c from being fully enclosed (invaded) by another concept within the class. Therefore, we call these points either sentinels or sentry points; they are assigned by the sentry function 𝑺 to each concept of 𝖢 in such a way that:

the sentry points are external to the concept c to be sentineled and internal to at least one other including it, each concept c′ including c has at least one of the sentry points of c either in the gap between c and c′, or outside c′ and distinct from the sentry points of c′, and they constitute a minimal set with these properties. The technical definition coming from (Apolloni 2006) is rooted in the inclusion of an augmented concept c+ made up of c plus its sentry points by another (c′)+ in the same class.

Definition of sentry function For a concept class 𝖢 on a space 𝔛, a sentry function is a total function 𝑺:𝖢∪{∅︀,𝔛}↦2𝔛 satisfying the following conditions:

Sentinels are outside the sentineled concept (c∩𝑺(c)=∅︀ for all c∈𝖢). Sentinels are inside the invading concept (Having introduced the sets c+=c∪𝑺(c), an invading concept c′∈𝖢 is such that c′⊈c and c+⊆(c′)+. Denoting up(c) the set of concepts invading c, we must have that if c2∈up(c1), then c2∩𝑺(c1)≠∅︀). 𝑺(c) is a minimal set with the above properties (No 𝑺′≠𝑺 exists satisfying (1) and (2) and having the property that 𝑺′(c)⊆𝑺(c) for every c∈𝖢). Sentinels are honest guardians. It may be that c⊆(c′)+ but 𝑺(c)∩c′=∅︀ so that c′∉up(c). This however must be a consequence of the fact that all points of 𝑺(c) are involved in really sentineling c against other concepts in up(c) and not just in avoiding inclusion of c+ by (c′)+. Thus if we remove c′,𝑺(c) remains unchanged (Whenever c1 and c2 are such that c1⊂c2∪𝑺(c2) and c2∩𝑺(c1)=∅︀, then the restriction of 𝑺 to {c1}∪up(c1)−{c2} is a sentry function on this set). 𝑺(c) is the frontier of c upon 𝑺.

With reference to the picture on the right, {x1,x2,x3} is a candidate frontier of c0 against c1,c2,c3,c4. All points are in the gap between a ci and c0. They avoid inclusion of c0∪{x1,x2,x3} in c3, provided that these points are not used by the latter for sentineling itself against other concepts. Vice versa we expect that c1 uses x1 and x3 as its own sentinels, c2 uses x2 and x3 and c4 uses x1 and x2 analogously. Point x4 is not allowed as a c0 sentry point since, like any diplomatic seat, it should be located outside all other concepts just to ensure that it is not occupied in case of invasion by c0.

Definition of detail The frontier size of the most expensive concept to be sentineled with the least efficient sentineling function, i.e. the quantity

D𝖢=sup𝑺,c#𝑺(c), is called detail of 𝖢. 𝑺 spans also over sentry functions on subsets of 𝔛 sentineling in this case the intersections of the concepts with these subsets. Actually, proper subsets of 𝔛 may host sentineling tasks that prove harder than those emerging with 𝔛 itself. The detail D𝖢 is a complexity measure of concept classes dual to the VC dimension D𝖵C. The former uses points to separate sets of concepts, the latter concepts for partitioning sets of points. In particular the following inequality holds (Apolloni 1997)

D𝖢≤D𝖵C+1 See also Rademacher complexity for a recently introduced class complexity index.

Example: continuous spaces Class C of circles in ℝ2 has detail D𝖢=2, as shown in the picture on left below. Similarly, for the class of segments on ℝ, as shown in the picture on right.

Example: discrete spaces The class 𝖢={c1,c2,c3,c4} on 𝔛={x1,x2,x3} whose concepts are illustrated in the following scheme, where "+" denotes an element xj belonging to ci, "-" an element outside ci, and ⃝ a sentry point:

This class has D𝖢=2. As usual we may have different sentineling functions. A worst case S, as illustrated, is: 𝐒(c1)={x1,x2},𝐒(c2)={x1},𝐒(c3)={x2},𝐒(c4)=∅︀. However a cheaper one is 𝐒(c1)={x3},𝐒(c2)={x1},𝐒(c3)={x2},𝐒(c4)=∅︀:

References Apolloni, B.; Malchiodi, D.; Gaito, S. (2006). Algorithmic Inference in Machine Learning. International Series on Advanced Intelligence. Vol. 5 (2nd ed.). Adelaide: Magill. Advanced Knowledge International Apolloni, B.; Chiaravalli, S. (1997). "PAC learning of concept classes through the boundaries of their items". Theoretical Computer Science. 172 (1–2): 91–120. doi:10.1016/S0304-3975(95)00240-5.

Illustrations

Complexity index: Two points x1,x2 outside c (thick circle) are sufficient to prevent a larger circle not containing them from including it
Two points x1,x2 outside c (thick circle) are sufficient to prevent a larger circle not containing them from including it
Complexity index: The class of segments in ℝ and two points needed to sentinel its concepts
The class of segments in ℝ and two points needed to sentinel its concepts

Worked examples

Example 1 — a first encounter with Complexity index

Start with the simplest possible case. Write down what Complexity index claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Complexity index before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Complexity index ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Complexity index

In research
Complexity index appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Complexity index in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Complexity index is common in secondary-school and first-year university syllabi. It links to neighbouring topics Algorithmic inference, Computational complexity theory, so understanding it makes those chapters shorter.
In everyday life
Look for Complexity index outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Complexity index” →

How to study Complexity index in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Complexity index means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Complexity index out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Complexity index in simple terms?

In modern computer science and statistics, the complexity index of a function denotes the level of informational content, which in turn affects the difficulty of learning the function from examples. This is different from computational complexity, which is the difficulty to compute a function.

Why does Complexity index matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Complexity index?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Complexity index.

Tags

  • Algorithmic inference
  • Computational complexity theory

Keep exploring