Ultimate Engineering Study Guide - Questions & Answers
Given a set P - (PO, P1, P3), which of the following is a possible partitioning of P?a. []b. ([],(PO).(P1).(P3).(PO.P1).(PO, P3).(P1, P3).(PO, P1, P3]] c. PO, P1, P3) d. None of these
Here is a simplified version of the game "Win an additional mark if U can!".There are two players.Each player names an integer between 1 and 4.The player who names the integer closest to two thirds of the average integer gets a reward of 10, theother players get nothing.If there is a tie (i.e., choosing the same number), each player gets reward of 5.(a) Represent this game in Normal Form. (b) Answer the following questions When player 2 chooses 4, what are the best responses for player 1?When player 1 chooses 3, what are the best responses for player 2?When player 2 chooses 2, what are the best responses for player 1?When player 1 chooses 1, what are the best responses for player 2?For player 1, is the strategy of choosing 4 strictly or very weakly dominated by another strategy? Ifso, which ones?For player 2, is the strategy of choosing 1 strictly or very weakly dominated by another strategy? Ifso, which ones?(c) What is the Nash equilibrium of this game? Find this out by applying the concept of dominated strategies to rule out a succession of inferior strategiesuntil only one choice remains.
Can the following list of entries L be sorted by the stable Radix-Sort using a bucket array (N=15)? And why? L = (1,2), (3,2), (2,12), (3,3), (12,3), (15,1), (2,2), (1,7), (13,12)
"Dijkstra's single-source shortest path algorithm returns a results grid that contains the lengths of the shortest paths from a given vertex [the source vertex] to the other vertices reachable from it. Develop a pseudocode algorithm that uses the results grid to build and return the actual [shortest] path, as a list of vertices, from the source vertex to a given [target] vertex. (Hint: This algorithm starts with a given vertex [the target vertex] in the grid's first column and gathers ancestor [parent] vertices, until the source vertex is reached.)"*For your algorithm, assume that grid is the name of the results grid produced by Dijkstra's single-source shortest path algorithm.*Each vertex is identified by its label/name, which is in column 1 of grid.*As the first step of your algorithm, find the name of the source vertex.*Next, get the name of the target vertex from the user.Pseudocode should avoid details through broad-stroke statements. However, it must give enough information to outline the overall strategy.In addition to showing your algorithm, answer the following questions: - In pseudocode, to find the source vertex, you can simply write: find source vertex Without providing code, explain how this would be accomplished in real code. - Did you run into any challenges? If so, what were they and how did you solve them? - Besides the given grid, did you have to use any other collection? If so, which one and why? If not, why not?
Population growth under limited conditions can be described using the following differential equation where P is population and time dP kgm. Pmax dt Write a funtion named "PopCalculator" that uses Euler's Method to calculate the population with respect to time Your function should have inputs Istart (the year in which the calculation begins) tend (the year in which the calculation ends) di the time step for your Eulers method) Pinit (the initial population) kgm (the maximum possible growth rate of the population) Pmax (the carrying capacity population of your system) (A row vector of time values) (A row vector of population values) . Your function should have outputs .P Function 1 function [t,p] -PopCalculator (tstart, tend, dt, Pinit, kgn, Pmax) % first line given. You're welcome :) 5 end Code to call your function 1 [t,P] -PopCalculator (0,10,.1,2,.5,10) Code to call your function textarea
(b) Find solutions for a fractional KnapSack problem which uses the criteria of maximizing the profit per unit capacity at each step, with: n= 4, M=5, pi= 13, p2= 20, p3= 14, P4= 15 wi=1, wz= 2, wz= 4, w4=3 where n is the number of objects, p is the profit, w is the weight of each object and M is the knapsack weight capacity. Show detailed calculations of how the objects are chosen in order, not just the final solution.
Define a relation R from {a,b,c} to {u, v} as follows: R = {(a, v), (b, u), (b, v), (C, u)}. (a) Draw an arrow diagram for R. (b) Is R a function? Why or why not?