Một hàng đợi k-FIFO cung cấp một enqueue và một hoạt động dequeue
tương tự như một hàng đợi FIFO thường xuyên. Một cách hợp lý, một hàng đợi k-FIFO là một
hàng đợi nơi một hoạt động enqueue thêm một yếu tố để hàng đợi
đuôi và một hoạt động dequeue loại bỏ một trong những yếu tố lâu đời nhất e k từ hàng đợi với e là số dequeue hoạt động kể từ chiến dịch dequeue đặt gỡ bỏ các
Các yếu tố lâu đời nhất từ hàng đợi, tức là, e < k luôn luôn giữ. Vì vậy, lấy yếu tố lâu đời nhất từ hàng đợi có thể yêu cầu tối đa k dequeue hoạt động, mà không có thể trở lại bất kỳ yếu tố trẻ hơn
k yếu tố lâu đời nhất trong hàng đợi và đó có thể được xen kẽ
với bất kỳ số nào của enqueue hoạt động. Điều này ngụ ý rằng k-FIFO
hàng đợi được đói miễn phí. Lưu ý rằng một hàng đợi 0-FIFO là tương đương
để một hàng đợi FIFO thường xuyên.
đang được dịch, vui lòng đợi..