Results 1 to 11 of 11

Math Help - Contruct a Truth Table #6

  1. #1
    Newbie
    Joined
    Feb 2009
    Posts
    6

    Contruct a Truth Table #6

    This is for Discrete Math w/ Applications

    In fact, I'm not into Computer Science but it's a Liberal Arts Elective and a requirement. I will not be working with computers. I definitely need help with this.

    # 6 (p v q) v (~p ^ q) --> q

    # 8 ~p v q --> r

    # 10 (p --> r) <---> (q --> r)

    # 11 (p --> (q --> r)) <---> ((p ^ q) --> r)


    Any help with this would surely be appreciative...

    Regards
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Member javax's Avatar
    Joined
    Jan 2008
    From
    Milky Way
    Posts
    139
    # 6 (p v q) v (~p ^ q) --> q
    This is how we do those. I let you to fill the other fields.

    The truth table for the above function looks like this:



    Note that if you have 3 variables, you'll have 2^3 rows, and the first values should be filled like this, p - 0 0 0 0 1 1 1 1, q - 0 0 1 1 0 0 1 1, r - 0 1 0 1 0 1 0 1.
    Last edited by javax; February 5th 2009 at 09:52 AM.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Feb 2009
    Posts
    6
    How did you get the Truth Table posted?

    I was just trying to remember how it's done with values for each rows/Columns.

    Thanks

    Oh by the way, the Truth Table label should be used as a T, and F, but it's the same thing right?

    Where did you get 2^3? I know you said 3 Variables. But 2^3 = 8, there are only 4 rows, 7 columns. Emmm...
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Member javax's Avatar
    Joined
    Jan 2008
    From
    Milky Way
    Posts
    139
    Quote Originally Posted by Spawn View Post
    How did you get the Truth Table posted?

    I was just trying to remember how it's done with values for each rows/Columns.

    Thanks
    I drew it. You put the input values of variables. As I mentioned, if you have two variables(p, q) you'll have 2^2 rows, and their inputs will be:
    p, q
    ----
    0, 0
    0, 1
    1, 0
    1, 1

    if you have 3 variables (for ex. p, q, r) you'll have 2^3 rows
    their values would be:
    p, q, r
    -------
    0, 0, 0
    0, 0, 1
    0, 1, 0
    0, 1, 1
    1, 0, 0
    1, 0, 1
    1, 1, 0
    1, 1, 1

    if you have 4 variables 2^4 and so on...

    Now the other operations you'll have to calculate. See Truth table - Wikipedia, the free encyclopedia
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Newbie
    Joined
    Feb 2009
    Posts
    6
    Thank you very much. I am going to research this...I just need to get it in my head and how to use the Conclusion/hypothesis statement. Or Conditional Statements.
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Member javax's Avatar
    Joined
    Jan 2008
    From
    Milky Way
    Posts
    139
    Quote Originally Posted by Spawn View Post
    Thank you very much. I am going to research this...I just need to get it in my head and how to use the Conclusion/hypothesis statement. Or Conditional Statements.
    It's the same thing, it's just that in computer science 1 and 0 are used to represent true(1) and false(0)
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Newbie
    Joined
    Feb 2009
    Posts
    6
    Quote Originally Posted by javax View Post
    It's the same thing, it's just that in computer science 1 and 0 are used to represent true(1) and false(0)

    Gotcha....I can read Binary...just got to understand what's a conclusion/Hypothesis , and Conditional Statements and how values are calculated...
    Follow Math Help Forum on Facebook and Google+

  8. #8
    Newbie
    Joined
    Feb 2009
    From
    Cairo
    Posts
    5
    Hello Spawn,


    To construct a truth table for an expression, means to evaluate the value of the expression for all values of the input


    So the first step is to know what are the different values of the input,


    in this problem, we have two inputs, namely p and q


    p can be either T (1) or F(0)
    the same for q, it can be either T (1) or F(0)


    so p has 2 possibilities and q has also 2 possibilities


    so the total number of possibilities for the input would be 2*2 = 4


    The possibilities are
    p q
    0 0
    0 1
    1 0
    1 1


    if you have more than 2 inputs, say 4 for ex: there 2*2*2*2 = 2^4 = 16 possibilities


    and to construct the possibilities, let's say the inputs are p,q, m, n

    • we make 1 input ,say n, change each time (2^0), so n would be 0101010101010101


    • then the following input, say m, would change each 2 times (2^1), so m would be 0011001100110011
    • then the following input, say q, would change each 4 times (2^2), so q would be
      0000111100001111




    • then the following input p, would change each 8 times (2^3), so p would be

    0000000011111111


    so the possibilities for the input will be
    p q m n
    0 0 0 0
    0 0 0 1
    0 0 1 0
    0 0 1 1
    0 1 0 0
    0 1 0 1
    0 1 1 0
    0 1 1 1
    1 0 0 0
    1 0 0 1
    1 0 1 0
    1 0 1 1
    1 1 0 0
    1 1 0 1
    1 1 1 0
    1 1 1 1




    now, let's return to the original problem, we want to calculate
    (p v q) v (~p ^ q) --> q
    but this expression is complex to calculate it at once, so we divide it to smaller expressions, we can easily calculate, then merge the solutions


    so we get the following expressions
    1) p v q


    2) ~p


    3) ~p ^ q (Note: ~ operator has higher precedence than ^, that's why we calculated
    ((~p) ^ q), and not (~(p ^ q))



    1. we merge 1) v 3)



    5) compute the expression




    so here is the solution:


    p q pvq ~p ~p^q (p v q) v (~p ^ q) (p v q) v (~p ^ q) ---> q
    0 0 0 1 0 0 1
    0 1 1 1 1 1 1
    1 0 1 0 0 1 0
    1 1 1 0 0 1 1


    Hope this helps
    Follow Math Help Forum on Facebook and Google+

  9. #9
    Newbie
    Joined
    Feb 2009
    Posts
    6
    Quote Originally Posted by amrmuhammad View Post
    Hello Spawn,


    To construct a truth table for an expression, means to evaluate the value of the expression for all values of the input


    So the first step is to know what are the different values of the input,


    in this problem, we have two inputs, namely p and q


    p can be either T (1) or F(0)
    the same for q, it can be either T (1) or F(0)


    so p has 2 possibilities and q has also 2 possibilities


    so the total number of possibilities for the input would be 2*2 = 4


    The possibilities are
    p q
    0 0
    0 1
    1 0
    1 1


    if you have more than 2 inputs, say 4 for ex: there 2*2*2*2 = 2^4 = 16 possibilities


    and to construct the possibilities, let's say the inputs are p,q, m, n

    • we make 1 input ,say n, change each time (2^0), so n would be 0101010101010101


    • then the following input, say m, would change each 2 times (2^1), so m would be 0011001100110011
    • then the following input, say q, would change each 4 times (2^2), so q would be
      0000111100001111




    • then the following input p, would change each 8 times (2^3), so p would be

    0000000011111111


    so the possibilities for the input will be
    p q m n
    0 0 0 0
    0 0 0 1
    0 0 1 0
    0 0 1 1
    0 1 0 0
    0 1 0 1
    0 1 1 0
    0 1 1 1
    1 0 0 0
    1 0 0 1
    1 0 1 0
    1 0 1 1
    1 1 0 0
    1 1 0 1
    1 1 1 0
    1 1 1 1




    now, let's return to the original problem, we want to calculate
    (p v q) v (~p ^ q) --> q
    but this expression is complex to calculate it at once, so we divide it to smaller expressions, we can easily calculate, then merge the solutions


    so we get the following expressions
    1) p v q


    2) ~p


    3) ~p ^ q (Note: ~ operator has higher precedence than ^, that's why we calculated
    ((~p) ^ q), and not (~(p ^ q))



    1. we merge 1) v 3)



    5) compute the expression




    so here is the solution:


    p q pvq ~p ~p^q (p v q) v (~p ^ q) (p v q) v (~p ^ q) ---> q
    0 0 0 1 0 0 1
    0 1 1 1 1 1 1
    1 0 1 0 0 1 0
    1 1 1 0 0 1 1


    Hope this helps

    Thanks a lot...I am trying to know how is each computational values.

    Like after getting the p and q, the need to calculate the p v q, I know that v = OR, ~ = NOT, ^ = AND, there you have the --> (if-then) statement.

    It will come along just need time to get my thoughts together to construct the values for each columns.

    Thank you!!
    Follow Math Help Forum on Facebook and Google+

  10. #10
    Newbie
    Joined
    Feb 2009
    From
    Cairo
    Posts
    5
    pvq: means p or q, i.e if either p or q or both is true , then pvq is true
    so
    p q
    0 0 gives 0 because p and q are 0(false)
    0 1 gives 1 because q is 1 (true)
    1 0 gives 1 because p is 1
    1 1 gives 1 because both p and q are 1


    ~p: means not p , i.e. if p is true ~p is false, and if p is false, ~p is true
    so
    p
    0 gives 1
    1 gives 0


    a ^ b: means if a and b are true, a^b is true, otherwise it's false


    a b
    0 0 gives 0 because not both of them are true
    0 1 gives 0 because not both of them are true
    1 0 gives 0 because not both of them are true
    1 1 gives 1 because both of them are true


    so since we calculated ~p, to calculate ~p^q
    ~p q ~p^q
    1 0 0 not both of them are true
    1 1 1 both of them are true
    0 0 0 not both of them are true
    0 1 0 not both of them are true




    a-->b: means a implies b, or if a then b, i.e. if a is true then a-->b gives b, otherwise it gives true


    so
    a b a-->b
    0 0 1
    0 1 1
    1 0 0
    1 1 1


    HTH
    Follow Math Help Forum on Facebook and Google+

  11. #11
    Newbie
    Joined
    Feb 2009
    Posts
    6
    Quote Originally Posted by amrmuhammad View Post
    pvq: means p or q, i.e if either p or q or both is true , then pvq is true
    so
    p q
    0 0 gives 0 because p and q are 0(false)
    0 1 gives 1 because q is 1 (true)
    1 0 gives 1 because p is 1
    1 1 gives 1 because both p and q are 1


    ~p: means not p , i.e. if p is true ~p is false, and if p is false, ~p is true
    so
    p
    0 gives 1
    1 gives 0


    a ^ b: means if a and b are true, a^b is true, otherwise it's false


    a b
    0 0 gives 0 because not both of them are true
    0 1 gives 0 because not both of them are true
    1 0 gives 0 because not both of them are true
    1 1 gives 1 because both of them are true


    so since we calculated ~p, to calculate ~p^q
    ~p q ~p^q
    1 0 0 not both of them are true
    1 1 1 both of them are true
    0 0 0 not both of them are true
    0 1 0 not both of them are true




    a-->b: means a implies b, or if a then b, i.e. if a is true then a-->b gives b, otherwise it gives true


    so
    a b a-->b
    0 0 1
    0 1 1
    1 0 0
    1 1 1


    HTH

    Yes this did help!!

    Thank you!!...sorry for acting slow...

    Spawn
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Truth Table help
    Posted in the Discrete Math Forum
    Replies: 1
    Last Post: November 3rd 2010, 01:37 PM
  2. Truth Table
    Posted in the Discrete Math Forum
    Replies: 9
    Last Post: July 21st 2010, 10:59 AM
  3. Please help with truth table?
    Posted in the Geometry Forum
    Replies: 2
    Last Post: May 26th 2010, 10:16 AM
  4. Truth table
    Posted in the Discrete Math Forum
    Replies: 1
    Last Post: March 20th 2010, 06:25 AM
  5. Truth Table
    Posted in the Discrete Math Forum
    Replies: 1
    Last Post: March 5th 2009, 11:24 AM

Search Tags


/mathhelpforum @mathhelpforum