Models of Computation, Recall Register Machines. A register machine (sometimes abbreviated to RM) is specified by:
|
|
- Bartholomew Hines
- 6 years ago
- Views:
Transcription
1 Models of Computation, Definition Recall Register Machines A register machine (sometimes abbreviated M) is specified by: Slide 1 finitely many registers R 0, R 1,..., R n, each capable of storing a natural number; a program consisting of a finite list of instructions of the form label : body where, for i = 0,1,2,..., the (i + 1) th instruction has label L i. The instruction body takes the form: R + L add 1 to contents of register R and jump to instruction labelled L R L,L if contents of R is > 0, then subtract 1 and jump to L, else jump to L HALT stop executing instructions Recall the Codings of Pairs, Lists and programs x,y 2 x (2y + 1) Pairs For x,y N, define x,y 2 x (2y + 1) 1 Slide 2 Lists For l List N, define l N by [] 0 x :: l x, l = 2 x (2 l + 1) Programs P [ body 0,..., body n ] where body is: R + i L j 2i,j R i L j,l k 2i + 1, j,k HALT 0
2 Models of Computation, Recall Addition f(x, y) x + y is Computable Slide 3 Registers R 0 R 1 R 2 Program L 0 : R 1 L 1,L 2 L 1 : R + 0 L 0 L 2 : R 2 L 3,L 4 L 3 : R + 0 L 2 Graphical Representation START L 4 : HALT HALT If the machine starts with registers (R 0,R 1,R 2 ) = (0,x,y), it halts R 1 R 2 with registers (R 0,R 1,R 2 ) = (x + y,0,0). R + 0 R + 0 Coding of the RM for Addition P [ B 0,..., B 4 ] where Slide 4 B 0 = R 1 L 1,L 2 = (2 1) + 1, 1,2 = 3,9 = 8 (18 + 1) = 152 B 1 = R + 0 L 0 = 2 0,0 = 1 B 2 = R 2 L 3,L 4 = (2 2) + 1, 3,4 = 5,(8 9) 1 = 5,71 = 2 5 ((2 71) + 1) = = 4576 B 3 = R + 0 L 2 = 2 0,2 = 5 B 4 = HALT = 0.
3 Models of Computation, Decoding Numbers as Bodies and Programs Any x N decodes to a unique instruction body(x): Slide 5 if x = 0 then body(x) is HALT, else (x > 0 and) let x = y,z in if y = 2i is even, then body(x) is R + i L z, else y = 2i + 1 is odd, let z = j,k in body(x) is R i L j,l k So any e N decodes to a unique program prog(e), called the register machine program with index e: prog(e) L 0 :body(x 0 ). where e = [x 0,...,x n ] L n :body(x n ) Example of prog(e) Slide = = 0b110. {z.. 0 } = [18, 0] 18 0 s 18 = 0b10010 = 1, 4 = 1, 0,2 = R 0 L 0,L 2 0 = HALT So prog(786432) = L 0 :R 0 L 0,L 2 L 1 :HALT
4 Models of Computation, Notice that, when e = 0, we have 0 = [] so prog(0) is the program with an list of instructions, which by convention we regard as a RM that does nothing (i.e. that halts immediately). Also, notice in slide 6 the jump to a label with no body (an erroneous halt). Again, choose some numbers and see what the register-machine programs they correspond to. Gadgets To construct register machines which perform complex operations, we introduce gadgets which are small components used to perform small specific operations. A gadget is defined informally as a partial register-machine graph that has a designated initial label and one or more designated labels (which contain no instructions). The gadget operates on registers specified in the gadget s name, and are used for input and output we call these the input/output registers. The gadget may use other registers for temporary storage we call these scratch registers. The gadget assumes the scratch registers are initially set to 0, and must ensure that they are set back to 0 when the gadget s. Ensuring that the scratch registers are reset to 0 is important so that the gadget may be safely used within loops. Gadgets A gadget is a partial register-machine graph. It has one entry wire, and one or more wires. Slide 7 The gadget operates on input and output registers specified in the gadget s name. The gadget may use other registers, called scratch registers, for temporary storage. The gadget assumes the scratch registers are initially set to 0, and must ensure that they are set back to 0 when the gadget s.
5 Models of Computation, Gadget: zero R 0 Slide 8 The gadget zero R 0 sets register R 0 to be zero, whatever its initial value: entry R 0
6 Models of Computation, Gadget: add R 1 2 The gadget add R 1 2 adds the initial value of R 1 to register R 2, storing the result in R 2 but restoring R 1 to its initial value. entry Slide 9 R + 2 R 1 S + S R + 1 We can compose gadgets, constructing bigger gadgets and eventually complete register machines. To construct such bigger gadgets, we rename the registers used by each gadget: all of its scratch registers are renamed to things that do not occur in the rest of the machine, and its input/output registers are renamed to whichever registers the program requires. We then wire up the gadgets to make bigger gadgets, by joining (possibly many) wires to the unique entry wire. For example, consider the gadget copy R 1 2 defined on slide 10. We will use this gadget to construct the universal register machine. The gadget copy R 1 2 copies the value of register R 1 into register R 2, leaving R 1 with its initial value. It does this by joining together the zero and add gadgets: it first sets register R 2 to zero, then adds the value of R 1 2 and leaves the value of R 1 the same, using some unnamed scratch register inside the add gadget.
7 Models of Computation, Gadget: copy R 1 2 The gadget copy R 1 2 copies the value of register R 1 into register R 2, leaving R 1 with its initial value: entry Slide 10 zero R 2 add R 1 2 Now to construct the instance copy R 1 3 of the gadget, we rename the scratch register R 3 to be something completely fresh, say R 7, and rename R 1 and R 2 1 and R 3 respectively. Joining these gadgets together, we obtain the larger gadget copy R 1 2 and R 3.
8 Models of Computation, Gadget : copy R 1 2 and R 3 entry Slide 11 copy R 1 2 copy R 1 3 Gadget: copy R 1 2 and R 3 entry zero R 2 Slide 12 add R 1 2 zero R 3 add R 1 3
9 Models of Computation, Gadget: copy R 1 2 and R 3 entry R + 2 R 2 Slide 13 S + 1 R 1 S 1 R + 1 R + 3 R 3 S + 2 R 1 S 2 R + 1 Recall the register machine for multiplication given earlier in the course, which multiplies R 1 by R 2 and stores the result in R 0, possibly overwriting the initial values of R 1 and R 2. We can construct this register machine using the zero and add gadgets.
10 Models of Computation, Gadgets: multiply R 1 by R 2 0 We can implement multiply R 1 by R 2 0 by repeated addition: entry Slide 14 zero R 0 R 1 add R 2 0 As well as the copy gadget, we require two more gadgets to define the universal register machine: push X to L and pop L to X. Given input values X = x and L = l, the gadget push X to L returns the value X = 0 and L = 2 x (2l + 1). Given input value L = x,l and X = y, the gadget pop L to X returns X = x and L = l. Given input L = 0, the gadget returns X = 0 and L = 0.
11 Models of Computation, Gadget: push X to L The gadget push X to L : Slide 15 entry Z + L Z X Z + L + Given input values X = x, L = l and Z = 0, it returns the output values X = 0,L = x,l = 2 x (2l + 1) and Z = 0: Z + 2L = 2 x X (2l + 1) L = 2 x X (2l + 1), Z = 0 Slide 16 entry Z + L Z X Z + L + X = x, L = l, Z = 0 Z + L = 2 x X (2l + 1) X = 0, L = 2 x (2l + 1), Z = 0
12 Models of Computation, The gadget pop L to X : Gadget: pop L to X X + Slide 17 L + L Z Z entry X L Z + L + If L = 0 then return X = 0 and go to. If L = x,l then return X = x and L = l, and go to. n = 2 X+1 L, Z = 0 n = 2 X (L + Z) n = 2 X (2L + Z) Slide 18 L = n, X = y, Z = 0 L + entry X L X + L Z Z + L + Z n = 2 X (2L + Z + 1) n = 0 = L = X = Z n = 2 X (2L + 1), Z = 0
13 Models of Computation, The Universal Register machine A universal register machine (URM) is a register machine that can simulate an arbitrary register machine on arbitrary input. It achievs this by reading the code (unique description) of the machine to be simulated and the code (unique description) of the input. The Universal Register Machine The universal regiseter machine carries out the following computation, starting with R 0 = 0, R 1 = e (code of a program), R 2 = a (code of Slide 19 a list of arguments) and all other registers zeroed: decode e as a RM program P decode a as a list of register values a 1,..., a n carry out the computation of the RM program P starting with R 0 = 0,R 1 = a 1,...,R n = a n (and any other registers occurring in P set to 0).
14 Models of Computation, Mnemonics for the registers of U and the role they play in its program: R 0 result of the simulated RM computation (if any). R 1 P code of the RM to be simulated R 2 A code of current register contents of simulated RM Slide 20 R 3 PC program counter number of the current instruction (counting from 0) R 4 N code of the current instruction body R 5 C type of the current instruction body R 6 R current value of the register to be incremented or decremented by current instruction (if not HALT ) R 7 S and R 8 T are auxiliary registers. R 9... other scratch registers. Overall structure of the URM 1 copy PC th item of list in P to N (halting if PC > length of list); goto 2 2 if N = 0 then halt, else decode N as y,z ; C ::= y; N ::= z; Slide 21 goto 3 {at this point either C = 2i is even and current instruction is R + i L z, or C = 2i + 1 is odd and current instruction is R i L j,l k where z = j,k } 3 copy ith item of list in A ; goto 4 4 execute current instruction on R; update PC to next label; restore register values ; goto 1
15 Models of Computation, Gadget: copy R 1 2 The gadget copy R 1 2 copies the value of register R 1 into register R 2, leaving R 1 with its initial value: entry Slide 22 zero R 2 add R 1 2 Gadget: push X to L The gadget push X to L : Slide 23 entry Z + L Z X Z + L + Given input values X = x, L = l and Z = 0, it returns the output values X = 0,L = x,l = 2 x (2l + 1) and Z = 0:
16 Models of Computation, The gadget pop L to X : Gadget: pop L to X X + Slide 24 L + L Z Z entry X L Z + L + If L = 0 then return X = 0 and go to. If L = x,l then return X = x and L = l, and go to. The Universal Register Machine Slide 25 START pop S 0 copy P to T pop T to N P 0 to C HALT copy N R + R N + to S
17 Models of Computation, The Universal Register Machine Slide 26 START pop S 0 copy P to T pop T to N P 0 to C HALT copy N R + R N + to S The Universal Register Machine Slide 27 START pop S 0 copy P to T pop T to N P 0 to C HALT copy N R + R N + to S
18 Models of Computation, The Universal Register Machine Slide 28 START pop S 0 copy P to T pop T to N P 0 to C HALT copy N R + R N + to S The Universal Register Machine Slide 29 START pop S 0 copy P to T pop T to N P 0 to C HALT copy N R + R N + to S
Register machines L2 18
Register machines L2 18 Algorithms, informally L2 19 No precise definition of algorithm at the time Hilbert posed the Entscheidungsproblem, just examples. Common features of the examples: finite description
More informationCSC : Homework #3
CSC 707-001: Homework #3 William J. Cook wjcook@math.ncsu.edu Monday, March 15, 2004 1 Exercise 4.13 on page 118 (3-Register RAM) Exercise 4.13 Verify that a RAM need not have an unbounded number of registers.
More informationCSE 200 Lecture Notes Turing machine vs. RAM machine vs. circuits
CSE 200 Lecture Notes Turing machine vs. RAM machine vs. circuits Chris Calabro January 13, 2016 1 RAM model There are many possible, roughly equivalent RAM models. Below we will define one in the fashion
More information(a) Definition of TMs. First Problem of URMs
Sec. 4: Turing Machines First Problem of URMs (a) Definition of the Turing Machine. (b) URM computable functions are Turing computable. (c) Undecidability of the Turing Halting Problem That incrementing
More informationTuring Machine Variants
CS311 Computational Structures Turing Machine Variants Lecture 12 Andrew Black Andrew Tolmach 1 The Church-Turing Thesis The problems that can be decided by an algorithm are exactly those that can be decided
More informationAutomata Theory CS S-12 Turing Machine Modifications
Automata Theory CS411-2015S-12 Turing Machine Modifications David Galles Department of Computer Science University of San Francisco 12-0: Extending Turing Machines When we added a stack to NFA to get a
More informationComputability Theory
Computability Theory Cristian S. Calude and Nicholas J. Hay May June 2009 Computability Theory 1 / 155 1 Register machines 2 Church-Turing thesis 3 Decidability 4 Reducibility 5 A definition of information
More informationLecture 13: Sequential Circuits, FSM
Lecture 13: Sequential Circuits, FSM Today s topics: Sequential circuits Finite state machines Reminder: midterm on Tue 2/28 will cover Chapters 1-3, App A, B if you understand all slides, assignments,
More informationSystem Data Bus (8-bit) Data Buffer. Internal Data Bus (8-bit) 8-bit register (R) 3-bit address 16-bit register pair (P) 2-bit address
Intel 8080 CPU block diagram 8 System Data Bus (8-bit) Data Buffer Registry Array B 8 C Internal Data Bus (8-bit) F D E H L ALU SP A PC Address Buffer 16 System Address Bus (16-bit) Internal register addressing:
More informationDesign of Sequential Circuits
Design of Sequential Circuits Seven Steps: Construct a state diagram (showing contents of flip flop and inputs with next state) Assign letter variables to each flip flop and each input and output variable
More informationTheory of Computer Science. D5.1 Introduction. Theory of Computer Science. D5.2 Primitive Recursion vs. LOOP. D5.3 µ-recursion vs.
Theory of Computer Science May 2, 2016 D5. Primitive/µ-Recursion vs. LOOP-/WHILE-Computability Theory of Computer Science D5. Primitive/µ-Recursion vs. LOOP-/WHILE-Computability Malte Helmert University
More informationLecture 13: Sequential Circuits, FSM
Lecture 13: Sequential Circuits, FSM Today s topics: Sequential circuits Finite state machines 1 Clocks A microprocessor is composed of many different circuits that are operating simultaneously if each
More informationSOLUTION: SOLUTION: SOLUTION:
Convert R and S into nondeterministic finite automata N1 and N2. Given a string s, if we know the states N1 and N2 may reach when s[1...i] has been read, we are able to derive the states N1 and N2 may
More informationSection 20: Arrow Diagrams on the Integers
Section 0: Arrow Diagrams on the Integers Most of the material we have discussed so far concerns the idea and representations of functions. A function is a relationship between a set of inputs (the leave
More informationLogic and Computer Design Fundamentals. Chapter 8 Sequencing and Control
Logic and Computer Design Fundamentals Chapter 8 Sequencing and Control Datapath and Control Datapath - performs data transfer and processing operations Control Unit - Determines enabling and sequencing
More informationCounters. We ll look at different kinds of counters and discuss how to build them
Counters We ll look at different kinds of counters and discuss how to build them These are not only examples of sequential analysis and design, but also real devices used in larger circuits 1 Introducing
More informationCpSc 421 Final Exam December 15, 2006
CpSc 421 Final Exam December 15, 2006 Do problem zero and six of problems 1 through 9. If you write down solutions for more that six problems, clearly indicate those that you want graded. Note that problems
More informationUndecidability of the validity problem
Undecidability of the validity problem We prove the undecidability of the validity problem for formulas of predicate logic with equality. Recall: there is an algorithm that given a formula of predicate
More informationCSE 211. Pushdown Automata. CSE 211 (Theory of Computation) Atif Hasan Rahman
CSE 211 Pushdown Automata CSE 211 (Theory of Computation) Atif Hasan Rahman Lecturer Department of Computer Science and Engineering Bangladesh University of Engineering & Technology Adapted from slides
More informationBuilding Algorithmic Polytopes. David Bremner with D. Avis, H.R. Tiwary, and O. Watanabe December 16, 2014
Building Algorithmic Polytopes David Bremner with D. Avis, H.R. Tiwary, and O. Watanabe December 16, 2014 Outline Matchings in graphs Given G = (V, E), M E is called a matching {e M v e} 1 v V A matching
More informationPart I: Definitions and Properties
Turing Machines Part I: Definitions and Properties Finite State Automata Deterministic Automata (DFSA) M = {Q, Σ, δ, q 0, F} -- Σ = Symbols -- Q = States -- q 0 = Initial State -- F = Accepting States
More informationTuring Machines. Wolfgang Schreiner
Turing Machines Wolfgang Schreiner Wolfgang.Schreiner@risc.jku.at Research Institute for Symbolic Computation (RISC) Johannes Kepler University, Linz, Austria http://www.risc.jku.at Wolfgang Schreiner
More informationMost General computer?
Turing Machines Most General computer? DFAs are simple model of computation. Accept only the regular languages. Is there a kind of computer that can accept any language, or compute any function? Recall
More informationDesign at the Register Transfer Level
Week-7 Design at the Register Transfer Level Algorithmic State Machines Algorithmic State Machine (ASM) q Our design methodologies do not scale well to real-world problems. q 232 - Logic Design / Algorithmic
More informationPractice Homework Solution for Module 4
Practice Homework Solution for Module 4 1. Tired of writing the names of those you want kicked off the island on cards, you wish to modernize the voting scheme used on Digital Survivor. Specifically, you
More informationMohammad Farshi Department of Computer Science Yazd University. Computer Science Theory. (Master Course) Yazd Univ.
Computer Science Theory (Master Course) and and Mohammad Farshi Department of Computer Science Yazd University 1395-1 1 / 29 Computability theory is based on a specific programming language L. Assumptions
More informationQ520: Answers to the Homework on Hopfield Networks. 1. For each of the following, answer true or false with an explanation:
Q50: Answers to the Homework on Hopfield Networks 1. For each of the following, answer true or false with an explanation: a. Fix a Hopfield net. If o and o are neighboring observation patterns then Φ(
More informationCS20a: Turing Machines (Oct 29, 2002)
CS20a: Turing Machines (Oct 29, 2002) So far: DFA = regular languages PDA = context-free languages Today: Computability 1 Handicapped machines DFA limitations Tape head moves only one direction 2-way DFA
More informationParallelism and Machine Models
Parallelism and Machine Models Andrew D Smith University of New Brunswick, Fredericton Faculty of Computer Science Overview Part 1: The Parallel Computation Thesis Part 2: Parallelism of Arithmetic RAMs
More informationCMPT-150-e1: Introduction to Computer Design Final Exam
CMPT-150-e1: Introduction to Computer Design Final Exam April 13, 2007 First name(s): Surname: Student ID: Instructions: No aids are allowed in this exam. Make sure to fill in your details. Write your
More informationSequential programs. Uri Abraham. March 9, 2014
Sequential programs Uri Abraham March 9, 2014 Abstract In this lecture we deal with executions by a single processor, and explain some basic notions which are important for concurrent systems as well.
More informationTuring machine. Turing Machine Model. Turing Machines. 1. Turing Machines. Wolfgang Schreiner 2. Recognizing Languages
Turing achines Wolfgang Schreiner Wolfgang.Schreiner@risc.jku.at Research Institute for Symbolic Computation (RISC) Johannes Kepler University, Linz, Austria http://www.risc.jku.at 1. Turing achines Wolfgang
More informationElementary Algebra - Problem Drill 01: Introduction to Elementary Algebra
Elementary Algebra - Problem Drill 01: Introduction to Elementary Algebra No. 1 of 10 Instructions: (1) Read the problem and answer choices carefully (2) Work the problems on paper as 1. Which of the following
More informationOrdinal Computability
Ordinal Computability by Peter Koepke University of Bonn EMU - Effective Mathematics of the Uncountable CUNY Graduate Center, August 8, 2008 1 A standard Turing computation n 0 0 0 0 0 1 n + 1 0 0 0 0
More informationLatches. October 13, 2003 Latches 1
Latches The second part of CS231 focuses on sequential circuits, where we add memory to the hardware that we ve already seen. Our schedule will be very similar to before: We first show how primitive memory
More informationAn Invitation to Mathematics Prof. Sankaran Vishwanath Institute of Mathematical Sciences, Chennai. Unit I Polynomials Lecture 1A Introduction
An Invitation to Mathematics Prof. Sankaran Vishwanath Institute of Mathematical Sciences, Chennai Unit I Polynomials Lecture 1A Introduction Hello and welcome to this course titled An Invitation to Mathematics.
More informationLecture 14: State Tables, Diagrams, Latches, and Flip Flop
EE210: Switching Systems Lecture 14: State Tables, Diagrams, Latches, and Flip Flop Prof. YingLi Tian Nov. 6, 2017 Department of Electrical Engineering The City College of New York The City University
More informationTable of Content. Chapter 11 Dedicated Microprocessors Page 1 of 25
Chapter 11 Dedicated Microprocessors Page 1 of 25 Table of Content Table of Content... 1 11 Dedicated Microprocessors... 2 11.1 Manual Construction of a Dedicated Microprocessor... 3 11.2 FSM + D Model
More informationLecture Notes for Chapter 17: Amortized Analysis
Lecture Notes for Chapter 17: Amortized Analysis Chapter 17 overview Amortized analysis Analyze a sequence of operations on a data structure. Goal: Show that although some individual operations may be
More informationMAC Module 1 Systems of Linear Equations and Matrices I
MAC 2103 Module 1 Systems of Linear Equations and Matrices I 1 Learning Objectives Upon completing this module, you should be able to: 1. Represent a system of linear equations as an augmented matrix.
More informationRegister Machines Storing Ordinals and Running for Ordinal Time
2488 Register Machines Storing Ordinals and Running for Ordinal Time Ryan Siders 6/106 0 Outline Assumptions about Motion and Limits on Programming Without well-structured programming: Well-Structured
More informationPart III: A Simplex pivot
MA 3280 Lecture 31 - More on The Simplex Method Friday, April 25, 2014. Objectives: Analyze Simplex examples. We were working on the Simplex tableau The matrix form of this system of equations is called
More informationCSC D70: Compiler Optimization Static Single Assignment (SSA)
CSC D70: Compiler Optimization Static Single Assignment (SSA) Prof. Gennady Pekhimenko University of Toronto Winter 08 The content of this lecture is adapted from the lectures of Todd Mowry and Phillip
More informationProgramming Language Concepts, CS2104 Lecture 3
Programming Language Concepts, CS2104 Lecture 3 Statements, Kernel Language, Abstract Machine 31 Aug 2007 CS2104, Lecture 3 1 Reminder of last lecture Programming language definition: syntax, semantics
More information6.852: Distributed Algorithms Fall, Class 24
6.852: Distributed Algorithms Fall, 2009 Class 24 Today s plan Self-stabilization Self-stabilizing algorithms: Breadth-first spanning tree Mutual exclusion Composing self-stabilizing algorithms Making
More informationKing Fahd University of Petroleum and Minerals College of Computer Science and Engineering Computer Engineering Department
King Fahd University of Petroleum and Minerals College of Computer Science and Engineering Computer Engineering Department Page 1 of 13 COE 202: Digital Logic Design (3-0-3) Term 112 (Spring 2012) Final
More information#29: Logarithm review May 16, 2009
#29: Logarithm review May 16, 2009 This week we re going to spend some time reviewing. I say re- view since you ve probably seen them before in theory, but if my experience is any guide, it s quite likely
More informationAn Invitation to Mathematics Prof. Sankaran Vishwanath Institute of Mathematical Science, Chennai. Unit - I Polynomials Lecture 1B Long Division
An Invitation to Mathematics Prof. Sankaran Vishwanath Institute of Mathematical Science, Chennai Unit - I Polynomials Lecture 1B Long Division (Refer Slide Time: 00:19) We have looked at three things
More informationTuring Machines. Nicholas Geis. February 5, 2015
Turing Machines Nicholas Geis February 5, 2015 Disclaimer: This portion of the notes does not talk about Cellular Automata or Dynamical Systems, it talks about turing machines, however this will lay the
More informationFundamentals of Boolean Algebra
UNIT-II 1 Fundamentals of Boolean Algebra Basic Postulates Postulate 1 (Definition): A Boolean algebra is a closed algebraic system containing a set K of two or more elements and the two operators and
More informationTuring Machines Part Two
Turing Machines Part Two Recap from Last Time Our First Turing Machine q acc a start q 0 q 1 a This This is is the the Turing Turing machine s machine s finiteisttiteiconntont. finiteisttiteiconntont.
More informationNotes. Relations. Introduction. Notes. Relations. Notes. Definition. Example. Slides by Christopher M. Bourke Instructor: Berthe Y.
Relations Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry Spring 2006 Computer Science & Engineering 235 Introduction to Discrete Mathematics Sections 7.1, 7.3 7.5 of Rosen cse235@cse.unl.edu
More informationECEN 651: Microprogrammed Control of Digital Systems Department of Electrical and Computer Engineering Texas A&M University
ECEN 651: Microprogrammed Control of Digital Systems Department of Electrical and Computer Engineering Texas A&M University Prof. Mi Lu TA: Ehsan Rohani Laboratory Exercise #4 MIPS Assembly and Simulation
More informationMath 31 Lesson Plan. Day 22: Tying Up Loose Ends. Elizabeth Gillaspy. October 31, Supplies needed: Colored chalk.
Math 31 Lesson Plan Day 22: Tying Up Loose Ends Elizabeth Gillaspy October 31, 2011 Supplies needed: Colored chalk Other topics V 4 via (P ({1, 2}), ) and Cayley table. D n for general n; what s the center?
More informationCprE 281: Digital Logic
CprE 28: Digital Logic Instructor: Alexander Stoytchev http://www.ece.iastate.edu/~alexs/classes/ Simple Processor CprE 28: Digital Logic Iowa State University, Ames, IA Copyright Alexander Stoytchev Digital
More informationLanguages, regular languages, finite automata
Notes on Computer Theory Last updated: January, 2018 Languages, regular languages, finite automata Content largely taken from Richards [1] and Sipser [2] 1 Languages An alphabet is a finite set of characters,
More informationPortland State University ECE 587/687. Branch Prediction
Portland State University ECE 587/687 Branch Prediction Copyright by Alaa Alameldeen and Haitham Akkary 2015 Branch Penalty Example: Comparing perfect branch prediction to 90%, 95%, 99% prediction accuracy,
More informationCSC 5170: Theory of Computational Complexity Lecture 4 The Chinese University of Hong Kong 1 February 2010
CSC 5170: Theory of Computational Complexity Lecture 4 The Chinese University of Hong Kong 1 February 2010 Computational complexity studies the amount of resources necessary to perform given computations.
More informationClass Notes: Solving Simultaneous Linear Equations by Gaussian Elimination. Consider a set of simultaneous linear equations:
METR/OCN 465: Computer Programming with Applications in Meteorology and Oceanography Dr Dave Dempsey Dept of Geosciences, SFSU Class Notes: Solving Simultaneous Linear Equations by Gaussian Elimination
More informationMATHEMATICAL INDUCTION
MATHEMATICAL INDUCTION MATH 3A SECTION HANDOUT BY GERARDO CON DIAZ Imagine a bunch of dominoes on a table. They are set up in a straight line, and you are about to push the first piece to set off the chain
More informationOn my honor, as an Aggie, I have neither given nor received unauthorized aid on this academic work
Lab 5 : Linking Name: Sign the following statement: On my honor, as an Aggie, I have neither given nor received unauthorized aid on this academic work 1 Objective The main objective of this lab is to experiment
More informationChapter 4 Continuous Random Variables and Probability Distributions
Chapter 4 Continuous Random Variables and Probability Distributions Part 3: The Exponential Distribution and the Poisson process Section 4.8 The Exponential Distribution 1 / 21 Exponential Distribution
More informationAlgebra 1 Summer Assignment 2018
Algebra 1 Summer Assignment 2018 The following packet contains topics and definitions that you will be required to know in order to succeed in Algebra 1 this coming school year. You are advised to be familiar
More informationCSE. 1. In following code. addi. r1, skip1 xor in r2. r3, skip2. counter r4, top. taken): PC1: PC2: PC3: TTTTTT TTTTTT
CSE 560 Practice Problem Set 4 Solution 1. In this question, you will examine several different schemes for branch prediction, using the following code sequence for a simple load store ISA with no branch
More informationChapter 1 Review of Equations and Inequalities
Chapter 1 Review of Equations and Inequalities Part I Review of Basic Equations Recall that an equation is an expression with an equal sign in the middle. Also recall that, if a question asks you to solve
More informationStudent Self-Assessment of Mathematics (SSAM) for Intermediate Algebra
Student Self-Assessment of Mathematics (SSAM) for Intermediate Algebra Answer key 1. Find the value of 3x 4y if x = -2 and y = 5 To find the value, substitute the given values in for x and y 3x -4y Substitute
More informationEXPERIMENT Bit Binary Sequential Multiplier
12.1 Objectives EXPERIMENT 12 12. -Bit Binary Sequential Multiplier Introduction of large digital system design, i.e. data path and control path. To apply the above concepts to the design of a sequential
More informationConstruction of Static Single-Assignment Form
COMP 506 Rice University Spring 2018 Construction of Static Single-Assignment Form Part II source IR IR target code Front End Optimizer Back End code Copyright 2018, Keith D. Cooper & Linda Torczon, all
More informationLinear Systems of n equations for n unknowns
Linear Systems of n equations for n unknowns In many application problems we want to find n unknowns, and we have n linear equations Example: Find x,x,x such that the following three equations hold: x
More informationData Structures and Algorithm. Xiaoqing Zheng
Data Structures and Algorithm Xiaoqing Zheng zhengxq@fudan.edu.cn MULTIPOP top[s] = 6 top[s] = 2 3 2 8 5 6 5 S MULTIPOP(S, x). while not STACK-EMPTY(S) and k 0 2. do POP(S) 3. k k MULTIPOP(S, 4) Analysis
More informationCSCE 551 Final Exam, April 28, 2016 Answer Key
CSCE 551 Final Exam, April 28, 2016 Answer Key 1. (15 points) Fix any alphabet Σ containing the symbol a. For any language L Σ, define the language a\l := {w Σ wa L}. Show that if L is regular, then a\l
More informationTuring Machines Part II
Turing Machines Part II Problem Set Set Five Five due due in in the the box box up up front front using using a late late day. day. Hello Hello Condensed Slide Slide Readers! Readers! This This lecture
More information1 Definition of a Turing machine
Introduction to Algorithms Notes on Turing Machines CS 4820, Spring 2017 April 10 24, 2017 1 Definition of a Turing machine Turing machines are an abstract model of computation. They provide a precise,
More informationwhere Q is a finite set of states
Space Complexity So far most of our theoretical investigation on the performances of the various algorithms considered has focused on time. Another important dynamic complexity measure that can be associated
More informationState Machines. Example FSM: Roboant
page 1 State Machines 1) State Machine Design 2) How can we improve on FSMs? 3) Turing Machines 4) Computability Oh genie, will you now tell me what it means to compute? Doctor, I think you ve built a
More informationLecture for Week 2 (Secs. 1.3 and ) Functions and Limits
Lecture for Week 2 (Secs. 1.3 and 2.2 2.3) Functions and Limits 1 First let s review what a function is. (See Sec. 1 of Review and Preview.) The best way to think of a function is as an imaginary machine,
More informationCS20a: Turing Machines (Oct 29, 2002)
CS20a: Turing Machines (Oct 29, 2002) So far: DFA = regular languages PDA = context-free languages Today: Computability 1 Church s thesis The computable functions are the same as the partial recursive
More information8.5 Taylor Polynomials and Taylor Series
8.5. TAYLOR POLYNOMIALS AND TAYLOR SERIES 50 8.5 Taylor Polynomials and Taylor Series Motivating Questions In this section, we strive to understand the ideas generated by the following important questions:
More information1 ListElement l e = f i r s t ; / / s t a r t i n g p o i n t 2 while ( l e. next!= n u l l ) 3 { l e = l e. next ; / / next step 4 } Removal
Präsenzstunden Today In the same room as in the first week Assignment 5 Felix Friedrich, Lars Widmer, Fabian Stutz TA lecture, Informatics II D-BAUG March 18, 2014 HIL E 15.2 15:00-18:00 Timon Gehr (arriving
More information2.6 Variations on Turing Machines
2.6 Variations on Turing Machines Before we proceed further with our exposition of Turing Machines as language acceptors, we will consider variations on the basic definition of Slide 10 and discuss, somewhat
More informationMITOCW watch?v=vug2jncrxyg
MITOCW watch?v=vug2jncrxyg PROFESSOR: So we're going to talk about state machines, which is a topic that you're going to see in many further courses, because state machines model step by step processes.
More informationConfusion of Memory. Lawrence S. Moss. Department of Mathematics Indiana University Bloomington, IN USA February 14, 2008
Confusion of Memory Lawrence S. Moss Department of Mathematics Indiana University Bloomington, IN 47405 USA February 14, 2008 Abstract It is a truism that for a machine to have a useful access to memory
More informationSemiconductor Optoelectronics Prof. M. R. Shenoy Department of physics Indian Institute of Technology, Delhi
Semiconductor Optoelectronics Prof. M. R. Shenoy Department of physics Indian Institute of Technology, Delhi Lecture - 18 Optical Joint Density of States So, today we will discuss the concept of optical
More informationYOU CAN BACK SUBSTITUTE TO ANY OF THE PREVIOUS EQUATIONS
The two methods we will use to solve systems are substitution and elimination. Substitution was covered in the last lesson and elimination is covered in this lesson. Method of Elimination: 1. multiply
More informationVirtualization. Introduction. G. Lettieri A/A 2014/15. Dipartimento di Ingegneria dell Informazione Università di Pisa. G. Lettieri Virtualization
Introduction G. Lettieri Dipartimento di Ingegneria dell Informazione Università di Pisa A/A 2014/15 G. Lettieri Folk definition What do people mean when they talk about virtualization w.r.t. computers?
More informationModular numbers and Error Correcting Codes. Introduction. Modular Arithmetic.
Modular numbers and Error Correcting Codes Introduction Modular Arithmetic Finite fields n-space over a finite field Error correcting codes Exercises Introduction. Data transmission is not normally perfect;
More informationAlgorithms Exam TIN093 /DIT602
Algorithms Exam TIN093 /DIT602 Course: Algorithms Course code: TIN 093, TIN 092 (CTH), DIT 602 (GU) Date, time: 21st October 2017, 14:00 18:00 Building: SBM Responsible teacher: Peter Damaschke, Tel. 5405
More informationJohns Hopkins Math Tournament Proof Round: Automata
Johns Hopkins Math Tournament 2018 Proof Round: Automata February 9, 2019 Problem Points Score 1 10 2 5 3 10 4 20 5 20 6 15 7 20 Total 100 Instructions The exam is worth 100 points; each part s point value
More informationCOSE312: Compilers. Lecture 17 Intermediate Representation (2)
COSE312: Compilers Lecture 17 Intermediate Representation (2) Hakjoo Oh 2017 Spring Hakjoo Oh COSE312 2017 Spring, Lecture 17 May 31, 2017 1 / 19 Common Intermediate Representations Three-address code
More informationBinary addition example worked out
Binary addition example worked out Some terms are given here Exercise: what are these numbers equivalent to in decimal? The initial carry in is implicitly 0 1 1 1 0 (Carries) 1 0 1 1 (Augend) + 1 1 1 0
More informationLABORATORY MANUAL MICROPROCESSORS AND MICROCONTROLLERS. S.E (I.T) ( S e m. IV)
LABORATORY MANUAL MICROPROCESSORS AND MICROCONTROLLERS S.E (I.T) ( S e m. IV) 1 I n d e x Serial No. T i tl e P a g e N o. 1 8 bit addition with carry 3 2 16 bit addition with carry 5 3 8 bit multiplication
More informationComputations on Ordinals
Computations on Ordinals by Peter Koepke University of Bonn IMSC, Chennai, September 16, 2008 1 A standard Turing computation n+1 0 0 0 0 0 0 1 n 0 0 0 0 0 1 1 0 0 0 0 0 0 0 S 4 0 0 0 0 0 0 0 P 3 0 0 0
More informationWhat is a Computer? computer: anything that is able to take a mathematically
What is a Computer? computer: anything that is able to take a mathematically well-defined problem and perform a sequence of simple operations that will result in the solution to that problem. A computer
More informationAdmin NP-COMPLETE PROBLEMS. Run-time analysis. Tractable vs. intractable problems 5/2/13. What is a tractable problem?
Admin Two more assignments No office hours on tomorrow NP-COMPLETE PROBLEMS Run-time analysis Tractable vs. intractable problems We ve spent a lot of time in this class putting algorithms into specific
More informationLecture 13: Sequential Circuits
Lecture 13: Sequential Circuits Today s topics: Carry-lookahead adder Clocks and sequential circuits Finite state machines Reminder: Assignment 5 due on Thursday 10/12, mid-term exam Tuesday 10/24 1 Speed
More informationUNIVERSITY OF WISCONSIN MADISON
CS/ECE 252: INTRODUCTION TO COMPUTER ENGINEERING UNIVERSITY OF WISCONSIN MADISON Prof. Gurindar Sohi TAs: Minsub Shin, Lisa Ossian, Sujith Surendran Midterm Examination 2 In Class (50 minutes) Friday,
More informationhighlights proof by contradiction what about the real numbers?
CSE 311: Foundations of Computing Fall 2013 Lecture 27: Turing machines and decidability highlights Cardinality A set S is countableiffwe can writeit as S={s 1, s 2, s 3,...} indexed by N Set of rationals
More informationFinite Automata. Finite Automata
Finite Automata Finite Automata Formal Specification of Languages Generators Grammars Context-free Regular Regular Expressions Recognizers Parsers, Push-down Automata Context Free Grammar Finite State
More informationExamples of Unlimited Register Machine programs for Turingcomputable
Examples of Unlimited Register Machine programs for Turingcomputable functions 18 February 2012 at 13:01 Public It will be a matter of interest for me over the next few months to formulate (and collect)
More informationSection Summary. Proof by Cases Existence Proofs
Section 1.8 1 Section Summary Proof by Cases Existence Proofs Constructive Nonconstructive Disproof by Counterexample Uniqueness Proofs Proving Universally Quantified Assertions Proof Strategies sum up
More information