Harvard-MIT Division of Health Sciences and Technology HST.952: Computing for Biomedical Scientists Data and Knowledge Representation Lecture 6 Last Time We Talked About z Major KR schemes z Semantic Network z Frame-based Representation z Production Rules Today We Will Talk About z Process z Finite state machine z Flow chart z Petri Net Process z Object: z E.g. continuant diagnosis, medication, data repository z Process: z E.g. occurrent diagnose, treat, retrieve Describing Process z Predicate z treat logic (Dr. Jones, Ms. List) z Frame-based system z Patient Frame has a slot “primary care” or “attending physician” z There are more about “treat” to specify z When, where, how, why, what result Types of Process Process Continuous Process Discrete Process Event Cessation Initiation Continuation State Example z Continuous Process z Aging z Discrete z Out Process patient visit (make appointment, check in with nurse, see a doctor, have test/receive medication) Basic Distinctions z Discrete or continuous z Linear or branching z Independent or ramified z Immediate or delayed z Sequential or concurrent z Predictable or surprising Basic Distinctions z Normal or equinomral z Flat or hierarchical z Timeless or time-bound z Forgetful or memory-bound Process, Procedure and History z Sequence of events and state z Process: one event or state is current z Procedure: abstract (pattern or script of processes) z History: record of a past process Finite State Machine (FSM) z Discrete process (continuous process can be simulated with fine time steps) z State transition diagram z Formal Definition: zA finite set of states: Q z A finite set of inputs: I z A transition function F(Q, I) -> Q, F can be a partial Function FSM z Basic components: state (circle), transition (arrow), input (label on the arrow) z End state can be marked with double circles FSM normal blood sugar in test 1 No DB Suspect DB High blood sugar in test 1 Highly suspect DB normal blood sugar in test 2 High blood sugar in test 2 Confirmed DB Flow Chart z Event (box) and decision (diamond) z Arrow (transition) and label on the arrow (condition for decision) z Start and end can be specified with box Petri Net zA finite set of places (circle) z A finite set of transactions (line) z A finite set of arrows connecting either places to transactions or transactions to places Petri Net z Marking: assign a non-negative integer to each place. (dot/token) z Firing: a transaction take place after enabled z Firing sequence: the sequence of transaction firings for a given PN with a given initial marking Petri Net z Conflict z Starvation z Deadlock Petri Net z Assign values to tokens z Define functions for transaction z Specify scheduling policies z Times Petri Net Exercise Overweight patients should be instructed either excise regularly or keep a healthy diet for 3 months. When one fails, try both for 3 months. When both fail, a patient should be given medication x for 2 months. Reading z Sowa Chap. 3