ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1999. The secret module

Smallest possible automaton
Posted by Yury_Semenov 14 Feb 2024 16:19
My solution produces an automaton with 2n^2 + n states, but what is the smallest possible size? Is it still ~n^2?

Edited by author 14.02.2024 16:19
Re: Smallest possible automaton
Posted by 👨🏻‍💻 Spatarel Dan Constantin 25 Jun 2026 14:50
My solution produces an automaton with exactly 2n^2 + 1 states. Can it be done better? I don't know, but if I had to guess, I would say no.

However, for a particular input automaton, some of the states of the output automaton may be unaccessible, thus they could be removed and the problem could be solved with even fewer states. But, there are input automatons where all the states of the output automaton are accessible, thus the upper limit of my solution is 2n^2 + 1 states on the worst case.