Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This assignment is about designing Finite State Machines (FSM) for a two-player game. The game is administered by a referee who, using a random number,

This assignment is about designing Finite State Machines (FSM) for a two-player game. The game is
administered by a referee who, using a random number, decides which one of the players makes the
first move: if the random number is odd, player 1 starts; if the random number is even, player 2 starts.
The referee also decides who is the winner at the end based on the following rules:
 - The game is based on challenges. Each player sends a "challenge" that holds a number to the
other player.
 - The receiving player has to answer the "challenge" by sending a "challenge answer" that holds
a number as follows:
       o if the received number is odd, the "challenge answer" must be an odd number or a
          smaller number (can be odd or even) than the received number.
       o if the received number is even, the "challenge answer" must be an even number or a
          bigger number (can be odd or even) than the received number.
- The player who runs out of cards early loses (i.e., a player loses when they cannot send a
challenge answer as per the rules above).
- If a received card is as expected, the receiver must send an answer within 30 seconds.
Otherwise, the other player notifies the referee. The referee than declares the winner.
- If a received answer is not as expected, the receiving player should notify the referee. The
referee then declares the winner.

IMPORTANT: each one of the players knows all the numbers the other player has. With that,
the game is like a chess game, not a card game where cards are hidden from other players.

The allowed numbers to use in a challenge by each player is based on a set of digits derived from
their own student's ID. For example, if the ID of the student is 12345678, then S = {1, 2, 3, 4, 5, 6,
7, 8}. Using this set S, the allowed numbers for each player (from their ID) are as follows:
 - Odd numbers are constructed using the first half of S as the alphabet. Each element of the
     alphabet can only appear once. For the set S above, the following are examples of odd
     numbers that can be constructed: 1, 13, 21, 23...


     Note: if |S| is odd, the middle element of S is not part of the alphabet.


- Even numbers are constructed using the second half of S as the alphabet. Each element of the
    alphabet can only appear once. For the set S above, the following are examples of even
    numbers that can be constructed: 6, 8, 68, 78...
 

    Note: if |S| is odd, the middle element of S is part of the alphabet.


2. Deliverables:
You need to submit your answer as a set of FSMs (i.e., drawings), all of them in a PDF file. Each
FSM should have a quick description. However, the description of each FSM does not have to be a
complete rewriting of the machine's behavior

Gary and Brenda both have similar businesses in the garment industry making caps and backpacks. Inone day, Gary can make 60 caps and 12 backpacks when he divides his production resources equally between the two products. In one day, Brenda can produce 80 caps and 20 backpacks. Answer the following questions and show all calculations to support your answers. (20 points) a. Who has the comparative advantage in producing backpacks? Explain with calculations. b. What is Brenda's opportunity cost of making a cap compared to Gary's? Explain with calculations. c. Based on your calculations in a) and b) above, who should specialize in making what if they intend to trade? Explain with calculations. d. If Gary and Brenda decide to specialize in what they do best, what would be the new production per day for each of them? Explain with calculations. e. If Gary and Brenda decide to trade, what would be the terms of trade for a backpack and how does each benefit from trading? Explain with calculations.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

Here are the finite state machines for the twoplayer game described above Referee FSM States Start R... 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

Step: 3

blur-text-image

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

Managerial Economics and Business Strategy

Authors: Michael R. baye

7th Edition

978-0073375960, 71267441, 73375969, 978-0071267441

More Books

Students also viewed these Economics questions

Question

CL I P COL Astro- L(1-cas0) Lsing *A=2 L sin(0/2)

Answered: 1 week ago

Question

What happens if the parents do not reciprocate a childs attachment?

Answered: 1 week ago