Semirings for Breakfast

Similar documents
Intelligent Systems: Reasoning and Recognition. Reasoning with Bayesian Networks

Module 10. Reasoning with Uncertainty - Probabilistic reasoning. Version 2 CSE IIT,Kharagpur

Introduction to Kleene Algebras

Motivation. Bayesian Networks in Epistemology and Philosophy of Science Lecture. Overview. Organizational Issues

Axioms of Kleene Algebra

Introduction to Artificial Intelligence. Unit # 11

Kleene Algebras and Algebraic Path Problems

Capturing Independence Graphically; Undirected Graphs

Lecture 5: Bayesian Network

An Introduction to Bayesian Networks: Representation and Approximate Inference

Probabilistic Reasoning; Network-based reasoning

Introduction to Graphical Models. Srikumar Ramalingam School of Computing University of Utah

Introduction to Finite Automaton

Fun with Semirings. A functional pearl on the abuse of linear algebra. Stephen Dolan

Lecture 10: Introduction to reasoning under uncertainty. Uncertainty

Introduction to Graphical Models. Srikumar Ramalingam School of Computing University of Utah

Lecture 15: MCMC Sanjeev Arora Elad Hazan. COS 402 Machine Learning and Artificial Intelligence Fall 2016

A Weak Bisimulation for Weighted Automata

Introduction to Sets and Logic (MATH 1190)

2MA105 Algebraic Structures I

Solving weakly linear inequalities for matrices over max-plus semiring and applications to automata theory

1. Introduction to commutative rings and fields

x y = x + y. For example, the tropical sum 4 9 = 4, and the tropical product 4 9 = 13.

On the Truth Values of Fuzzy Statements

CMPSCI 250: Introduction to Computation. Lecture #29: Proving Regular Language Identities David Mix Barrington 6 April 2012

Understanding and Improving Belief Propagation

Recall from last time: Conditional probabilities. Lecture 2: Belief (Bayesian) networks. Bayes ball. Example (continued) Example: Inference problem

COMP9020 Lecture 3 Session 2, 2014 Sets, Functions, and Sequences. Revision: 1.3

Goal. Partially-ordered set. Game plan 2/2/2013. Solving fixpoint equations

Kleene Algebra and Arden s Theorem. Anshul Kumar Inzemamul Haque

Capturing Independence Graphically; Undirected Graphs

With Question/Answer Animations. Chapter 2

Probabilistic Reasoning; Network-based reasoning

Sets and Motivation for Boolean algebra

Probabilistic Reasoning; Network-based reasoning

Support for Multiple Cause Diagnosis with Bayesian Networks

Logic Synthesis and Verification

Writing proofs for MATH 51H Section 2: Set theory, proofs of existential statements, proofs of uniqueness statements, proof by cases

Department of Computer Science University at Albany, State University of New York Solutions to Sample Discrete Mathematics Examination II (Fall 2007)

Invertible Matrices over Idempotent Semirings

Review of Propositional Calculus

Bayesian Networks BY: MOHAMAD ALSABBAGH

On the coinductive nature of centralizers

Lesson 7: Lesson Summary. Sample Solution. Write a mathematical proof of the algebraic equivalence of ( ) and ( ). ( ) = ( )

The overlap algebra of regular opens

1. Introduction to commutative rings and fields

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2017

Building Algebraic Structures with Combinators

Computation in Valuation Algebras

CS3110 Fall 2013 Lecture 11: The Computable Real Numbers, R (10/3)

MATH 423 Linear Algebra II Lecture 3: Subspaces of vector spaces. Review of complex numbers. Vector space over a field.

Sets. We discuss an informal (naive) set theory as needed in Computer Science. It was introduced by G. Cantor in the second half of the nineteenth

Algebra. Modular arithmetic can be handled mathematically by introducing a congruence relation on the integers described in the above example.

Limits and Continuity

1. Definition of a Polynomial

Implementing Machine Reasoning using Bayesian Network in Big Data Analytics

Generative Techniques: Bayes Rule and the Axioms of Probability

Probabilistic Assessment of Security Scenarios Challenges and Solutions

Bounded Model Checking with SAT/SMT. Edmund M. Clarke School of Computer Science Carnegie Mellon University 1/39

An Abstract Approach to Consequence Relations

ZEROS OF POLYNOMIAL FUNCTIONS ALL I HAVE TO KNOW ABOUT POLYNOMIAL FUNCTIONS

Boolean Algebras. Chapter 2

Tropical Islands. Jan Verschelde

Announcements. CS 188: Artificial Intelligence Spring Probability recap. Outline. Bayes Nets: Big Picture. Graphical Model Notation

Probabilistic Models

COMP538: Introduction to Bayesian Networks

19. Basis and Dimension

REVIEW QUESTIONS. Chapter 1: Foundations: Sets, Logic, and Algorithms

Notation Index. gcd(a, b) (greatest common divisor) NT-16

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

Monadic GMV -algebras

Economics 204 Summer/Fall 2011 Lecture 2 Tuesday July 26, 2011 N Now, on the main diagonal, change all the 0s to 1s and vice versa:

A Discrete Duality Between Nonmonotonic Consequence Relations and Convex Geometries

CS 188: Artificial Intelligence Spring Announcements

Relations. Relations. Definition. Let A and B be sets.

TROPICAL SCHEME THEORY. Idempotent semirings

Uncertainty and knowledge. Uncertainty and knowledge. Reasoning with uncertainty. Notes

Discrete Structures: Solutions to Sample Questions, Exam 2

Provenance Semirings. Todd Green Grigoris Karvounarakis Val Tannen. presented by Clemens Ley

Tues Feb Vector spaces and subspaces. Announcements: Warm-up Exercise:

MIT Martin Rinard Laboratory for Computer Science Massachusetts Institute of Technology

Algorithms for Computing Complete Deterministic Fuzzy Automata via Invariant Fuzzy Quasi-Orders

Denotational Semantics

Lecture 1: Lattice(I)

Elements of Representation Theory for Pawlak Information Systems

CS 455/555: Mathematical preliminaries

Topics in Complexity Theory

What Causality Is (stats for mathematicians)

Bayesian Networks for Causal Analysis

Rational Exponents. Polynomial function of degree n: with leading coefficient,, with maximum number of turning points is given by (n-1)

Data Cleaning and Query Answering with Matching Dependencies and Matching Functions

03 Review of First-Order Logic

Infinite-Dimensional Triangularization

Uncertainty and Bayesian Networks

Honors Advanced Mathematics November 4, /2.6 summary and extra problems page 1 Recap: complex numbers

Exact Inference Algorithms Bucket-elimination

CS 5522: Artificial Intelligence II

Math Linear algebra, Spring Semester Dan Abramovich

CS 5522: Artificial Intelligence II

PRACTICE PROBLEMS: SET 1

Transcription:

Semirings for Breakfast Marc Pouly marc.pouly@unifr.ch Interdisciplinary Center for Security, Reliability and Trust University of Luxembourg July 2010 Marc Pouly Semirings for Breakfast 1/ 27

Semirings Algebraic structure with two operations + and over a set A. + and are associative + is commutative distributes over +: a (b + c) = (a b) + (a c) If is commutative too commutative semiring Marc Pouly Semirings for Breakfast 2/ 27

Examples I Arithmetic Semirings: R, +,, Z, +,, N, +,,... Boolean Semiring: {0, 1},, Tropical Semiring: N, min, + Arctic Semiring: N, max, + Possibilistic Semiring: [0, 1], max, Powerset lattice: P(S),, Bottleneck Semiring: R, max, min Truncation Semiring: {0,..., k}, max, min{a + b, k} Lukasiewicz Semiring: [0, 1], min, max{a + b 1, 0} Division Semiring: N, lcm, gcd Formal Languages: P(Σ ),, not commutative Marc Pouly Semirings for Breakfast 3/ 27

Examples II Vectors over semirings form a semiring Matrices over semirings form a semiring Polynomials over semirings form a semiring... Marc Pouly Semirings for Breakfast 4/ 27

Today s Breakfast Lessons 2 reasons why computer scientists are interested in semirings: they reduce problem complexity they enable generic problem solving 2 reasons why mathematicians are interested in semirings: ordered semirings are fundamentally different from fields new research fields thanks to applications in CS Marc Pouly Semirings for Breakfast 5/ 27

Today s Breakfast Lessons 2 reasons why computer scientists are interested in semirings: they reduce problem complexity they enable generic problem solving 2 reasons why mathematicians are interested in semirings: ordered semirings are fundamentally different from fields new research fields thanks to applications in CS Marc Pouly Semirings for Breakfast 5/ 27

Lesson 1: Reducing Problem Complexity Marc Pouly Semirings for Breakfast 6/ 27

Bayesian Networks p(a) =0.01 p(s) =0.4 Visit to Asia Smoking p(t a) =0.05 p(t a) =0.01 Tuberculosis p(l s) =0.1 p(l s) =0.01 Lung Cancer Bronchitis p(b s) =0.6 p(b s) =0.3 p(x e) =0.98 p(x e) =0.05 pos. X-ray Either T or L Dyspnoea p(d e,b)=0.9 p(d e, b) =0.7 p(d e,b)=0.8 p(d e, b) =0.1 Marc Pouly Semirings for Breakfast 7/ 27

Medical Diagnostics A patient turns to a doctor and complains about shortness of breath (Dyspnoea). Also, she confirms a recent trip to Asia. What is the probability that she suffers from Bronchitis? p(b A, D) = p(a, B, D) p(a, D) This requires to compute p(a, B, D) = p(a, B, D, E, L, S, T, X) E,L,S,T,X with p(a, B, D, E, L, S, T, X) = p(a) p(t A) p(d E, B) Marc Pouly Semirings for Breakfast 8/ 27

Medical Diagnostics A patient turns to a doctor and complains about shortness of breath (Dyspnoea). Also, she confirms a recent trip to Asia. What is the probability that she suffers from Bronchitis? p(b A, D) = p(a, B, D) p(a, D) This requires to compute p(a, B, D) = p(a, B, D, E, L, S, T, X) E,L,S,T,X with p(a, B, D, E, L, S, T, X) = p(a) p(t A) p(d E, B) Marc Pouly Semirings for Breakfast 8/ 27

Complexity Concerns p(a, B, D, E, L, S, T, X) is a table with 2 8 values A joint prob. distribution over n variables has 2 n entries Quick Medical Reference has more than 5000 variables Solution: Apply the distributive law: p(a, B, D) = p(a, B, D, E, L, S, T, X) is equal to E,L,S,T,X p(a) E p(d B, E) X ( ( ( ))) p(x E) p(t A) p(e L, T ) p(l S)p(B S)p(S) T L S Marc Pouly Semirings for Breakfast 9/ 27

Complexity Concerns p(a, B, D, E, L, S, T, X) is a table with 2 8 values A joint prob. distribution over n variables has 2 n entries Quick Medical Reference has more than 5000 variables Solution: Apply the distributive law: p(a, B, D) = p(a, B, D, E, L, S, T, X) is equal to E,L,S,T,X p(a) E p(d B, E) X ( ( ( ))) p(x E) p(t A) p(e L, T ) p(l S)p(B S)p(S) T L S Marc Pouly Semirings for Breakfast 9/ 27

Complexity Concerns p(a) E p(d B, E) X ( ( ( ))) p(x E) p(t A) p(e L, T ) p(l S)p(B S)p(S) T L S The largest intermediate table involves 4 variables Semirings allow to reduce complexity. Intuitively, compare the number of operations a (b + c) = (a b) + (a c) The fusion algorithm produces such factorizations Marc Pouly Semirings for Breakfast 10/ 27

Lesson 2: Generic Reasoning Marc Pouly Semirings for Breakfast 11/ 27

Generic Reasoning The fusion algorithm is only based on the properties of a commutative semiring We can exchange the semiring in the problem description Example: take [0, 1], max, instead of R, +, max p(a, B, D, E, L, S, T, X) = E,L,S,T,X ( ( ( ))) p(a) max p(d B, E) max p(x E) max p(t A) max p(e L, T ) max p(l S)p(B S)p(S) This identifies the value of the most probable configuration Marc Pouly Semirings for Breakfast 12/ 27

Beyond Bayesian Networks The same computational problem over different semirings: {0, 1},, crisp constraint reasoning N, min, + weighted constraint reasoning [0, 1], max, possibilistic constraint reasoning P(S),, assumption-based reasoning Different semirings different semantics of the same problem the same algorithm the same complexity the same implementation Marc Pouly Semirings for Breakfast 13/ 27

Lesson 3: A fundamentally different Branch of Mathematics Marc Pouly Semirings for Breakfast 14/ 27

Semirings and Order I We introduce the following relation on a semiring: a b if, and only if c A such that a + c = b Reflexivity: a a Transitivity: a b and b c a c Conclusion: is a preorder called canonical preorder All semirings provide a canonical preorder Marc Pouly Semirings for Breakfast 15/ 27

Semirings and Order I We introduce the following relation on a semiring: a b if, and only if c A such that a + c = b Reflexivity: a a Transitivity: a b and b c a c Conclusion: is a preorder called canonical preorder All semirings provide a canonical preorder Marc Pouly Semirings for Breakfast 15/ 27

Semirings and Order II In general, is not antisymmetric, i.e. a b and b a a = b Example: in Z, +, we have 1 2 and 2 1 Does not only hold for Z, +, but for all structures with inverse additive elements Antisymmetry of contradicts the group structure of (A, +) Marc Pouly Semirings for Breakfast 16/ 27

Semirings and Order II In general, is not antisymmetric, i.e. a b and b a a = b Example: in Z, +, we have 1 2 and 2 1 Does not only hold for Z, +, but for all structures with inverse additive elements Antisymmetry of contradicts the group structure of (A, +) Marc Pouly Semirings for Breakfast 16/ 27

Dioids This splits algebra into: semirings with additive inverse elements (e.g. fields) semirings with a canonical partial order called dioids Dioid theory is fundamentally different from maths over fields Are dioids of (practical) importance? Marc Pouly Semirings for Breakfast 17/ 27

Examples of Dioids Theorem Semirings with idempotent + (i.e. a + a = a) are always dioids. Arithmetic Semirings: R, +,, Z, +,, N, +,,... Boolean Semiring: {0, 1},, Tropical Semiring: N, min, + Arctic Semiring: N, max, + Possibilistic Semiring: [0, 1], max, Powerset lattice: P(S),, Bottleneck Semiring: R, max, min Truncation Semiring: {0,..., k}, max, min{a + b, k} Lukasiewicz Semiring: [0, 1], min, max{a + b 1, 0} Division Semiring: N, lcm, gcd Formal Languages: P(Σ ),, not commutative Marc Pouly Semirings for Breakfast 18/ 27

Examples of Dioids Theorem Semirings with idempotent + (i.e. a + a = a) are always dioids. Arithmetic Semirings: R, +,, Z, +,, N, +,,... Boolean Semiring: {0, 1},, Tropical Semiring: N, min, + Arctic Semiring: N, max, + Possibilistic Semiring: [0, 1], max, Powerset lattice: P(S),, Bottleneck Semiring: R, max, min Truncation Semiring: {0,..., k}, max, min{a + b, k} Lukasiewicz Semiring: [0, 1], min, max{a + b 1, 0} Division Semiring: N, lcm, gcd Formal Languages: P(Σ ),, not commutative Marc Pouly Semirings for Breakfast 18/ 27

Lesson 4: Application of Dioid Theory Marc Pouly Semirings for Breakfast 19/ 27

Shortest Distance from S to T 2 C 3 6 B D 1 5 S 9 A 4 T Compute and then 9 + 4 = 13 1 + 6 + 5 = 12 1 + 2 + 3 + 5 = 11 min{13, 12, 11} = 11 Marc Pouly Semirings for Breakfast 20/ 27

Connectivity of S and T 1 C 0 1 B D 1 1 S 0 A 1 T Compute and then min{0, 1} = 0 min{1, 1, 1} = 1 min{1, 1, 0, 1} = 0 max{0, 1, 0} = 1 Marc Pouly Semirings for Breakfast 21/ 27

Largest Capacity from S to T 4.2 C 3.5 5.5 B D 3.6 5.1 S 3.4 A 4.5 T Compute and then min{3.4, 4.5} = 3.4 min{3.6, 5.5, 5.1} = 3.6 min{3.6, 4.2, 3.5, 5.1} = 3.5 max{3.4, 3.6, 3.5} = 3.6 Marc Pouly Semirings for Breakfast 22/ 27

Maximum Reliability from S to T 0.9 C 1.0 0.2 B D 0.9 0.7 S 0.4 A 0.8 T Compute and then 0.4 0.8 = 0.32 0.9 0.2 0.7 = 0.126 0.9 0.9 1.0 0.7 = 0.567 max{0.32, 0.126, 0.567} = 0.567 Marc Pouly Semirings for Breakfast 23/ 27

Language leading from S to T in the Automaton {c} C {b} B {b} D {a} {a} S {a} A {c} T Compute {a} {c} = {ac} {a} {b} {a} = {aba} {a} {c} {b} {a} = {acba} and then {{ac}, {aba}, {acba}} = {ac, aba, acba} Marc Pouly Semirings for Breakfast 24/ 27

The Algebraic Path Problem These are path problems over different semirings If M denotes the matrix of edge weights in the graph, all-pairs path problems are solved by computing D = r 0 M r = I + M + M 2 + M 3 +... This is an infinite series of semiring matrices A solution is obtained if the series converges. This requires the notion of a topology Marc Pouly Semirings for Breakfast 25/ 27

The Algebraic Path Problem These are path problems over different semirings If M denotes the matrix of edge weights in the graph, all-pairs path problems are solved by computing D = r 0 M r = I + M + M 2 + M 3 +... This is an infinite series of semiring matrices A solution is obtained if the series converges. This requires the notion of a topology Marc Pouly Semirings for Breakfast 25/ 27

Semiring Topology The partial order in dioids allows to introduce a particular topology and to study the convergence of the series Theorem If the limit D exists, then it corresponds to the least solution to the fixpoint equation X = MX + I Hence, arbitrary path problems are computed by a single algorithm that solves a dioid fixpoint equation system This was the hour of birth of semiring topology Marc Pouly Semirings for Breakfast 26/ 27

Semiring Topology The partial order in dioids allows to introduce a particular topology and to study the convergence of the series Theorem If the limit D exists, then it corresponds to the least solution to the fixpoint equation X = MX + I Hence, arbitrary path problems are computed by a single algorithm that solves a dioid fixpoint equation system This was the hour of birth of semiring topology Marc Pouly Semirings for Breakfast 26/ 27

Recap of today s Breakfast Lessons 2 reasons why computer scientists are interested in semirings: they reduce problem complexity they enable generic problem solving 2 reasons why mathematicians are interested in semirings: ordered semirings are fundamentally different from fields new research fields thanks to applications in CS Marc Pouly Semirings for Breakfast 27/ 27