function[Q,t]=MM1inf(lambda, mu, T)
% [Q,t]=MM1inf(lambda, mu, T)
%lambda - intenzity (rate) of input Poisson flow, inter-arrival time = 1/lambda [s]
%mu - intenzity (rate) of service line, mean service time = 1/mu [s]
% Discrete Pure birth and death  process- 1 run 
% T - time of simulation, Time unit - second,
% t - vector of discrete time simulation steps t=0:0.1:T
dt=0.1;
Q=zeros(1,ceil(T/dt));
        for i=1:ceil(T/dt)
            dQ=0;
            if rand < lambda*dt
                dQ=dQ+1;
            end
            if rand < mu*dt && Q(i)>0
                dQ=dQ-1;
            end
             Q(i+1)=Q(i)+dQ;
        end
t=0:dt:T;
