ArticleslgStudy

computer science

Metric k-center

Metric k-center 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 Metric k-center rather than just read about it. In short: In graph theory, the metric k-center problem or vertex k-center problem is a classical combinatorial optimization problem studied in theoretical computer science that is NP-hard. Given n cities with specified distances, one wants to build k warehouses in different cities and minimize the maximum distance of a city to a warehouse.

Key takeaways

  • Metric k-center 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 Metric k-center to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Metric k-center from memory before moving on to harder problems.

Reference excerpt

In graph theory, the metric k-center problem or vertex k-center problem is a classical combinatorial optimization problem studied in theoretical computer science that is NP-hard. Given n cities with specified distances, one wants to build k warehouses in different cities and minimize the maximum distance of a city to a warehouse. In graph theory, this means finding a set of k vertices for which the largest distance of any point to its closest vertex in the k-set is minimum. The vertices must be in a metric space, providing a complete graph that satisfies the triangle inequality. It has application in facility location and clustering.

Formal definition The problem was first proposed by Hakimi in 1964. Let ( X , d ) {\displaystyle (X,d)} be a metric space where X {\displaystyle X} is a set and d {\displaystyle d} is a metric A set V ⊆ X {\displaystyle \mathbf {V} \subseteq {\mathcal {X}}} , is provided together with a parameter k {\displaystyle k} . The goal is to find a subset C ⊆ V {\displaystyle {\mathcal {C}}\subseteq \mathbf {V} } with | C | = k {\displaystyle |{\mathcal {C}}|=k} such that the maximum distance of a point in V {\displaystyle \mathbf {V} } to the closest point in C {\displaystyle {\mathcal {C}}} is minimized. The problem can be formally defined as follows: For a metric space ( X {\displaystyle {\mathcal {X}}} ,d),

Input: a set V ⊆ X {\displaystyle \mathbf {V} \subseteq {\mathcal {X}}} , and a parameter k {\displaystyle k} . Output: a set C ⊆ V {\displaystyle {\mathcal {C}}\subseteq \mathbf {V} } of k {\displaystyle k} points. Goal: Minimize the cost r C ( V ) = max v ∈ V {\displaystyle r^{\mathcal {C}}(\mathbf {V} )={\underset {v\in V}{\max }}} d(v, C {\displaystyle {\mathcal {C}}} ) That is, every point in a cluster is in distance at most r C ( V ) {\displaystyle r^{\mathcal {C}}(V)} from its respective center.

The k-Center Clustering problem can also be defined on a complete undirected graph G = (V, E) as follows: Given a complete undirected graph G = (V, E) with distances d(vi, vj) ∈ N satisfying the triangle inequality, find a subset C ⊆ V with |C| = k while minimizing:

max v ∈ V min c ∈ C d ( v , c ) {\displaystyle \max _{v\in V}\min _{c\in C}d(v,c)}

Computational complexity In a complete undirected graph G = (V, E), if we sort the edges in non-decreasing order of the distances: d(e1) ≤ d(e2) ≤ ... ≤ d(em) and let Gi = (V, Ei), where Ei = {e1, e2, ..., ei}. The k-center problem is equivalent to finding the smallest index i such that Gi has a dominating set of size at most k.

Although Dominating Set is NP-complete, the k-center problem remains NP-hard. This is clear, since the optimality of a given feasible solution for the k-center problem can be determined through the Dominating Set reduction only if we know in first place the size of the optimal solution (i.e. the smallest index i such that Gi has a dominating set of size at most k), which is precisely the difficult core of the NP-hard problems. Although a Turing reduction can get around this issue by trying all values of k.

Approximations

A simple greedy algorithm A simple greedy approximation algorithm that achieves an approximation factor of 2 builds C {\displaystyle {\mathcal {C}}} using a farthest-first traversal in k iterations. This algorithm simply chooses the point farthest away from the current set of centers in each iteration as the new center. It can be described as follows:

Pick an arbitrary point c ¯ 1 {\displaystyle {\bar {c}}_{1}} into C 1 {\displaystyle C_{1}}

For every point v ∈ V {\displaystyle v\in \mathbf {V} } compute d 1 [ v ] {\displaystyle d_{1}[v]} from c ¯ 1 {\displaystyle {\bar {c}}_{1}}

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Metric k-center

Start with the simplest possible case. Write down what Metric k-center 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 Metric k-center 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 Metric k-center 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 Metric k-center

In research
Metric k-center 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 Metric k-center 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
Metric k-center is common in secondary-school and first-year university syllabi. It links to neighbouring topics Approximation algorithms, Combinatorial optimization, Computational problems in graph theory, so understanding it makes those chapters shorter.
In everyday life
Look for Metric k-center 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 “Metric k-center” →

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Metric k-center in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Metric k-center 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 Metric k-center out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Metric k-center in simple terms?

In graph theory, the metric k-center problem or vertex k-center problem is a classical combinatorial optimization problem studied in theoretical computer science that is NP-hard. Given n cities with specified distances, one wants to build k warehouses in different cities and minimize the maximum di…

Why does Metric k-center 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 Metric k-center?

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 Metric k-center.

Tags

  • Approximation algorithms
  • Combinatorial optimization
  • Computational problems in graph theory
  • Facility location
  • NP-hard problems

Keep exploring