|
|
Subject:
Cpmputers
Category: Computers > Algorithms Asked by: mohd_fm-ga List Price: $5.00 |
Posted:
26 Feb 2003 19:02 PST
Expires: 28 Mar 2003 19:02 PST Question ID: 167655 |
Logic exercises 1) Make: a) a decision table b) a decision tree for the following problem: If you earn less than $10,000 and have at least 2 dependants, you pay no tax. If you earn less than $10,000 and have at most 1 dependant, you pay 10% If you earn at least $10,000 and have at least 3 dependants, you pay no tax. If you earn at least $10,000 and have two dependent or fewer, you pay 12%. 2) Show that ~(A È B) and ~A É ~B are equivalent by means of a) a Venn diagram b) a truth table Two logical expressions, X and Y, in the logical variables A and B are equivalent if they have the same values for each combination of truth values for A and B. That is, X has the same truth value as Y when A and B are both true, when A is true and B is false, etc. |
|
Subject:
Re: Cpmputers
Answered By: maniac-ga on 26 Feb 2003 20:06 PST |
Hello Mohd_fm, An interesting pair of questions but somewhat hard to illustrate the answer in text. The ascii art below should illustrate the concepts required. 1a Decision table You Earn Dependents < 10,000 >= 10,000 <2 10% tax 12% tax 2 no tax 12% tax >2 no tax no tax 1b Decision tree You Earn / \ < 10,000 >= 10,000 / | | \ 0-1dep 2+dep 0-2dep 3+dep 10% tax no tax 12% tax no tax 2 I am going to assume the equations read as... not (A or B) (not A) and (not B) are equivalent.... The text on my screen shows the not sign (~), but not the binary operations (I see a box and accented E). The other possible choice was not (A and B) (not A) or (not B) and I provided the answer for that too. If both are wrong, please spell out the operator names in a clarification request. 2a. A Venn Diagram (You should use circles, but I'll approximate with ranges) |----------------------| (full space) | <-- A --> | (A) | <-- B --> | (B) |---------------- | (A or B) |-| |--| not (A or B) [1] |-----| (A and B) |-------| |--------| not (A and B) [2] |-| |--------| (not A) |-------| |--| (not B) |-| |--| (not A) and (not B) [1] |-------| |--------| (not A) or (not B) [2] Note that the two lines marked with [1] are equivalent, the two lines marked with [2] are equivalent. 2b A truth table You can build up the answers below in a way similar to shown for the Venn Diagrams. I added (A or B) as an example of that. (A or B) A ~A B 1 1 ~B 1 0 not (A or B) A ~A B 0 0 ~B 0 1 (not A) and (not B) A ~A B 0 0 ~B 0 1 not (A and B) A ~A B 0 1 ~B 1 1 (not A) or (not B) A ~A B 0 1 ~B 1 1 There are a number of on line resources for logic problem such as these. Search with phrases such as logic equivalence +and +or +not to get sites such as http://www.chass.utoronto.ca/~osborne/MathTutorial/LOG.HTM --Maniac |
|
There are no comments at this time. |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |