Graphs and Relational Learning

Advance a probability distribution

BOTIE

Transpose the transition matrix, then multiply it by the current probability vector.
Ready to test
0 passed · 0 failed · 2 not run

An empty floor. Start with the information your machine needs.

Received result

Your answer will arrive here.

Examples, experiments and workspace controls
Live values

Connect a tool's inputs to see what it produces. You can try a branch before connecting it to Result.

Try your own inputs

Use a copy of the example to try your own data. Keep the problem's assumptions in mind, and predict the effect of a change before checking the output. You can also add another branch to compare two ways of doing the calculation.

Start at an output arrow, then click or drag to an input. Drag empty space to pan. Delete removes a selection. Ctrl/Cmd+Z undoes a change.
Context for this challenge

Transpose the transition matrix, then multiply it by the current probability vector.

Botie has probabilities of occupying nodes and transition rows describing where each starting node sends that probability.

Validate the transition rows and current distribution, transpose the transition matrix, and multiply by the current probability vector.

Examples and results
Transition matrix
01
10
Current probabilities
  1. 01
  2. 10
Required result
  1. 00
  2. 11
Transition matrix
0.50.5
0.50.5
Current probabilities
  1. 00.2
  2. 10.8
Required result
  1. 00.5
  2. 10.5
Try a fresh construction

This clears this draft, including its undo history. Earlier successful attempts stay recorded. Build again without opening hints to record an independent attempt.

Stuck? Inspect a worked construction

The tools below form one possible solution. You can assemble it, follow its signals, and undo that change to return to your own construction.

Assumptions and test precision

The supplied matrix must already embody a declared dangling-node policy. Numerical tests allow a difference of 0.001. Lists and structures must also have the right shape.

Probability flows towards an absorbing node

This check uses the pieces from “Gather probability arriving at each destination”.

BOTIE

Botie's transition matrix lists current nodes by row and next nodes by column. Starting probability is split equally between the first two nodes. Move that entire probability distribution forward one step; the third node retains anything that reaches it.
Transition matrix
00.50.5
100
001
Current probabilities
  1. 00.5
  2. 10.5
  3. 20

Use a number, text, or an array matching the requested result. For a matrix, put each row in brackets. Saving your prediction runs your current construction on these inputs and checks the earlier examples too.

Build a construction in the workspace above first. This case will test those pieces.

Why does the column-vector convention require the transpose of these row-stochastic transitions?

Source-to-destination orientation must be explicit before graph multiplication.

The supplied matrix must already embody a declared dangling-node policy.

Work through the Python challenges →
Continue the courseLetting a Node Read Its Neighbours’ Measurements →
← Recording Which Things Are Connected