ArticleslgStudy

computer science

Canadian traveller problem

Canadian traveller problem 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 Canadian traveller problem rather than just read about it. In short: In computer science and graph theory, the Canadian traveller problem (CTP) is a generalization of the shortest path problem to graphs that are partially observable. In other words, a "traveller" on a given point on the graph cannot see the full graph, rather only adjacent nodes or a certain "realization restriction." This optimization problem was introduced by Christos Papadimitriou and Mihalis Yannakakis in 1989 an…

Key takeaways

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

Reference excerpt

In computer science and graph theory, the Canadian traveller problem (CTP) is a generalization of the shortest path problem to graphs that are partially observable. In other words, a "traveller" on a given point on the graph cannot see the full graph, rather only adjacent nodes or a certain "realization restriction." This optimization problem was introduced by Christos Papadimitriou and Mihalis Yannakakis in 1989 and a number of variants of the problem have been studied since. The name supposedly originates from conversations of the authors who learned of a difficulty Canadian drivers had: traveling a network of cities with snowfall randomly blocking roads. The stochastic version, where each edge is associated with a probability of independently being in the graph, has been given considerable attention in operations research under the name "the Stochastic Shortest Path Problem with Recourse" (SSPPR).

Problem description An instance of the problem specifies the graph and the set of edges that are prone to be blocked. Given an instance, a description of the path to follow, as a function of blocked edges encountered on the way, is called a policy. The CTP task is to find a competitive policy, one that does not deviate too much from the optimum. To compute an actual description of an optimal policy may be a harder problem. Given an instance and policy for the instance, every realization (i.e., set of blocked edges) produces its own (deterministic) walk in the graph. Note that the walk is not necessarily a path since the best strategy may be to, e.g., visit every vertex of a cycle and return to the start. This differs from the shortest path problem (with strictly positive weights), where repetitions in a walk implies that a better solution exists.

Variants There are primarily five parameters distinguishing the number of variants of the Canadian Traveller Problem. The first parameter is how to value the walk produced by a policy for a given instance and realization. In the Stochastic Shortest Path Problem with Recourse, the goal is simply to minimize the cost of the walk (defined as the sum over all edges of the cost of the edge times the number of times that edge was taken). For the Canadian Traveller Problem, the task is to minimize the competitive ratio of the walk; i.e., to minimize the number of times longer the produced walk is to the shortest path in the realization. The second parameter is how to evaluate a policy with respect to different realizations consistent with the instance under consideration. In the Canadian Traveller Problem, one wishes to study the worst case and in SSPPR, the average case. For average case analysis, one must furthermore specify an a priori distribution over the realizations. The third parameter is restricted to the stochastic versions and is about what assumptions we can make about the distribution of the realizations and how the distribution is represented in the input. In the Stochastic Canadian Traveller Problem and in the Edge-independent Stochastic Shortest Path Problem (i-SSPPR), each uncertain edge (or cost) has an associated probability of being in the realization and the event that an edge is in the graph is independent of which other edges are in the realization. Even though this is a considerable simplification, the problem is still #P-hard. Another variant is to make no assumption on the distribution but require that each realization with non-zero probability be explicitly stated (such as “Probability 0.1 of edge set { {3,4},{1,2} }, probability 0.2 of...”). This is called the Distribution Stochastic Shortest Path Problem (d-SSPPR or R-SSPPR) and is NP-complete. The first variant is harder than the second because the former can represent in logarithmic space some distributions that the latter represents in linear space. The fourth and final parameter is how the graph changes over time. In CTP and SSPPR, the realization is fixed but not known. In the Stochastic Shortest Path Problem with Recourse and Resets or the Expected Shortest Path problem, a new realization is chosen from the distribution after each step taken by the policy. This problem can be solved in polynomial time by reducing it to a Markov decision process with polynomial horizon. The Markov generalization, where the realization of the graph may influence the next realization, is known to be much harder. An additional parameter is how new knowledge is being discovered on the realization. In traditional variants of CTP, the agent uncovers the exact weight (or status) of an edge upon reaching an adjacent vertex. A new variant was recently suggested where an agent also has the ability to perform remote sensing from any location on the realization. In this variant, the task is to minimize the travel cost plus the cost of sensing operations.

Formal definition We define the variant studied in the paper from 1989. That is, the goal is to minimize the competitive ratio in the worst case. It is necessary that we begin by introducing certain terms. Consider a given graph and the family of undirected graphs that can be constructed by adding one or more edges from a given set. Formally, let 𝒢(V,E,F)={(V,E+F′)|F′⊆F},E∩F=∅︀ where we think of E as the edges that must be in the graph and of F as the edges that may be in the graph. We say that G∈𝒢(V,E,F) is a realization of the graph family. Furthermore, let W be an associated cost matrix where wij is the cost of going from vertex i to vertex j, assuming that this edge is in the realization. For any vertex v in V, we call EB(v,V) its incident edges with respect to the edge set B on V. Furthermore, for a realization G=(V,B)∈𝒢(V,E,F), let dB(s,t) be the cost of the shortest path in the graph from s to t. This is called the off-line problem because an algorithm for such a problem would have complete information of the graph. We say that a strategy π to navigate such a graph is a mapping from (𝒫(E),𝒫(F),V) to V, where 𝒫(X) denotes the powerset of X. We define the cost c(π,B) of a strategy π with respect to a particular realization G=(V,B) as follows.

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Canadian traveller problem

Start with the simplest possible case. Write down what Canadian traveller problem 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 Canadian traveller problem 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 Canadian traveller problem 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 Canadian traveller problem

In research
Canadian traveller problem 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 Canadian traveller problem 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
Canadian traveller problem is common in secondary-school and first-year university syllabi. It links to neighbouring topics Canada in popular culture, Computational problems in graph theory, PSPACE-complete problems, so understanding it makes those chapters shorter.
In everyday life
Look for Canadian traveller problem 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 “Canadian traveller problem” →

How to study Canadian traveller problem in 20 minutes

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

Frequently asked questions

What is Canadian traveller problem in simple terms?

In computer science and graph theory, the Canadian traveller problem (CTP) is a generalization of the shortest path problem to graphs that are partially observable. In other words, a "traveller" on a given point on the graph cannot see the full graph, rather only adjacent nodes or a certain "realiz…

Why does Canadian traveller problem 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 Canadian traveller problem?

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 Canadian traveller problem.

Tags

  • Canada in popular culture
  • Computational problems in graph theory
  • PSPACE-complete problems
  • Travelling salesman problem

Keep exploring