Help with this Matlab assignment Two computers share a singl

Help with this Matlab assignment

Two computers share a single printer. During a one hour period, at any moment and independently both computers will start a printing job (only one each computer). Each printing job last 20 minutes. A collision occurs if any of the two computers find the printer busy at the moment it sends its printing job. If there is a collision, the job that arrives the latest goes directly to the printing que and waits until the previous job finishes. Use a MATLAB simulation to calculate: the probability of a collision, the mean waiting time, and the waiting time in the situations there is a collision.

Solution

Ans:

Share a Printer Between Two Computers:

Next, right-click on the printer you want to share and select Printer Properties.

click add a printer.

sucess click next.

If you can’t get sharing to work, here’s troubleshooting steps to take.

If you have any additional tips to share, leave a comment and let us know.

1) the probability of a collision:

Calculating the Probability of a Hash Collision

There are many choices of hash function, and the creation of a good hash function is still an active area of research. Some hash functions are fast; others are slow. Some distribute hash values evenly across the available range; others don’t. If you’re interested in the real-world performance of a few known hash functions, and  offer some comparisons. For our purposes, let’s assume the hash function is pretty good — it distributes hash values evenly across the available range.

In this case, generating hash values for a collection of inputs is a lot like generating a collection of random numbers. Our question, then, translates into the following:

It turns out it’s actually a bit simpler to start with the reverse question: What is the probability that they are all unique? Whatever the answer to the reverse question, we can just subtract it from one, and we’ll have the answer to our original question.

Given a space of N possible hash values, suppose you’ve already picked a single value. After that, there are N1 remaining values that are unique from the first. Therefore, the probability of randomly generating two integers that are unique from each other is N1/1.

After that, there are N2remaining values that are unique from the first two, which means that the probability of randomly generating three integers that are all unique is N1/N into N-2/N (We can multiply the probabilities together because each random number)

general, the probability of randomly generating kk integers that are all unique is:

N1N×N2N××N(k2)N×N(k1)N

On a computer, this can be quite slow to evaluate for large k. Luckily, the above expression is approximately equal to:

2) the mean waiting time and:

3) the waiting time in the situations there is a collision:

The following procedure is used to initiate a transmission. The procedure is complete when the frame is transmitted successfully or a collision is detected during transmission.

Collision detected procedure:

The following procedure is used to resolve a detected collision. The procedure is complete when retransmission is initiated or the retransmission is aborted due to numerous collisions.

Help with this Matlab assignment Two computers share a single printer. During a one hour period, at any moment and independently both computers will start a pri
Help with this Matlab assignment Two computers share a single printer. During a one hour period, at any moment and independently both computers will start a pri

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site