Question: computer science 1 . ) Give an implementation level description of a Turing machine. You can check for an empty tape cell as a _

computer science
1.) Give an implementation level description of a Turing machine. You can check for an empty tape cell as a _ character. Convert from decimal to Unary: You are given a 2-digit integer on a tape and you need to replace it with that many 1's. They do not have to be at the beginning of the tape. Examples: "12"-->"111111111111","07",-->"1111111","00"-->"_-".
A Turing machine implementation for the conversion from decimal to unary would begin with a blank tape. The machine would begin in the leftmost cell and scan to the right untili it reaches a cell containing data. It would then read the value in that cell and write the appropriate number of 15 in the adjacent cells. Finally, it would return to the leftmost cell and repeat the process until the tape ran out.
For instance, if the input was "12," the machine would write "1" in the first cell before moving to the second. It would then write "1111" in the following four cells before returning to the initial cell. Then, it would put "1" in the first cell and go to the second. It would then write "1111" in the next four cells before returning to the first cell and repeating the process until the end of the tape is reached.
Similarly, if the input were "07", the machine would write "1" in the first cell before on to the second. It would then write "11111111" in the following seven cells before returning to the first cell. Then, it would put "1" in the first cell and go to the second. It would then write "1111111" in the next seven cells before returning to the first cell and repeating the process until the end of the tape was reached.
Lastly, given the input "00," the computer would perform no action because there are no non-blank cells.
2.) Give the state transition diagram (formal description) for the Turing machine in Problem 1.
Question 2[36 marks]
A mass of consumers is uniformly distributed along the interval 0,1. Two firms, A and B, are located at points 0 and 1 respectively. We denote by pi the price of firm iinA,B. A consumer located at point xin[0,1] obtains utility UA(x)=u-pA-tx2 if he consumes from firm A, and UB(x)=u-pB-t(1-x)2 if he consumes from firm B. In the following, we assume that the gross utility u is sufficiently high, so that the market will be covered and all consumers will get positive utility in equilibrium. Both firms have a cost function equal to Ti(qi)=(1+x)qi, where you should substitute x for the last number of your student ID number.
(a) Find the demand function for both firms.
(b) Assume firms set their prices simultaneously. Solve for the Nash equilibrium prices, and compute the equilibrium profits. [6 marks code to Check if two strings are Anagram or not
 computer science 1.) Give an implementation level description of a Turing

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!