COMPUTER SCIENCE TRIPOS

Similar documents
Theory of Computation Regular Languages. (NTU EE) Regular Languages Fall / 38

Theory of Computation Regular Languages

Nondeterminism and Nodeterministic Automata

Coalgebra, Lecture 15: Equations for Deterministic Automata

1.4 Nonregular Languages

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

Finite Automata. Informatics 2A: Lecture 3. John Longley. 22 September School of Informatics University of Edinburgh

Finite Automata. Informatics 2A: Lecture 3. Mary Cryan. 21 September School of Informatics University of Edinburgh

Anatomy of a Deterministic Finite Automaton. Deterministic Finite Automata. A machine so simple that you can understand it in less than one minute

Talen en Automaten Test 1, Mon 7 th Dec, h45 17h30

Session Trimester 2. Module Code: MATH08001 MATHEMATICS FOR DESIGN

Finite Automata-cont d

1 Structural induction, finite automata, regular expressions

Homework 3 Solutions

Intermediate Math Circles Wednesday, November 14, 2018 Finite Automata II. Nickolas Rollick a b b. a b 4

a,b a 1 a 2 a 3 a,b 1 a,b a,b 2 3 a,b a,b a 2 a,b CS Determinisitic Finite Automata 1

Automata and Languages

5.1 Definitions and Examples 5.2 Deterministic Pushdown Automata

Chapter Five: Nondeterministic Finite Automata. Formal Language, chapter 5, slide 1

1.3 Regular Expressions

CS 373, Spring Solutions to Mock midterm 1 (Based on first midterm in CS 273, Fall 2008.)

The University of Nottingham SCHOOL OF COMPUTER SCIENCE A LEVEL 2 MODULE, SPRING SEMESTER LANGUAGES AND COMPUTATION ANSWERS

This lecture covers Chapter 8 of HMU: Properties of CFLs

Name Ima Sample ASU ID

Exam 2, Mathematics 4701, Section ETY6 6:05 pm 7:40 pm, March 31, 2016, IH-1105 Instructor: Attila Máté 1

AUTOMATA AND LANGUAGES. Definition 1.5: Finite Automaton

Worked out examples Finite Automata

Lecture 6 Regular Grammars

1 Nondeterministic Finite Automata

CS 301. Lecture 04 Regular Expressions. Stephen Checkoway. January 29, 2018

1 From NFA to regular expression

Harvard University Computer Science 121 Midterm October 23, 2012

CS 310 (sec 20) - Winter Final Exam (solutions) SOLUTIONS

Nondeterminism. Nondeterministic Finite Automata. Example: Moves on a Chessboard. Nondeterminism (2) Example: Chessboard (2) Formal NFA

Turing Machines Part One

CS 311 Homework 3 due 16:30, Thursday, 14 th October 2010

Minimal DFA. minimal DFA for L starting from any other

1 Structural induction

Kleene s Theorem. Kleene s Theorem. Kleene s Theorem. Kleene s Theorem. Kleene s Theorem. Kleene s Theorem 2/16/15

Formal languages, automata, and theory of computation

CS103B Handout 18 Winter 2007 February 28, 2007 Finite Automata

The final exam will take place on Friday May 11th from 8am 11am in Evans room 60.

CSCI FOUNDATIONS OF COMPUTER SCIENCE

COMPUTER SCIENCE TRIPOS

CS 275 Automata and Formal Language Theory

Scanner. Specifying patterns. Specifying patterns. Operations on languages. A scanner must recognize the units of syntax Some parts are easy:

CS5371 Theory of Computation. Lecture 20: Complexity V (Polynomial-Time Reducibility)

More on automata. Michael George. March 24 April 7, 2014

Deterministic Finite Automata

First Midterm Examination

Chapter 2 Finite Automata

For convenience, we rewrite m2 s m2 = m m m ; where m is repeted m times. Since xyz = m m m nd jxyj»m, we hve tht the string y is substring of the fir

20 MATHEMATICS POLYNOMIALS

1 Probability Density Functions

Let's start with an example:

CS:4330 Theory of Computation Spring Regular Languages. Equivalences between Finite automata and REs. Haniel Barbosa

Mathematics Extension 2

expression simply by forming an OR of the ANDs of all input variables for which the output is

Assignment 1 Automata, Languages, and Computability. 1 Finite State Automata and Regular Languages

Strong Bisimulation. Overview. References. Actions Labeled transition system Transition semantics Simulation Bisimulation

Markscheme May 2016 Mathematics Standard level Paper 1

CMPSCI 250: Introduction to Computation. Lecture #31: What DFA s Can and Can t Do David Mix Barrington 9 April 2014

Formal Languages and Automata

11.1 Finite Automata. CS125 Lecture 11 Fall Motivation: TMs without a tape: maybe we can at least fully understand such a simple model?

Ph2b Quiz - 1. Instructions

CS375: Logic and Theory of Computing

Relating logic to formal languages

378 Relations Solutions for Chapter 16. Section 16.1 Exercises. 3. Let A = {0,1,2,3,4,5}. Write out the relation R that expresses on A.

State space systems analysis (continued) Stability. A. Definitions A system is said to be Asymptotically Stable (AS) when it satisfies

Sample pages. 9:04 Equations with grouping symbols

5. (±±) Λ = fw j w is string of even lengthg [ 00 = f11,00g 7. (11 [ 00)± Λ = fw j w egins with either 11 or 00g 8. (0 [ ffl)1 Λ = 01 Λ [ 1 Λ 9.

- 5 - TEST 2. This test is on the final sections of this session's syllabus and. should be attempted by all students.

Mathematics Extension 1

Java II Finite Automata I

Grammar. Languages. Content 5/10/16. Automata and Languages. Regular Languages. Regular Languages

Some Theory of Computation Exercises Week 1

7.2 The Definite Integral

Converting Regular Expressions to Discrete Finite Automata: A Tutorial

Learning Regular Languages over Large Alphabets

Introduction to ω-autamata

Review of Riemann Integral

Lecture 08: Feb. 08, 2019

Is there an easy way to find examples of such triples? Why yes! Just look at an ordinary multiplication table to find them!

ECE 327 Solution to Midterm 2016t1 (Winter)

12.1 Nondeterminism Nondeterministic Finite Automata. a a b ε. CS125 Lecture 12 Fall 2014

CISC 4090 Theory of Computation

Deterministic Finite-State Automata

Chapter 1, Part 1. Regular Languages. CSC527, Chapter 1, Part 1 c 2012 Mitsunori Ogihara 1

CS 330 Formal Methods and Models

Regular expressions, Finite Automata, transition graphs are all the same!!

Good Review book ( ) ( ) ( )

Chapter 4 Regular Grammar and Regular Sets. (Solutions / Hints)

CHAPTER 1 Regular Languages. Contents

Before we can begin Ch. 3 on Radicals, we need to be familiar with perfect squares, cubes, etc. Try and do as many as you can without a calculator!!!

CSE : Exam 3-ANSWERS, Spring 2011 Time: 50 minutes

Non Deterministic Automata. Linz: Nondeterministic Finite Accepters, page 51

CMSC 330: Organization of Programming Languages. DFAs, and NFAs, and Regexps (Oh my!)

Regular Language. Nonregular Languages The Pumping Lemma. The pumping lemma. Regular Language. The pumping lemma. Infinitely long words 3/17/15

Intuitionistic Fuzzy Lattices and Intuitionistic Fuzzy Boolean Algebras

Quantum Mechanics Qualifying Exam - August 2016 Notes and Instructions

Transcription:

CST.2011.2.1 COMPUTER SCIENCE TRIPOS Prt IA Tuesdy 7 June 2011 1.30 to 4.30 COMPUTER SCIENCE Pper 2 Answer one question from ech of Sections A, B nd C, nd two questions from Section D. Submit the nswers in five seprte bundles, ech with its own cover sheet. On ech cover sheet, write the numbers of ll ttempted questions, nd circle the number of the question ttched. You my not strt to red the questions printed on the subsequent pges of this question pper until instructed tht you my do so by the Invigiltor STATIONERY REQUIREMENTS Script pper Blue cover sheets Tgs SPECIAL REQUIREMENTS Approved clcultor permitted

CST.2011.2.2 SECTION A 1 Digitl Electronics () Simplify the following expressions using Boolen lgebr: (i) F = A. B. C + A. B. C + A. B. C + A. B. C (ii) F = (X + Y ). (X + Y + Z). (X + Y + Z) (iii) F = (A. D + A. C). [B. (C + B. D)] [6 mrks] Give the truth tble for n encoder tht ccepts sign bit, S, nd two mgnitude bits X 0, X 1 nd gives three-bit output Y 2, Y 1, Y 0 tht re the two s complement encoding of the input. Using Krnugh mp, simplify the following expression to yield solution in sum-of-products form: Y = A. B. C. D + A. B. C. D + A. D + A. B. D Wht problem my exist with prcticl relistion of this solution, nd how my it be cured? [5 mrks] (d) Simplify the following expression using Krnugh mp to yield solution in product-of-sums form nd implement it using only NOR gtes ssuming complemented input vribles re vilble: Y = (B + C + D). (A + B + C). (A + B + D). (A + B + C) Neglect ny potentil problems in the prcticl relistion of your solution. [5 mrks] 2

CST.2011.2.3 2 Digitl Electronics () Show how two 2-input NOR gtes cn be connected together to implement n RS ltch. Describe its opertion nd give its truth tble. [6 mrks] Drw the stte digrm for synchronous modulo-4 up/down counter. The counter hs two control inputs: M is set t logic 0 to cuse the counter to count up, nd t logic 1 to cuse the counter to count down; E is set t logic 1 to enble the counter to count nd t logic 0 to cuse the counter to hold its current stte. A synchronous binry up-counter hving the stte sequence 1, 2, 3, 4, 5, 6, 1, 2,... is to be implemented using three D-type flip-flops. The flip-flop outputs re designted Q 2, Q 1 nd Q 0, where Q 0 represents the lest significnt digit of the count. (i) Give simplified expressions for the required next-stte logic, mking use of ny unused sttes. Does this counter self-strt? [6 mrks] (ii) Give the new simplified expression required for D 0 (the D-input of flip-flop Q 0 ) if the counter is now required to return to count of 1 if n unused stte is entered. SECTION B 3 Operting Systems () In the context of the protection of computer systems: (i) Wht is ment by ccess control? [1 mrk] (ii) Wht is n ccess control list? (iii) Wht is cpbility? (iv) How is ccess control mnged in the UNIX file system? [5 mrks] (v) How is ccess control mnged in Windows NT? [5 mrks] Describe how you cn use pge protection bits to implement not-recently-used pge replcement scheme. [5 mrks] 3 (TURN OVER)

CST.2011.2.4 4 Operting Systems () In the context of memory mngement: (i) Wht is the ddress binding problem? [1 mrk] (ii) The ddress binding problem cn be solved t compile time, lod time or run time. For ech cse, explin wht form the solution tkes, nd give one dvntge nd one disdvntge. [3 mrks ech] (iii) Under which circumstnces do externl nd internl frgmenttion occur? How cn ech be hndled? (iv) Wht is the purpose of trnsltion lookside buffer (TLB)? Describe how UNIX hndles user uthentiction. 4

CST.2011.2.5 SECTION C 5 Discrete Mthemtics II Let A nd B be sets. Let F P(A) B. So typicl element of F is pir (X, b) where X A nd b B. Define the function f : P(A) P(B) to be such tht for x P(A). f(x) = {b X x. (X, b) F } () Show for ll x, y P(A). if x y then f(x) f(y) [3 mrks] Suppose x 0 x 1 x n is chin of subsets in P(A). Recll n N 0 x n = { n N 0. x n }. Show tht f(x n ) f( x n ) n N 0 n N 0 [Hint: Use prt ().] Assume now tht F P fin (A) B where P fin (A) consists of the finite subsets of A. So now typicl element of F is pir (X, b) where X is finite subset of A nd b B. Suppose x 0 x 1 x n is chin of subsets in P(A). Show tht f( x n ) f(x n ) n N 0 n N 0 Deduce f( n N 0 x n ) = n N 0 f(x n ) ( ) [6 mrks] (d) Show tht ( ) need not hold if the set X in elements (X, b) of F is infinite. [7 mrks] 5 (TURN OVER)

CST.2011.2.6 6 Discrete Mthemtics II Let E be set. Assume F P(E) stisfies the two conditions 1. X F. X F 2. X F. X F Recll X =def {e E x X. e x} nd X = def {e E x X. e x} () Explin why F nd E F. Define the binry reltion on E by e e iff x F. e x e x for e, e E. Stte clerly wht it would men for to be reflexive nd trnsitive. Show is reflexive nd trnsitive. [5 mrks] For e E, define [e] = {x F e x} Explin why [e] F. Show [e] = {e e e} [6 mrks] (d) Sy subset z of E is down-closed iff e e & e z e z for ll e, e E. Show F consists of precisely the down-closed subsets of E by showing: (i) ny x F is down-closed; [3 mrks] (ii) for ny down-closed subset z of E, z = {[e] e z} nd hence z F (why?). 6

CST.2011.2.7 SECTION D 7 Probbility () Stte the probbility mss function for Poisson rndom vrible with prmeter λ > 0. Define the probbility generting function, G X (z), of rndom vrible X tking vlues in {0, 1, 2,...} nd derive n expression for G X (z) in the cse where X Pois(λ) with λ > 0. Show the following result G (r) X (1) = E(X(X 1) (X r + 1)) where r is positive integer nd G (r) X (1) denotes the rth derivtive of G X(z) with respect to z evluted t z = 1. (d) Using the result in prt derive the men nd vrince of Poisson rndom vrible with prmeter λ > 0. (e) Show the result tht if X nd Y re two independent rndom vribles with probbility generting functions G X (z) nd G Y (z), respectively, then G X+Y (z) = G X (z)g Y (z) where G X+Y (z) is the probbility generting function of X + Y. (f ) Show tht if λ 1, λ 2 > 0 nd X Pois(λ 1 ) nd Y Pois(λ 2 ) re independent rndom vribles then X+Y Pois(λ 1 +λ 2 ). Wht re the men nd vrince of X + Y? 7 (TURN OVER)

CST.2011.2.8 8 Regulr Lnguges nd Finite Automt () Give regulr expression r over the lphbet Σ = {, b, c} such tht the lnguge determined by r consists of ll strings tht contin t lest one occurrence of ech symbol in Σ. Briefly explin your nswer. [5 mrks] Let L be the lnguge ccepted by the following non-deterministic finite utomton with ε-trnsitions: q 1 q 2 q 3 ε q 0 q 4 q 5 (i) Drw deterministic finite utomton tht ccepts L. (ii) Write down regulr expression tht determines L. Briefly explin your nswers. [5 mrks] Show tht if deterministic finite utomton M ccepts ny string t ll, then it ccepts one whose length is less thn the number of sttes in M. [5 mrks] (d) Is the lnguge { n b l k {, b} k n + l } regulr? Justify your nswer. [5 mrks] 8

CST.2011.2.9 9 Softwre Design Imgine tht you re responsible for the design of computer system tht will be used to utomte the definition, evlution nd exmining of the cdemic content for course in the Cmbridge Computer Science Tripos. This system should llow the syllbus, lectures, supervision exercises nd exmintion ppers to be defined in consulttion with vriety of stkeholders, including students nd future employers. () How would you go bout determining the detiled requirements for this system? Be sure to mention ny obstcles tht you would expect to rise. Construct one or more UML use cse digrms nd single UML clss digrm, showing the overll structure of system tht includes the elements described bove. [10 mrks] Using nother type of UML digrm, illustrte the runtime behviour of one of the use cses. [3 mrks] (d) Explin why you chose the specific UML digrm used in prt. [1 mrk] (e) Wht precutions could you tke to ensure tht the introduction of the system ws s smooth s possible? (f ) Wht technicl precutions could you tke to ensure tht the system could be modified in response to future chnges in regultions or user requirements? END OF PAPER 9