) In a supermarket, the average arrival rate of customers is 10 every 30 minutes, following Poisson process. The average time taken by a cashier to list and calculate the customer’s purchase is two and a half minutes following exponential distribution. What is the probability that the queue length exceeds six? What is the expected time spent by a customer in the system?

To solve this problem, we can use the M/M/1 queuing model.

M/M/1 stands for a single-server queueing model with Poisson arrival process and exponential service time.

Given information:
- Arrival rate (λ) = 10 customers every 30 minutes
- Service rate (μ) = 1 customer every 2.5 minutes

To find the probability that the queue length exceeds six, we need to calculate the probability of having more than six customers in the system at any given time.

The traffic intensity (ρ) is given by ρ = λ/μ.
ρ = (10/30) / (1/2.5) = 0.8333

Using the formula for the probability of N customers in the system in an M/M/1 queue:
P(N) = (1 - ρ) * ρ^N

Now, let's calculate the probability that the queue length exceeds six (N > 6):
P(N > 6) = 1 - P(N <= 6)
= 1 - Σ P(N = 0, 1, 2, 3, 4, 5, 6)

P(N) = (1 - 0.8333) * 0.8333^0 = 0.1389

P(N = 0) = (1 - 0.8333) * 0.8333^0 = 0.1389
P(N = 1) = (1 - 0.8333) * 0.8333^1 = 0.2316
P(N = 2) = (1 - 0.8333) * 0.8333^2 = 0.1930
P(N = 3) = (1 - 0.8333) * 0.8333^3 = 0.1286
P(N = 4) = (1 - 0.8333) * 0.8333^4 = 0.0857
P(N = 5) = (1 - 0.8333) * 0.8333^5 = 0.0572
P(N = 6) = (1 - 0.8333) * 0.8333^6 = 0.0381

P(N > 6) = 1 - (0.1389 + 0.2316 + 0.1930 + 0.1286 + 0.0857 + 0.0572 + 0.0381)
≈ 0.1279

Therefore, the probability that the queue length exceeds six is approximately 0.1279, or 12.79%.

To find the expected time spent by a customer in the system, we need to calculate the average time in the queue and the average time for service.

The average time in the queue (Tq) can be calculated using the formula:
Tq = ρ / (μ - λ)

Tq = 0.8333 / (1/2.5 - 10/30)
= 0.8333 / (0.4 - 0.3333)
≈ 9.9998 minutes

The average time for service (Ts) can be calculated using the formula:
Ts = 1 / (μ - λ)

Ts = 1 / (1/2.5 - 10/30)
= 1 / (0.4 - 0.3333)
= 1 / 0.0667
≈ 15 minutes

The average time spent by a customer in the system (Tsystem) is the sum of the average time in the queue and the average time for service:
Tsystem = Tq + Ts
≈ 9.9998 + 15
≈ 24.9998 minutes

Therefore, the expected time spent by a customer in the system is approximately 24.9998 minutes.