![]() |
Truth Table --> Logical Expressions
I'd like to convert the following truth table in to a logical expression:
:
INPUT OUTPUTThe program would output fourteen logical expressions (one for each column in the output). Is there a program that can do this for me? If not, how would you assume is the best way to do it? It doesn't have to be perfectly optimized logic, but that would surely help. An example of what the program could do: :
INPUT OUTPUTThen the program would output: A2 = A1 nor B1 A way to look at it is one expression for each column in the output. So all that has to be made sure is that the seven inputs in my first example, can achieve all the results in _X_ column of the output with a certain logical expression. Then this is repeated for all the columns in the output table. |
Could just be something to do with what i just smoked and maybe im in way over my head here; But where's there any f****** in what you posted?
|
Quote:
|
IMO, you need to seriously back off the details, and give us a LOT more overview.
You show a VERY over-detailed input/output table, and then immediately jump into a different input/output, with A1, B1, but no clue as to exactly WHAT A1 or B1, IS? Yes, I can hypothesize what you may have meant, but if you want help, you're going to have to be a LOT more descriptive, here. Give us a SMALL example, step by step. In addition to helping us understand your problem, it may well help you further understand it, as well. We don't need sixy lines of input/output, but we need more lines of descriptive, step by step, notation. Adak |
I assume if you don't know enough to understand my issue and proposed solution, then you don't know enough to help me. I explained to a reasonable extent what needs to be accomplished, and I'm asking you what you think should be done "step by step".
I've developed a good chunk of framework for this program, let me know if you think I'm doing anything wrong. This is in Python. What it does is starts with the smallest number of columns in the input side to try to minimilize the inputs that the logical expression uses. If this column does not satisfy enough unique inputs to outputs, then it proceeds to the next combination of column(s). When it finds a combination that does not have more then one output for the same input, validate() returns true and outputs the corresponding column of bits. If you run this program, you can see that for the "or" truth table, that the smallest number of columns possible to achieve a "validated" possibility of succeeding a logical expression, is both columns combined. This can be used to limit the possibilities, and also catch any obvious methods straight off the bat. IN SHORT... it tells you what input columns could (and should) be used to determine the "_output'th" output column, in order from smallest to greatest number of bits. Feel free to add and/or modify accordingly. :
class keep_index: |
Okay. I have an example of what the program would do for my original truth table.
Y = OR(A, NOR(OR(AND(NOT(C), AND(B, D)), AND(OR(NOR(E, F), AND(AND(NOT(E), F), NOT(B))), AND(C, NOT(D)))), AND((AND(AND(NOT(C), D), OR(E, F))), NOT(B)))) That's what it would output for the first logical expression. As each number in the first output column can be satisfied by these conditions. I figured it out in my head, and I couldn't even start explaining how I did it. It would be very tough to program this I think. I would think someone has already though. If you'd like to test that equation, it is wrtten in Python using these functions... :
def AND(x, y): |
Quote:
|
You not only missed a word, you missed seeing that there's logic involved, somehow. Perhaps your definition of logic is limited.
|
Perhaps my definition of logic is limited or maybe its my lack of knowledge of algebra IF im correct in thinking this is part of what it entails?
|
|
| All times are GMT -5. The time now is 7:59 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC