Question: Question: QUESTION 1 1. Develop a server program in Java that waits for clients to connect. The server responds to the client to choose one



Question:
QUESTION 1 1. Develop a server program in Java that waits for clients to connect. The server responds to the client to choose one of the following options available with server and then deliver the requested object to client: Sum Multiply Division Bye Server Program is first started. Then the Client program is started. Ask three questions from Server Get the answer from client Finally send the resutls. Execute the following steps: Step 1: Run the Java program of Server Step 2: Run the Java program of Client and Sample output of Client Window: Sample output 1(Client): Connected to server Message from Server: Select the option: Sum Multiply Division Bye Enter Reply Enter Reply the message to the server: 1 from Server: What is the sum of 2 + 3 ? the message to the server: 4 from Server:YourAnswernotcorrect Reply Enter Reply Reply Enter Reply and Wrong 1, bye from Server: What is the sum of 4 + 3 ? the message to the server: 7 from Server:YourAnswercorrect,Congrats from Server: What is the sum of 10 + 11 ? the message to the server: 21 from Server:YourAnswercorrect,CongratsandTotalCorrect2 Sample output 2(Client): Connected to server Message from Server: Select theoption: Sum Multiply Division Bye Enter Reply Enter Reply the message to the server: 2 from Server: What is the product of 4 * 3 ? the message to the server: 11 from Server:YourAnswernotcorrect Reply Enter Reply Reply Enter Reply Wrong 2, bye from Server: What is the product of 10 * 3 ? the message to the server: 30 from Server:YourAnswercorrect,Correct from Server: What is the product of 5 * 3 ? the message to the server: 21 from Server:YourAnswernotcorrectandTotalCorrect1and Sample output 1(Server): Connected to client socket number 13 Message to Client : Select theoption: Sum Multiply Division Bye Client sent message: 1 Message to Client Server: What is the sum of 2 + 3 ? Answer from Client : 4 correct count : 0 Message to Client Server: What is the sum of 4 + 3 ? Answer from Client : 7 correct count : 1 Message to Client Server: What is the sum of 10 + 11 ? Answer from Client : 21 correct count : 2 Reply to client :YourAnswercorrect,CongratsandTotalCorrect2 and Wrong 1, bye Task: 1. Write the Java socket program for the Server. (class name: Server_Your ID Number) Task: 2. Write the Java socket program for the Client. (class name: Client_Your ID Number) Task: 3. Execute the program and show the output screenshot.




2. Markov chain transitions P = [P/j] = Al- AI- NI- Al- NI- AI- NI- AI- Al- Let X1 be distributed uniformly over the states {0, 1, 2}. Let (Xill be a Markov chain with transition matrix P; thus, P(Xn+1=j \\Xn= i) = Pu , i, j E {0, 1, 2}. (a) Is the information source stationary? ~ (b) Find the stationary distribution of the Markov chain (c) Find the entropy rate of the Markov chainA stationary distribution of an m-state Markov chain is a probability vector q such that = q P, where P is the probability transition matrix. A Markov chain can have more than one stationary distribution. Identify all the stationary distributions that you can, for the 3-state Markov chain with transition probability matrix O O P Owl Does this Markov chain have a steady-state probability distribution ? 15 points.. (Markov chain mixing) Which of the following classes of chains would you expect to have the shortest mixing time in general? 1 Markov chains with distinct regions in the state space that are connected by low probability transitions. 0 Markov chains for networks with nearly deterministic poten- tials. 1 Markov chains with many distinct and peaked probability modes. Markov chains where state spaces are well connected and tran- sitions between states have high probabilities.The diagrams below show three Markov chains, where arrows indicate a non-zero transition probability. A Markov Chain 1 State 1 State 2 State 3 B Markov Chain 2 State 1 State 2 State 3 State 4 C Markov Chain 3 State 1 State 2 State whether each of the chains is: e irreducible . periodic, giving the period. [3]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
