Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / A bit of an interesting math problem

Author
Message
Dark Java Dude 64
Community Leader
15
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 30th May 2013 09:57 Edited at: 30th May 2013 11:19
Hello! Basically, I need a mathematical equation that can simulate a boolean AND function. Of course, I could simply use Q=AB for this, but I need an equation that does not use multiplication or division. The equation is allowed to use addition and subtraction, and division and multiplication are allowed, but only if by a constant. So following those rules, I just need an equation that will output a 1 only if both inputs are 1 and will output a 0 otherwise, basically just have a profile following the truth table of an AND gate.

Why do I need this? I don't wanna say quite yet, but you shall all find out soon.

Thanks!

Edit:
I have come up with a way to do what a I wanted to do without using an equation of sorts. Disregard!
Wolf
18
Years of Service
User Offline
Joined: 8th Nov 2007
Location: Luxemburg
Posted: 30th May 2013 14:00
Quote: "I have come up with a way to do what a I wanted to do without using an equation of sorts. Disregard! "


Yeah...but you are still going to tell us what you needed it for, right?

http://www.serygalacaffeine.com
Without struggle,no progress and no result.Every breaking of habit produces a change in the machine.
Michael P
20
Years of Service
User Offline
Joined: 6th Mar 2006
Location: London (UK)
Posted: 30th May 2013 19:18 Edited at: 30th May 2013 19:18
Here is a lambda calculus definition that does what you want (if you say 0 = false and 1 = true). It might be of some use to you.


Benjamin
23
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 30th May 2013 19:19 Edited at: 30th May 2013 19:20
Quote: "I have come up with a way to do what a I wanted to do without using an equation of sorts. Disregard!"


Did you figure out a way with just addition and subtraction?

"Sideboobs are awesome. Getting punched in the face is not." - Jerico2Day on violence and nudity
Dark Java Dude 64
Community Leader
15
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 30th May 2013 22:54
Quote: "Yeah...but you are still going to tell us what you needed it for, right?"
Well, for now I'll tell you this: I'm creating some mechanisms that do boolean logic based stuff.

Quote: "It might be of some use to you."
Ah, I'll definitely have to look into that!

Quote: "Did you figure out a way with just addition and subtraction?"
Haha well, due to commutative property of addition and such, I'm pretty sure it isn't possible with just addition and subtraction.

Basically, the solution I have thus far is to add both inputs, so when the two inputs added equal 2, I have a mechanism that will grab the output and pull it to high.

Building a mechanical AND gate is pretty easy, but I have some pretty specific requirements here for what I'm doing.
Neuro Fuzzy
19
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 31st May 2013 00:40
If you have an equation in the form:
a*A+b*B+c

with A and B being the inputs and a,b,c being constants (which, you have to have that form, since things like A-(B-A) reduce to that form), then:

c=0 (when A=B=0)
a*A+c=0 (when B=0)
b*B+c=0 (when A=0)
a*A+b*B+c=1

The first equation means c=0, the second means a=0, the third means b=0, the fourth gives a contradiction.

That said, floor(0.9*A+0.9*B) would work!


"I <3 u 2 bbz" - Dark Frager
Dark Java Dude 64
Community Leader
15
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 31st May 2013 01:18
Ahah! Very interesting indeed! I'll have to figure out how to mechanically implement that floor function, but I already have some ideas. Thanks!
Libervurto
20
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 31st May 2013 02:34
(A=B)-(A=0) seems to work, but might be breaking your rules and it's basically (A+B)=2 anyway.

The difficulty in learning is not acquiring new knowledge but relinquishing the old.
Dark Java Dude 64
Community Leader
15
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 31st May 2013 04:45
Ah, that does partially work... I don't quite recall but I think it outputs either -1 or -2 at some point, but sadly those can't be allowed.

I shall change the topic of this thread a bit, basically if anyone can figure out a way to use only XOR and NOT gates to make any other gate, that would be great. Based upon my own experimentation in Logisim, it seems impossible...

I have ways to create logic gates, but they aren't the greatest ways. I actually managed to create a working mechanical transistor, but it's not the easiest to assemble and doesn't seem like it would be reliable enough to go in the large project I want it to. I have other methods too which involve things connecting and disconnecting, and while definitely possible, I would rather things remain pretty static overall... But damn, I honestly never would have guessed coming up with designs for mechanical logic gates would be so hard! It's incredibly frustrating but also fun at the same time. Right now I need to decide if I'm going to go forward with what I have or if I want to come up with a better way to do things and go forward with that... I'm not looking for other people to give me designs with this paragraph, I'm just blabbing on. If anything, I want as much of this thing to be my own design as possible.
Libervurto
20
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 31st May 2013 05:18
If you send one of the inputs through a NOT then both through an XOR you have an equivalence testing gate. I even tested it in Minecraft -->

The difficulty in learning is not acquiring new knowledge but relinquishing the old.
Dark Java Dude 64
Community Leader
15
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 31st May 2013 05:22 Edited at: 31st May 2013 05:32
Indeed, problem is with really anything that uses the equivalence testing, you get a situation where the truth table is either



or



So, that's basically my issue.

Edit: I have come up with a way to use 3 equivalence testers to produce this circuit, but now I simply need a 3 input equivalence taster, but that shouldn't be hard at all.

Login to post a reply

Server time is: 2026-07-06 02:34:10
Your offset time is: 2026-07-06 02:34:10