Kleene Algebra Graphs and Matrices Roland Backhouse October 8, - - PowerPoint PPT Presentation

kleene algebra graphs and matrices
SMART_READER_LITE
LIVE PREVIEW

Kleene Algebra Graphs and Matrices Roland Backhouse October 8, - - PowerPoint PPT Presentation

1 Kleene Algebra Graphs and Matrices Roland Backhouse October 8, 2002 2 Outline Matrices represent graphs Addition as choice Matrix multiplication as edge concatenation Powers as paths of given edge length 3 Extremal Path


slide-1
SLIDE 1

1

Kleene Algebra Graphs and Matrices

Roland Backhouse October 8, 2002

slide-2
SLIDE 2

2

Outline

  • Matrices represent graphs
  • Addition as choice
  • Matrix multiplication as edge concatenation
  • Powers as paths of given edge length
slide-3
SLIDE 3

3

Extremal Path Problems

✖✕ ✗✔ a ✖✕ ✗✔ b ✖✕ ✗✔ d ✖✕ ✗✔ c ✲ 3 ❄ 4 ✻ 2 ❅ ❅ ❅ ❅ ❅ ❅ ❅ ❘ 5 ✛ 2 ✲ 8 A graph consists of a finite set of nodes, V, a finite set of edges, E and two functions source and target, each with domain E and range V. A path through the graph from node s to node t of edge length n is a finite sequence of nodes x0, x1, . . . , xn such that s= x0 and t= xn and, for each i, 0≤i <n, there is an edge in the graph from xi to xi+1. A graph is labelled if it is supplied with a function label whose domain is the set of edges, E.

slide-4
SLIDE 4

4

Extremal Path Problems

Edge labels are used to “weight” paths, and the problem is to find the “extreme” weight of paths between given pairs of nodes.

  • Reachability – is there a path?
  • Shortest or least cost paths.
  • Bottleneck problems.
  • All paths (considered in a later lecture).
slide-5
SLIDE 5

5

Graphs

An m×n matrix is the same as an m×n “bipartite” graph. Eg. a 2×3 matrix: ✖✕ ✗✔ a ✖✕ ✗✔ c ✖✕ ✗✔ b ✖✕ ✗✔ d ✖✕ ✗✔ e ✲ 3 ❅ ❅ ❅ ❅ ❅ ❅ ❅ ❘ 5 ✲ 8 ❅ ❅ ❅ ❅ ❅ ❅ ❅ ❘ 7

slide-6
SLIDE 6

6

Matrix Algebra — Addition

Let A and B denote two matrices both of dimension m×n. Then the sum A+B is a matrix of dimension m×n defined by (A+B)ij = aij + bij .

slide-7
SLIDE 7

7

Matrix Algebra — Multiplication

Let A denote a real matrix of dimension m×n and let B denote a real matrix of dimension n×p. Then the product A·B of the two matrices is a matrix of dimension m×p where (A·B)ij = Σk : 0≤k <n : aik·bkj .

slide-8
SLIDE 8

8

Properties

For all matrices A, B and C of appropriate dimensions, A+B = B+A A +(B+C) = (A+B) +C (A·B)·C = A·(B·C) A·(B+C) = A·B + A·C (B+C)·A = B·A + C·A These properties are inherited from the corresponding properties of the elements. Note that product is not symmetric.

slide-9
SLIDE 9

9

Zero and Unit Matrices

For each pair of natural numbers m and n there is a zero matrix of dimension m×n whose (i,j)th entry is 0 for all i and j. Denote zero matrices by 0 leaving the dimension to be deduced from the context. A+0 = A = 0+A A·0 = 0 = 0·A For each natural number m there is a unit matrix of dimension m×m whose (i,j)th entry is 0 whenever i= j and is 1 whenever i= j. Denote unit matrices by 1, again leaving the dimension to be deduced from the context. A·1 = A = 1·A

slide-10
SLIDE 10

10

Idempotent Addition

If addition at the element level is idempotent, then addition of matrices is idempotent. ∀a :: a+a= a ⇒ ∀A :: A+A = A . The inherited ordering relation on matrices is the so-called pointwise

  • rdering.

A ˙ ≤ B ≡ ∀i,j :: Aij ≤ Bij

slide-11
SLIDE 11

11

Powers

For m×m matrices, powers are well-defined. A0 = 1 An+1 = A·An An represents paths through the graph A of edge-length n. The (i,j)th element of An is the sum over all paths p of edge-length n from node i to node j of the weight of path p.