# Is it possible to build DFA for odd-length words with 1 in the middle?

$L := \{w \in \{0,1\}^* |$the length of $w$ is odd $\wedge$ 1 is in the middle of $w\}$

So the alphabet is $\{0,1\}^*$. My problem is that I can't keep track of the equality of chars before and after $1$. A limited DFA for the length less than 6: How can I expand it so that it would accept any length words? Is it possible?

I tried putting cycles in it, but as I already said, then I just cant keep track of the number of chars after $1$ to be equal to that before. In other words 1 to be always in the middle.

No, you can not. Proof by Pumping Lemma: Assume $L$ is regular and $n$ be the pumping length consider the word $w=0^n10^n$. Thus there are $x,y,z \in \{0,1\}^*$ with $|xy|<n$ and $|y| > 0$ such $xyz=w$. Then $\forall i\in \mathbb{N}_0: xy^iz \in L$.
But due to its length constraint $x$ and $y$ consist of $0$ only and all are before the $1$. Thus $xy^2z = 0^{n+|y|}10^n \notin L$.
Thus, $L$ is not regular and can not be expressed by any DFA.
{"ft_lang_label":"__label__en","ft_lang_prob":0.9713286,"math_prob":0.9997583,"size":514,"snap":"2019-43-2019-47","text_gpt3_token_len":153,"char_repetition_ratio":0.1,"word_repetition_ratio":0.0,"special_character_ratio":0.31906614,"punctuation_ratio":0.10084034,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9998327,"pos_list":[0,1,2],"im_url_duplicate_count":[null,5,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-11-21T19:00:18Z\",\"WARC-Record-ID\":\"<urn:uuid:9b8ae0e9-a445-4d2e-8feb-ed19ef0f1e91>\",\"Content-Length\":\"132797\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:52efefd0-b4b6-49dc-9b8e-1aaca0ff1cb5>\",\"WARC-Concurrent-To\":\"<urn:uuid:484e117e-5aaf-4037-a94f-e12ce7a00168>\",\"WARC-IP-Address\":\"151.101.1.69\",\"WARC-Target-URI\":\"https://cs.stackexchange.com/questions/56994/is-it-possible-to-build-dfa-for-odd-length-words-with-1-in-the-middle/56995\",\"WARC-Payload-Digest\":\"sha1:NGAGTY3E6VLEJV23R643IDTYDN6UW3IM\",\"WARC-Block-Digest\":\"sha1:4VHLMLX6JOMIGPX4BA74ZDXDGMPHNAEL\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-47/CC-MAIN-2019-47_segments_1573496670948.64_warc_CC-MAIN-20191121180800-20191121204800-00341.warc.gz\"}"}