Touch here to read


Sukhpreet Kainth
Sukhpreet Kainth

/ 28



by Sukhpreet Kainth

  • Views: 3
  • Uploaded 11 days ago
Add to Favourite

Suggested Materials

Leave your Comments


Sukhpreet Kainth

Computer Science Engineering at Aiet punjab

Text from page-1

1 UNIT – 1 UNIT-01/Lecture-01 Basic machine, FSM , Transition graph, Transition matrix Introduction - Theory of computation is a course of abstractions about what we can compute. It is the purest of all computer science topics attempting to strip away any details about the real computer and replacing in it with abstractions that give a hierarchy of capabilities culminating in a Turing Machine, the abstract model of our modern computer, invented by Alan Turing. Abstractions give us a way of saying something about what we are doing in a rigorous formal way, rather than flailing randomly through a haze of informality. There is great value in abstraction. Applications Finite state machines are used in string searching algorithms, compiler design, control unit design in computer architecture, and many other modeling applications. Context free grammars and their restricted forms are the basis of compilers and parsing. NP-Complete theory helps us distinguish the tractable from the intractable. We do not focus on these applications. They are deep enough to require a separate course, and hopefully you have already seen some of them. There is plenty of basic theory to learn, and we will concentrate on providing a thorough understanding of all the abstract ideas with a constructive focus. That is, when we prove things it will be through examples. When we define things, we will motivate their definitions through examples. Finite automata are a useful model for many important kinds of hardware and software:1. Software for designing and checking the behavior of digital circuits. 2. The “lexical analyzer” of a typical compiler, that is, the component that breaks the input text into logical units such as identifiers, keywords and punctuation. 3. Software for scanning large bodies of text, such as collections of web pages to find occurrences of words, phrases or other patterns. 4. Software for verifying systems of types that have a finite number of distinct states such as communications protocols for secure exchange of information. Finite-state machine (FSM) A finite-state machine (FSM) or finite-state automaton (plural: automata), or simply a state machine, is a mathematical model of computation used to design both computer programs and sequential logic circuits. It is conceived as an abstract machine that can be in one of a finite number of states. The machine is in only one state at a time; the state it is in at any given time is called the current state. It can change from one state to another when initiated by a triggering event or condition; this is called a transition. A particular FSM is defined by a list of its states, and the triggering condition for each transition. The behavior of state machines can be observed in many devices in modern society which perform a predetermined sequence of actions depending on a sequence of events with which they are presented. Simple examples are vending machines which dispense products when the proper combination of coins is deposited, elevators which drop riders off at upper floors before going down, traffic lights which change sequence when cars are waiting, and combination locks which require the input of combination numbers in the proper order. Deterministic Finite AutomataA deterministic finite automaton (DFA) consists of 5-tuples M=(Q, Σ , δ, q0, F) 1. Q is a finite set of states 2. Σ is a finite set of input symbols (alphabet) 3. δ is a transition function that takes as argument a state and a symbol and returns a state 4. q0 a start state 5. F is a set of final or accepting states