Voting Machine?

Thread Starter

DeathEater

Joined Mar 30, 2015
7
there is a project in school that requires you to build a "voting machine" circuit board using the least number of gates. The voting machine is based on four people, a president, vice president, secretary, and treasurer. The presidents vote counts twice and the rest once. They need three votes for something to pass (which is the light turning on). So the light is supposed to turn on when three votes are a yes. I have simplified mine down to five gates by doing a K-Map. The original equation is : PV+PS+PT+VST (since the presidents vote counts twice).
I have gotten it to: P (V+T) + S (P+T). Can I simplify anymore?
 

WBahn

Joined Mar 31, 2012
29,976
If the metric is "the least number of gates", then it would seem you are going backward.

You started with this:

P (V+S+T) +VST

How many gates does this use?

I see four:
1 -- 3-input AND gate
1 -- 3-input OR gate
1 -- 2-input AND gate
1 -- 2-input OR gate

You "simplified" it to this:

P (V+T) + S (P+T)

How many gates does this use?

I see five:
3 -- 2-input OR gate
2 -- 2-input AND gate

Whenever you ask about making something, "optimal", "best", "simplest" or anything similar, it is critical that the metrics by which performance is measured be clearly defined.
 

Thread Starter

DeathEater

Joined Mar 30, 2015
7
If the metric is "the least number of gates", then it would seem you are going backward.

You started with this:

P (V+S+T) +VST

How many gates does this use?

I see four:
1 -- 3-input AND gate
1 -- 3-input OR gate
1 -- 2-input AND gate
1 -- 2-input OR gate

You "simplified" it to this:

P (V+T) + S (P+T)

How many gates does this use?

I see five:
3 -- 2-input OR gate
2 -- 2-input AND gate

Whenever you ask about making something, "optimal", "best", "simplest" or anything similar, it is critical that the metrics by which performance is measured be clearly defined.
we only use 2 input gates, so three input isn't an option, making the previous one have many more gates
 

WBahn

Joined Mar 31, 2012
29,976
we only use 2 input gates, so three input isn't an option, making the previous one have many more gates
Okay, but then the problem needs to state that the goal is to use the least number of two-input gates.

Now consider whether your solution is actually correct.

P (V+T) + S (P+T)

Would you agree that this is true if S(P+T) is true?

Would you agree that this is true if S is true and T is true?

Does that mean that the vote carries if S and T are true but P and V are false?

Always, always, ALWAYS ask if the answer makes sense.
 
Top