Question
The culutural behaviour of programs in a programming language can be defined in terms of a formal logical system, in which each sentence which can
The culutural behaviour of programs in a programming language can be defined in terms of a formal logical system, in which each sentence which can be inferred in the logic represents the evaluation of a piece of program." Use 312-356 as your random range for age when creating Goats that the farmer introduces into the trip (use constants). Your Goat Class must use a dynamic string array for its private array of items eaten, and no other type of container. Use age 0 when creating Goats by twin birth.
Start with 423 goats in your trip (use a constant for this).
Have your loop conduct at least 130 goatdates (use a constant for this).
Use lots of constants I suggest using a vector to hold your trip of goats, but you are free to choose your container. set associative and direct mapped lookup? [6 marks] (c) Why are TLBs always much smaller than caches? [4 marks] (d) Which of the lookup mechanisms in part (b) is usually used for a TLB and why aren't the other mechanisms usually used? [6 marks] 2 ECAD Consider the following mysterious Verilog module. module mystery(q,w,ec,r,a,s); input c,r,a; output [12:0] s; reg [12:0] s; always @(posedge c or posedge r) if(r) s<=01; else begin if(a && (s<17)) s<=s+1; else if(!a && (s>0)) s<=s-1; end endmodule (a) How many flip-flops will be required to implement the mystery module, and how will signals c and r be connected to these flip-flops? 15 marks] (b) What is the state transition diagram for this mystery module? [5 marks] (c) If this module were synthesised to the minimum sum of products form, what would the equations be for next state bits s[0], s[1] and s[2]? [10 marks] 2 CST.2004.3.3 3 Data Structures and Algorithms What are the advantages and disadvantages of the synchronous design in part
Then,Give all uses of required in a typing derivation for N1; prove that there does not exist a typing derivation for N2. [7 marks] What is a principal type scheme? Give the principal type scheme for N1, or explain informally why it does not have one.
b.Explain carefully what happens if the counter in (c ) starts in state 121 21 821 20 . In general, how can start-up problems be overcome in the design of synchronous state machines Describe a dynamic programming algorithm for the longest common subsequence problem. b) Find an alignment for the longest common subsequence of "science" and "engineer". Organize your work in a table with appropriately labeled a columns. Show the aligned sequences. Pseudo code for findLCS() appears after the pseudo code for cutRod(). int cutRod( int [] p ) Initialize. Set n to the length of the prices array p. Allocate space for an array r from 0 ton Set r[ o ] to 0 Loop for j from 1 to n inclusive Set q to -o0 for i from 1 toj inclusive if p[i] + r[ j - i] >q Set q to p[i] + r[j - i] set r[j ] to a Return r[n] int [][][] findLCS( sequence X, sequence Y) Initialize. Set m to the length of X and n to the length of Y. Declare two 2D arrays of size m+1 by n+1 named c and b. Loop for i from 1 to m inclusive forj from 1 to n inclusive if x[i] equals y[j] cli,j) = 1 + cli - 1, j - 1) bli, j) = NW else if cli - 1,j) = cli, j - 1) cli, j) = cli - 1,j) bli, j) = N else cli, j) = cli, j - 1) bli, j) = W Return the 2D arrays c and bConsider
Give and explain two examples of theorems about the behaviour of Standard ML programs which can be expressed and proved in terms of either or both of the two logical systems described above.Using the principles of synchronous design, determine the next state combinational logic expressions required to implement a counter having the state sequence specified in part 12.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started