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 1559. TruCoders Linguistics

Weak test, or ambiguous task statement(+)
Posted by diver_ru (Fishburg SAAT) 23 Sep 2007 17:34
I send two programs, and both got accepted.
But for test "(0)**" first program answered "N", second "F".

By statement, power of set (0)* is 1, but what is power of set (0)**? 1 or infinity?

Edited by author 23.09.2007 20:47
Re: Weak test, or ambiguous task statement(+)
Posted by Sandro (USU) 25 Sep 2007 11:24
You are wrong. Jury has this test, and all your programs output F on it. F is a correct answer, of course. For any set A, if a power of set A is 1, then power of set A* is infinity.
Re:
Posted by diver_ru (Fishburg SAAT) 25 Sep 2007 13:13
Oh, sorry.
This test looks like "(0*)*", and for it both my programs really gives different answers.

P.S.
hmmm...
>>For any set A, if a power of set A is 1, then power of set A* is infinity.
But if power of set A=(0)* is 1 (contains one empty word), then power of A* should be infinity, so answer N, isn't it? Or i misunderstand something?

Edited by author 25.09.2007 13:32
Re: Re:
Posted by Vedernikoff Sergey 25 Sep 2007 17:28
Empty word + Empty word = Empty word, so we have only one element in (0)*

Edited by author 25.09.2007 17:28
Re: Re:
Posted by Sandro (USU) 25 Sep 2007 23:38
Sorry, I was wrong. "For any set A, if a power of set A is 1, then power of set A* is infinity." is correct for A!={empty_word} only. And {empty_word}* = {empty_word}. So (0)* = {empty_word}, and (0)** = {empty_word}, so answer is F.