Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

computer science 1 . ) Give an implementation level description of a Turing machine. You can check for an empty tapecell as a _ character.

computer science
1.) Give an implementation level description of a Turing machine. You can check for an empty tapecell as a_character. Convert from decimal to Unary: You are given a 2-digit integer on a tapeand you need to replace it with that many 1's. They do not have to be at the beginning of thetape. Examples: "12"-->"111111111111","07",-->"1111111","00"-->"".A Turing machine implementation for the conversion from decimal to unary would beginwith a blank tape. The machine would begin in the leftmost cell and scan to the right until it reachesa cell containing data. It would then read the value in that cell and write the appropriate number of1s in the adjacent cells. Finally, it would return trn to the leftmost cell and repeat the process until thetape ran out.For instance, if the input was "12," the machine would write "1" in the first cel beforemoving to the second. It would then write "1111" in the following four cells before returning to theinitial cell. Then, it would put "1" in the first cell and go to the second. It would then write "1111" inthe next four cells before returning to the first cell and repeating the process until the end of thetape is reached.Similarly, if the input were "07", the machine would write "1" in the first cell before on tothe second. It would then write "1111111" in the following seven cells before returning to the firstcell. Then, it would put "1" in the first cell and go to the second. It would then write "1111111" inthe next seven cells before returning to the first cell and repeating the process until the end of thetape was reached.Lastly, given the input "00," the computer would perform no action because there are nonon-blank cells.2.) Give the state transition diagram (formal description) for the Turing machine in Problem 1.Question 2(36 marks]A mass of consuners is uniformly distributed along the interval (0,1]. Two firms, A and B, arelocated at points 0 and 1 respectively. We denote by p, the price of firm ie A, B. A consumerlocated at point z E (0,1] obtains utiity Ua()= u-pA - tz if he consumes from firm A, andUg(r)=u-pa-t(1-)^2 if he consumes from firmB. In the following, we assume that the grossutility u is sufficiently high, so that the market will be covered and all consumers will get positiveutility in equilibrium. Both firms have a cost function equal to T(G)(1+X)qi, where you shouldsubstitute X for the last number of your student ID number.(a) Find the demand function for both firms,can(b) Assume firms set their prices simultaneously. Solve for the Nash equilibrium prices, andcompute the equilibrium profits.(6 marks]I(c) Now, assume a Stackelberg timing, where firm A is the leader. Explain briefly why we shouldnot use the Nash equilibriumn concept to solve this game, and solve for the equilibrium pricesand profits.8 marks(d) Compare the results obtained in parts (b) and (c) and explain the intuition for such difference.Are the equilibria efficient?5 marks](e) Suppose that there was a technology that allowed firm A to credibly commit not to changeits price (this option to commit would make firm A the Stackelberg leader, as in part c). Ifonly firn A had access to this technology, how much would firm A be willing to pay for it?How would your answer change if the technology was auctioned to the best bidder (betweenfirms A and B)?4 marksAssume that firms A and B can perfectly discriminate between locations. That is, firm i chooses aprice p.() for each location z e|0,1. Firms now compete by simultaneously choosing the pricingfunctions p) and p2). There is no possibility of arbitrage, and if a consumer may be indifferentbetween firms A and B, they go to the closest firm.(1) Find the Nash-equilibrium pricing functions. That is, you need to find the equilibrium pricesof every firm in every location.[8 marks1. Consider a consumer whose utility function and budget constraint are given byu(x,y)= xy and px tpy = I, respectively, where p is the price of good x, pr is the priceof good y, and / is the consumer's income.a) Derive the ordinary demand functions, x\deg (p, Pr,) and y'(ps, p,)b) Derive the consumer's indirect utility function, u(P. P,)..c) Calculate the partial derivatives, u*/aP,,u */a, and the ratio P, Verifythat this term in the ordinary demand function from part a (Roy's identity).d) Minimize the expenditure level necessary to achieve some arbitrary utility target uand solve the first-order conditions for the compensated (or Hicksian) demandfunctions, x(P..P,,u') and y'(p..P,,u).) Derive the expenditure function, e(px, P, u).e) Calculate the value of r /p, and x lp, and show that x and y are net substitutes.Explain with the use of a diagram howx and y can be net substitutes but not grosssubstitutes.g) Calculate the partial derivative, e(p,p,,u")/p, and verify that the resulting termis the compensated demand for good x (Shepherd's lemma).h) Invert the expenditure function to solve for u'(P,,p,.I). Verify that this is indirectutility u"(Ps Pyscode to Check if two strings are Anagram or not
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

OCA Oracle Database SQL Exam Guide Exam 1Z0-071

Authors: Steve O'Hearn

1st Edition

1259585492, 978-1259585494

More Books

Students also viewed these Databases questions