1 / 8

Models of Computation - State Transition Diagrams

Department of Computer and Information Science, School of Science, IUPUI. Models of Computation - State Transition Diagrams. CSCI 230. Dale Roberts, Lecturer Computer Science, IUPUI E-mail: droberts@cs.iupui.edu. Models of Computation. What is a model?

dunn
Download Presentation

Models of Computation - State Transition Diagrams

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Department of Computer and Information Science,School of Science, IUPUI Models of Computation - State Transition Diagrams CSCI 230 Dale Roberts, Lecturer Computer Science, IUPUI E-mail: droberts@cs.iupui.edu

  2. Models of Computation • What is a model? • Capture the important properties of the real thing • probably be different in scale from the real thing • suppress details of the real thing • lack full functionality of the real thing Example: A model to compute the distance traveled for a moving vehicle: d = r*t or t = d/r d = distance; r = rate of speed; t = time

  3. Why we need models if they are not the real thing? • By changing some aspects, we can observe their effects • Can provide an environment for learning • They can be used as design tools without actually building the real thing – for economic reasons • In summary, they can be predict, can be used for training, can be used as test beds.

  4. Model of a Computing Agent Q: Operations in an algorithm must be unambiguous and effectively computable. Therefore, could we design a model of an algorithm before we implement the algorithm in hardware and /or software? A: A computing agent (robot) is a thing/a person that carries out the operations described in an algorithm.

  5. Input Environment ? agent Output motor • Properties of a Computing Agent • can accept an input • can store & retrieve information from memory • can take actions according to instructions – the actions may depend upon a present state and the current input • can produce an output • Agent • So, what is a State?

  6. Phone 0/1 (input) Office 0/1 Answer the Phone 0/1 (output) A Concept of a State Consider a simple scenario: If I am in my office: if the phone rings; I’ll answer the phone and leave my office if the phone does not ring; I’ll not answer the phone and will stay in the office If I am NOT in my office: if the phone rings; I’ll NOT answer the phone but I’ll come back to my office if the phone does not ring; I’ll not answer it and will stay away from the office Phone ring I am in office Answer I will be in office? 1 1 1 0 0 1 0 1 1 0 0 1 0 0 0 0 function notation

  7. 1 / 1 in office out of office 0 / 0 A B 0 / 0 1 / 0 Present State Next State (Output) phone = 0 phone = 1 A A, 0 B, 1 B B, 0 A, 0 State Transition Diagrams • Output depends NOT ONLY on the INPUT, but also depends on the internal (current) state of the office (0/1). Let A: is a state when I’m in the office B: is a state when I’m NOT in the office State TableState Transition Diagram

  8. State Transition Diagrams • What does the following state transition diagram do? nonalpha/nonalpha A B alpha/alpha nonalpha/nonalpha alpha/upper(alpha)

More Related