11211 - Digital Logic

All about problems in Volume 112. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

Post Reply
little joey
Guru
Posts: 1080
Joined: Thu Dec 19, 2002 7:37 pm

11211 - Digital Logic

Post by little joey »

Reading the description, I feel unsure about what exactly is a legal circuit.

1. Can input lines be ignored (not connected to any gate or output line)?
2. Can two or more output lines be short circuited (have the same input line or gate)?
3. Can the two inputs of a gate be short circuited (connected to the same input line or gate, to create constants and inverters)?

The following I/O contains all three cases; is it legal?

input

Code: Select all

1
1 1 1 0
2 11 4 13 2 11 4 13 2 11 4 13 2 11 4 13 
0
output

Code: Select all

Case 1: 1
5 1 3 3
4 3 5 4
1: input lines 1 and 2 are not used.
2: output lines 1 and 4 are connected to the same input line (4).
3: both input lines of the gate are connected to the same input line (3).
The biggest problem with most problems is not how to solve the problem, but how to not solve what is not the problem.
rujialiu
New poster
Posts: 37
Joined: Mon Mar 05, 2007 2:42 am

Re: 11211 - Digital Logic

Post by rujialiu »

little joey, the judge program outputs "Yes" for your input and output :)
:-)
little joey
Guru
Posts: 1080
Joined: Thu Dec 19, 2002 7:37 pm

Post by little joey »

Thanks. Now I have to think about an efficient way to implement my ideas...
The biggest problem with most problems is not how to solve the problem, but how to not solve what is not the problem.
little joey
Guru
Posts: 1080
Joined: Thu Dec 19, 2002 7:37 pm

Post by little joey »

That was one tough cookie... took 20+ submissions to get it under 45 seconds. Can't wait to see Rio smashing the runtime.

BTW Rujia, excellent problem set; keeps me off the street for a few days. I noticed that you yourself didn't submit the problems on UVA. Are you sure your solutions run within the time/memory requirements?
:)
The biggest problem with most problems is not how to solve the problem, but how to not solve what is not the problem.
sunny
Experienced poster
Posts: 124
Joined: Sun Sep 11, 2005 10:22 pm
Location: Civil-BUET

Post by sunny »

little joey wrote:
BTW Rujia, excellent problem set; keeps me off the street for a few days. I noticed that you yourself didn't submit the problems on UVA. Are you sure your solutions run within the time/memory requirements?
:)
should be excellent for a solver like liitle joey but impossible for most of us.
only 3 were beyond my reach :cry:
rujialiu
New poster
Posts: 37
Joined: Mon Mar 05, 2007 2:42 am

Post by rujialiu »

little joey wrote:That was one tough cookie... took 20+ submissions to get it under 45 seconds. Can't wait to see Rio smashing the runtime.

BTW Rujia, excellent problem set; keeps me off the street for a few days.
Thanks :) Though many of them are adapted from old contests, adapting them is quite annoying...For example, most of the original judge solution was not strong enough, so test cases are weak too. I'm very happy to see people like you trying hard to solve them. And (as you may notice), I'm ready to provide hints / clarifications for these problems.
little joey wrote:I noticed that you yourself didn't submit the problems on UVA. Are you sure your solutions run within the time/memory requirements?
:)
I'd answer "Yes", since the whole contest material I submitted include judge solutions.... And the timelimit is set according to it. The reason I did not submit my solution is.....

I think the first solver might be happy to see his name appears in the ranklist ALONE :P -- at least for a short time

anyway, i can submit the judge solution for harder problem after it is solve by at least two people. But usually they're not very fast, at least not intentionally optimized (otherwise you'll get a tighter timelimit, which would drive people crazy, hehe).

For example, all my judge solution for my tiny contest runs much slower than Rio's current best submission. That's great!
:-)
rujialiu
New poster
Posts: 37
Joined: Mon Mar 05, 2007 2:42 am

Post by rujialiu »

sunny wrote:
little joey wrote:
BTW Rujia, excellent problem set; keeps me off the street for a few days. I noticed that you yourself didn't submit the problems on UVA. Are you sure your solutions run within the time/memory requirements?
:)
should be excellent for a solver like liitle joey but impossible for most of us.
only 3 were beyond my reach :cry:
Well, in my opinion, brute force problems are unlike other kinds of problems - you need to TRY! Many algorithms look silly but they work fine :) So don't always be expecting a fanscinating algorithm before actual coding.

and... there are 5 easier problem in the problemset: C, E, G, H, K. Try to solve them first
:-)
little joey
Guru
Posts: 1080
Joined: Thu Dec 19, 2002 7:37 pm

Post by little joey »

rujialiu wrote: I think the first solver might be happy to see his name appears in the ranklist ALONE :P -- at least for a short time

anyway, i can submit the judge solution for harder problem after it is solve by at least two people. But usually they're not very fast, at least not intentionally optimized (otherwise you'll get a tighter timelimit, which would drive people crazy, hehe).

For example, all my judge solution for my tiny contest runs much slower than Rio's current best submission. That's great!
I appreciate your argument. It was just that trying to solve a problem that nobody solved yet, makes you doubt that it's solvable at all. Which I shouldn't in your case, of course :)
The other thing is that comparing runtimes can be a big hint for the method used. In case of this problem: the fact that your solution runs almost 3 times as fast as mine is a clear indication that I still miss something...
The biggest problem with most problems is not how to solve the problem, but how to not solve what is not the problem.
baodog
Experienced poster
Posts: 202
Joined: Wed Jul 04, 2007 6:53 am

Post by baodog »

A fast solution is possible by using enough bit operations
and prunning aggresively.
Post Reply

Return to “Volume 112 (11200-11299)”