lara discretecompletion2

Upload: cedric

Post on 21-Feb-2018

221 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/24/2019 Lara Discretecompletion2

    1/66

    LOGIC

    1.) Fill in the corresponding truth values (T or F) of the expressions

    (the shadowed area contains the answers)

    P Q expression Value

    T T P V Q T

    T F P Q T

    F T P Q T

    F F P Q F

    2.) Let:

    P = "John is healthy" Q = "John is wealthy" R = "John is wise"

    Represent:

    John is healthy and wealthy but not wise: P ! "

    John is not wealthy but he is healthy and wise: ! P "

    John is neither healthy nor wealthy nor wise: ! P ! !"

    #.) Translate the sentences into propositional expressions:

    a.) "Neither the fox nor the lynx can catch the hare if the hare is alert and quic."

  • 7/24/2019 Lara Discretecompletion2

    2/66

    !et

    P: he fox can catch the hareQ: he lynx can catch the hare.R: he hare is alert

    #: he hare is quic

    ranslation into lo$ic: %R & #) ' (P & (Q

    #ince (P & (Q is equialent to (% P * Q)+ another translations is:

    %R & #) ' (% P * Q)

    b.) ",ou can either %stay at the hotel and watch * ) or %you can $o to the -useu- and spend

    so-e ti-e there)".

    he parentheses are used to aoid a-bi$uity concernin$ the priority of the lo$ical connecties.

    P: ,ou stay at the hotel.Q: ,ou watch *R: ,ou $o to the -useu-#: ,ou spend so-e ti-e in the -useu-

    ranslation: %P & Q) * %R & #)

    $.) %iven a conditional state&ent in 'nglish

    a.) translate the sentence into a lo$ical expression

    b.) write the ne$ation of the lo$ical expression and translate the ne$ation inton$lish

    c.) write the conerse of the lo$ical expression and translate theconerse into n$lish

    d.) write the inerse of the lo$ical expression and translate the inerse inton$lish

    e.) write the contrapositie of the lo$ical expression and translate thecontrapositie into n$lish

    "/f we are on acation we $o fishin$."

  • 7/24/2019 Lara Discretecompletion2

    3/66

    nswer:

    a.) !et

    P: we are on acation

    Q: we $o fishin$

    he lo$ical expression for the aboe sentence is: P ' Q

    b.)negation:P & 0 Q"1e are on acation and we do not $o fishin$."

    c.)converse:Q ' P"/f we $o fishin$+ we are on acation."

    d.)inverse:0 P ' 0 Q"/f we are not on acation+ we don2t $o fishin$."

    e.)contrapositive:0 Q ' 0 P"/f we don2t $o fishin$+ we are not on acation.

    3.) 1rite the contrapositie+ conerse and inerse of the expressions: P ' Q+ (P ' Q+ Q ' (P

    contrapositie conerse inerse

    P ' Q (Q ' ( P Q ' P (P ' (Q

    (P ' Q ( Q ' P Q ' (P P ' (Q

    Q ' (P P ' (Q (P ' Q ( Q ' P

    *.) +eter&ine whether the following argu&ents are valid or invalid:

  • 7/24/2019 Lara Discretecompletion2

    4/66

    Pre&ises:

    a.) /f / read the newspaper in the itchen+ -y $lasses would be on the itchentable.

    b.) / did not read the newspaper in the itchen.

    ,onclusion : 4y $lasses are not on the itchen table.

    -olution:

    his is an inalid ar$u-ent./n order to show this we will represent the ar$u-ent for-ally.

    !et

    P: / read the newspaper in the itchenQ: -y $lasses would be on the itchen table.

    5or-al representation:

    %6) P ' Q%7) (P%8) herefore (Q

    1e now that when P is false+ i.e. we hae (P+ the i-plication is true

    for any alue of Q.9ence we cannot say whether Q is true or false.he error in the aboe ar$u-ent is called inverseerror.

    2. Pre&ises:

    a.) /f / don2t study hard+ / will not pass this course

    b.) /f / don2t pass this course / cannot $raduate this year.

    ,onclusion:/f / don2t study hard+ / won2t $raduate this year.

    -olution:

    his is a alid ar$u-ent+ based on the hypothetical syllo$is-./n order to show this we will represent the ar$u-ent for-ally.

    !et

  • 7/24/2019 Lara Discretecompletion2

    5/66

    P: / don2t study hardQ: / will not pass this courseR: / cannot $raduate this year

    5or-al representation:

    %6) P ' Q%7) Q ' R%8) herefore P ' R

    #. Pre&ises:

    a.) ,ou will $et an extra credit if you write a paper or if you sole the testproble-s.

    b.) ,ou dont write a paper+ howeer you $et an extra credit.

    ,onclusion: ,ou hae soled the test proble-s.

    -olution:

    his is an inalid ar$u-ent./n order to show this we will represent the ar$u-ent for-ally.

    !et

    P: you $et an extra creditQ: you write a paperR: you sole the proble-s

    5or-al representation:

    %6) %Q * R) ' P%7) (Q%8) P%;) herefore R

    he aboe ar$u-ent is a co-bination of dis

  • 7/24/2019 Lara Discretecompletion2

    6/66

    $. Pre&ises:

    a.) ,ou will $et an extra credit if you write a paper or if you sole the test proble-s.

    b.) ,ou dont write a paper and you don2t $et an extra credit.

    ,onclusion: ,ou hae not soled the test proble-s.

    -olution:

    his is a alid ar$u-ent./n order to show this we will represent the ar$u-ent for-ally.

    !et

    P: you $et an extra credit

    Q: you write a paperR: you sole the proble-s

    5or-al representation:

    %6) %Q * R) ' P%7) (Q%8) (P%;) herefore (R

    5ro- (P we can conclude that Q * R is false %-odus tollens).> dis

  • 7/24/2019 Lara Discretecompletion2

    7/66

    x, (problem(x) difficult(x))

    Negation:

    ~(x, (problem(x) difficult(x))) =

    x (~(problem(x) difficult(x))) =

    x (~problem(x) V ~ difficult(x)) =

    x (problem(x) ~ difficult(x))

    Translation:No problems are difficult.

    .) ll studentsthat stud discrete &ath are good at logic.

    %x (student(x) study_discrete_math(x) good_at_logic(x))

    Negation:

    ~ (x (student(x) study_discrete_math(x) good_at_logic(x)) =

    x (~ (student(x) study_discrete_math(x) good_at_logic(x))) =

    x (~ (

    ~( student(x) study_discrete_math(x)) V good_at_logic(x))) =

    x (~ (

    (~student(x) V ~study_discrete_math(x)) V good_at_logic(x))) =

    x (~ ( ~student(x) V ~study_discrete_math(x) V good_at_logic(x))) =

    x ((student(x) study_discrete_math(x)) ~ good_at_logic(x)))

    Translation:There is a student that studies discrete math and is not good at logic

    3.) 4ostudents are allowed to carr guns.(student(x), carry_gun(x))

  • 7/24/2019 Lara Discretecompletion2

    8/66

    x (student(x) ~carry_gun(x))

    Negation:

    ~(x, (student(x) ~carry_gun(x))) =

    x, ~(student(x) ~carry_gun(x))) =

    x, ~(~student(x) V ~carry_gun(x)) =

    x, (student(x) carry_gun(x))

    Translation:There is a student that carries a gun

    15.) 6nternationalstudents are not eligi/le for federal loans.

    (international_student(x), eligible(x))

    x (international_student(x) ~eligible(x))

    Negation:

    ~(x (international_student(x) ~eligible(x))) =

    x, ~(international_student(x) ~eligible(x)) =

    x, ~(~international_student(x) V ~eligible(x)) =

    x, (international_student(x) eligible(x))

    Translation:ome international students are eligible for federal loans.

    11.) p represents the proposition 78enr 9666 had six wives7.

    represents the proposition 7The 'nglish ,ivil ar too; place in thenineteenth centur7.

    %a) ?onnect these two propositions with @R. /s the resultin$ co-pound proposition true orfalseA

    %b) Now connect the- with >NB. /s this co-pound proposition true or falseA

  • 7/24/2019 Lara Discretecompletion2

    9/66

    %c) /s the 2opposite2 ofptrue or falseA

    nswer:

    %a)p qis "9enry */// had six wies or the n$lish ?iil 1ar too place in the nineteenth

    century"

    his istrue. he first part of the co-pound proposition is true+ and this is sufficient to -ae thewhole state-ent true C if a little oddDsoundin$E

    %b) p q is "9enry */// had six wies and the n$lish ?iil 1ar too place in the nineteenthcentury". his is false.

    %c) he opposite ofp+ which we write as 0p+ is "9enry */// did not hae six wies". his is clearlyfalse. >nd in $eneral+ ifpis true+ then 0pis false+ and ice ersa.

    12.) pis 7The printer is off

  • 7/24/2019 Lara Discretecompletion2

    10/66

    1#.)Propositional functionsp qand rare defined as follows:

    pis 7n= 07qis 7a> ?7ris 7x= 57

    1rite the followin$ expressions in ter-s ofp+ qand r+ and show that each pair of expressions islo$ically equialent. #tate carefully which of the aboe laws are used at each sta$e.

    %a)

    %%n= F) %aG 3)) %x= H)

    %%n= F) %x= H)) %%aG 3) %x= H))

    %b)

    0%%n= F) %aI 3))

    %n F) %aG 3)

    %c)

    %n= F) %0%%aI 3) %x= H))

    %%n= F) %aG 3)) %x H)

    nswer:

    %a)

    %pq) r

    %p r) %q r)

    %p q) r = r %p q) ?o--utatie !aw

    = %r p) r q) Bistributie !aw

    = %p r) %q r) ?o--utatie !aw %twice)

    %b)

  • 7/24/2019 Lara Discretecompletion2

    11/66

    5irst+ we note that

    0qis "aI 3"K and

    0pis "n F".

    #o the expressions are:

    0%p 0q)

    0pq

    0%p 0q) = 0p 0%0q) Be 4or$an2s !aw

    = 0p q /nolution !aw

    %c)

    5irst+ we note that

    0ris "x H".

    #o the expressions are

    p%0%0q r))

    %pq) 0r

    p %0%0q r)) = p %0%0q) 0r) Be 4or$an2s !aw

    = p %q 0r) /nolution !aw

    = %p q) 0r >ssociatie !aw

    1$.) hich of the following are propositions@

    %a) 6F L 73 = ;7

    %b) July ; occurs in the winter in the Northern 9e-isphere.

    %c) he population of the Mnited #tates is less than 73H -illion.

  • 7/24/2019 Lara Discretecompletion2

    12/66

    %d) /s the -oon roundA

    %e) F is $reater than 67.

    %f) x is $reater than y.

    nswer:

    %a) is a propositionK and of course it has the 2truth alue2 true.

    %b) is a proposition. @f course+ it2s false+ but it2s still a proposition.

    %c) is a proposition+ but we -ay not actually now whether it2s true or false.Neertheless+ the fact is that the state-ent itself is a proposition+ because it is definitelyeither true or false.

    %d) is not a proposition. /t2s a question.

    %e) is a proposition. /t2s false a$ain+ of course F67.

    %f) is a bit -ore debatableE /t2s certainly a potential proposition+ but until we now thealues of x and y+ we can2t actually say whether it is true or false. Note that this isn2t quite thesa-e as %c)+ where we -ay not now the truth alue because we aren2t wellDenou$h infor-ed.#ee the next para$raph.

    1?.) hich of the following are propositions@

    %a) Ouy Pre-iu- OondsE

    %b) he >pple 4acintosh is a 6 bit co-puter.

    %c) here is a lar$est een nu-ber.

    %d) 1hy are we hereA

    %e) L F = 68

    %f)aLb= 68

    nswer:

    %a) is not a proposition. %/t is a co--and+ or i-peratie.)

    %b) and

  • 7/24/2019 Lara Discretecompletion2

    13/66

    %c) are both propositions.

    %d) is not a propositionK it2s a question.

    %e) strictly speain$ is a propositional function+ but -any people would say it is a proposition.

    %f) is not a proposition+ because the result can be either true or false+ it depends on the alues ofa b.

    1*.) p is 7x A ?57B is 7x > $57.

    1rite as si-ply as you can:

    %a) 0p

    %b) 0q

    %c) p q

    %d) p q

    %e) 0p q

    %f) 0p 0q

    @ne of these co-pound propositional functions always produces the outputtrue+ and onealways outputsfalse. 1hich onesA

    nswer:

    %a) x S 3H

    %b) x I ;H

    %c) ;H x 3H

    %d) x 3H or x G ;H. his is true for all alues of x.

    %e) x S 3H %Note that we don2t need to say+ in addition+ that x G ;HK this -ust be truewheneer x S 3H.)

    %f) x S 3H and x I ;H. his can neer be true+ whateer the alue of x.

  • 7/24/2019 Lara Discretecompletion2

    14/66

    10.) 6n each part of this uestion a proposition p is defined. hich of thestate&ents that follow the definition correspond to the proposition !p@ (There&a /e &ore than one correct answer.)

    %a)

    p is "#o-e people lie 4aths".

    %i) "#o-e people dislie 4aths"

    %ii) "erybody dislies 4aths"

    %iii) "erybody lies 4aths"

    %,ou -ay assu-e in this question that noDone re-ains neutral: they either lie or dislie 4aths.)

    %b)

    p is "he answer is either 7 or 8".

    %i) "Neither 7 nor 8 is the answer"

    %ii) "he answer is not 7 or it is not 8"

    %iii) "he answer is not 7 and it is not 8"

    %c)

    p is ">ll people in -y class are tall and thin".

    %i) "#o-eone in -y class is short and fat"

    %ii) "NoDone in -y class is tall and thin"

    %iii) "#o-eone in -y class is short or fat"

    %,ou -ay assu-e in this question that eeryone -ay be cate$orisedas either tall or short+ either thin or fat.)

    nswer:

    %a) %ii)

  • 7/24/2019 Lara Discretecompletion2

    15/66

    %b) %i) and %iii)

    %c) %iii)

    1.) p is 7152$ /tes is ;nown as 1CD7

    is 7 co&puter ;e/oard is an exa&ple of a data input device7.

    xpress the followin$ co-pound propositions as n$lish sentences in as natural a way as youcan. >re the resultin$ propositions true or falseA

    %a) p q

    %b) p q

    %c) 0p

    nswer:

    Notin$ that p is false %6H7; bytes is nown as 6TO) and q is true+ we hae:

    %a) "6H7; bytes is nown as 64O and a co-puter eyboard is an exa-ple of a data inputdeice". 5alse.

    %b) "%ither) 6H7; bytes is nown as 64O or a co-puter eyboard is an exa-ple of a data inputdeice". rue.

    he word ither here is optionalK it doesn2t hae D and doesn2t need D an equialent sy-bol in!o$ic.

    %c) "6H7; bytes is not nown as 64O". rue.

    13.) p is 76 li;e Caths7

    is 76 a& going to spend at least * hours a wee; on Caths7

    1rite in as si-ple n$lish as you can:

    %a) %0p) q

    %b) %0p) q

    %c) 0%0p)

    %d) %0p) %0q)

  • 7/24/2019 Lara Discretecompletion2

    16/66

    %e) 0%p q):

    %f) %0p) %0q)

    nswer:

    %a) / dont lie 4aths+ but /- $oin$ to spend at least hours a wee on 4aths.

    %his sounds -uch -ore natural than "/ dont lie 4aths+ and /- $oin$ to spend at least hoursa wee on 4aths.")

    %b) ither / dont lie 4aths+ or /- $oin$ to spend at least hours a wee on 4aths.

    %c) /ts not true that / dont lie 4aths. %@r si-ply: / do lie 4aths.)

    %d) ither / dont lie 4aths+ or /- not $oin$ to spend at least hours a wee on 4aths.

    %/t2s not ery easy to $et a natural soundin$ sentence here. /t probably helps to include the word"ither"+ but it2s not essential.)

    %e) /ts not true that either / lie 4aths or /- $oin$ to spend at least hours a wee on 4aths.@r+ si-ply: / neither lie 4aths+ nor a- / $oin$ to spend at least hours a wee on 4aths.

    >lternatiely+ you can write the answer to %f)+ which isU

    %f) / dont lie 4aths and /- not $oin$ to spend at least hours a wee on 4aths.

    25.) Ese the laws of logical propositions to prove that:

    ( w) (! w) ( !w) G w

    #tate carefully which law you are usin$ at each sta$e.

    nswer:

    %V w) %0V w) %V 0w) = %V w) %V 0w) %0V w) ?o--utatie !aw

    = %V %w 0w)) %0V w) Bistributie !aw

    = %V ) %0V w) ?o-ple-ent !aw

  • 7/24/2019 Lara Discretecompletion2

    17/66

    = V %0V w) /dentity !aw

    = %V 0V) %V w) Bistributie !aw

    = %V w) ?o-ple-ent !aw

    = %V w) ?o--utatie !aw

    = V w /dentity !aw

    QUANTIFIERS

    xpress the state-ents usin$ quantifiers.

    1.) 'ver/od ;nows ever/od.

  • 7/24/2019 Lara Discretecompletion2

    18/66

    x%x)+ %x) = nows eerybody.

    2.) -o&e/od ;nows ever/od.

    x%x)

    #.) There is so&e/od who& no one ;nows.

    (x%x)

    $.)x : x 7= ; is true+ since 7 is an x for which x 7= ;. @n the other hand+ x : x 7= ; is clearlyfalseK not all nu-bers+ when squared+ are equal to ;.

    ?.)x : x 7L6 G H is true+ but x : x7 G 7 is false+ since for exa-ple x = 6 doesnt satisfy thepredicate.

    *.)x : x 7G 7 is true+ since x = 7 is an exa-ple that satisfies it.

    P(x ) is Hx is a citien of .I (x ) is Hx lives in .I The universe of discourse ofx is the set of all people and the universe of discourse for is the set of E-states.

    0.)>ll people who lie in 5lorida are citiVens of 5lorida.

    x%Q%x+ 5lorida) ' P%x+ 5lorida))

    .)ery state has a citiVen that does not lie in that state.

    yx%P%x+ y) 0Q%x+ y))

    -uppose "(x ) is the predicate Hx understands I the universe of discourse forx is the set of students in our discrete class and the universe of discourse for is the set of exa&ples in these lecture notes. Pa attention to the differences inthe following propositions.

    3.)xyR%x+ y) is the proposition Where exists a student in this class who understands eeryexa-ple in these lecture notes.X

    15.)yxR%x+ y) is the proposition W5or eery exa-ple in these lecture notes there is a studentin the class who understands that exa-ple.X

    11.)xyR%x+ y) is the proposition Wery student in this class understands at least oneexa-ple in these notes.X

    12.)yxR%x+ y) is the proposition Where is an exa-ple in these notes that eery student inthis class understands.X

  • 7/24/2019 Lara Discretecompletion2

    19/66

    +eter&ine the truth value of each of these state&ents if the universe of eachvaria/le consists of (i) all real nu&/ers (ii) all integers.

    1#.)xy%x L y = y L x)

    -olution:5or-ally ne$atin$ the state-ent we $et

    xy%x L y = y L x)+

    which is the law of co--utatiity of addition.

    hus state-ent %a) is false in both unierses+ because addition is co--utatie and for any x+ ywe hae x L y = y L x.

    1$.)xy%x L y = 7 7x Y y = 7)

    -olution:

    he state-ent is false in both unierses. o proe it we need to proe that ne$ation of thisstate-ent is true.

    0%x y %x L y = 7 7x Y y = 7)) x y x L y 7 7x Y y 7)

    !et us assi$n x = 7 and then the quantified predicate turns into

    7 L y 7 ; C y 7 y H y 7.

    Ese predicates and uantifiers to express this state&ent

    1?.)Where is a -an who has isited so-e par in eery proince of ?anadaX

    -olution:

    !et * %x+ y)+ where x is a person and y is a par be a predicate WPerson x isited par yX.

    !et !%x+ y)+ where x is a par and y is a proince be a predicate

    WPar x is located in proince yX.

    hen the state-ent under consideration can be expressed as follows

    x y V * %x+ V) !%V+ y).

    Find a counterexa&ple if possi/le to this universall uantified state&ent wherethe universe for all varia/les consists of all integers

    1*.) xy %8xy = 67)

    -olution:

  • 7/24/2019 Lara Discretecompletion2

    20/66

    > counterexa-ple is in particular x = 67. /f we assu-e that there is y such that

    8xy = 67+

    then we would hae 8 Z 67 Z y = 67 and thus y = 6[8+ which is does not belon$ to the unierse ofall inte$ers.

    "ewrite the following state&ent so that negations appear onl within predicates(that is no negation is outside a uantifier or an expression involving logicalconnectives)

    10.)0x %%yV P%x+ y+ V)) \ %Vy R%x+ y+ V))).

    -olution:

    4ethod 6 /f you use connectie the proble- $ets easier:

    0x %%yV P%x+ y+ V)) \ %Vy R%x+ y+ V))) x 0%%yV P%x+ y+ V)) \ %Vy R%x+ y+ V)))

    x %% y V P%x+ y+ V)) % V y R%x+ y+ V)))

    4ethod 7 /f you do not want to use then we hae to recall that

    %0%p \ q)) %p \ 0q).

    >nd then after the second step we continue:

    x 0%% yV P%x+ y+ V)) \ %Vy R%x+ y+ V)))

    x %%yV P%x+ y+ V)) \ %0%Vy R%x+ y+ V))))

    x %%yV P%x+ y+ V)) \ %Vy 0R%x+ y+ V)))

    Let (x ) /e the state&ent IxJ = xKI. 6f the universe of discourse for /othvaria/les is the set of integers what are the truth values of the following@

    1.)

    a) Q%6+ 6)

    b) Q%7+ H)

    c) x Q%x+ 7)

    d) xy Q%x+ y)

    e) yx Q%x+ y)

    -olution

  • 7/24/2019 Lara Discretecompletion2

    21/66

    a) 6 L 6 = 6 Y 6 ] 5alse.

    b) 7 L H = 7 Y H ] rue.

    c) x x L 7 = x Y 7 ] 5alse+ because the equality is equialent to 7 = Y7.

    d) xy x L y = x Y y ] 5alse. ?onsider ne$ation of this state-ent:

    xy x L y = x C y

    13.) hat does the state&ent x 4(x) &ean if 4(x) is H,o&puetr x ix connected tothe networ;.I and the do&ain consists of all co&puters on ca&pus@

    x N%x) : ery co-puter on ca-pus is connected to the networ.

    25.) %iven pre&ises: ll clear explanations are satisfactorM

    -o&e excuses are unsatisfactorM

    infer -o&e excuses are not clear explanations.M

    rite the proof for&all.

    #olution

    !et #%x) be Wx is a satisfactoryX+ ?%x) be Wx is a clear explanationX

    and %x) be Wx is an excuseX. hen the pre-ises turn into:

    x ?%x) ' #%x)

    x %x) 0#%x).

    1hile conclusion is x %x) 0?%x).

    he proof $oes as follows:

    6) x %x) 0#%x) %pre-ise)

    7) %x ) 0#%xH) %for so-e x + by existential specification of 6))

    8) x ?%x) ' #%x) %pre-ise)

    ;) ?%x ) ' #%x ) %by uniersal specification of 8))

    3) 0#%x ) %by si-plification of 7) )

    ) 0?%x ) %4odus ollens of ;) and 3))

  • 7/24/2019 Lara Discretecompletion2

    22/66

    F) %x ) %by si-plification of 7) )

    ) %x ) 0?%x ) %con

  • 7/24/2019 Lara Discretecompletion2

    23/66

    Dq__

    D p

    HTherefore Talor.I was not hired / the /an; in 4N.I

    2.) ppl ,onOunction.

    !et p be W/ will study discrete -ath.X

    !et q be W/ will study n$lish literature.X

    p

    q___

    p q

    W/ will study discrete -ath.XW/ will study n$lish literature.X

    HTherefore 6 will stud discrete &ath and 6 will stud 'nglish literature.I

    #.) ppl +isOunctive -llogis&

    !et p be W/ will study discrete -ath.X

    !et q be W/ will study n$lish literature.X

    p qDp____

    q

    W/ will study discrete -ath or / will study n$lish literature.X

    W/ will not study discrete -ath.X

    HTherefore 6 will stud 'nglish literature.I

    $.) ppl "esolution.

    !et p be W/ will study discrete -ath.X

    !et r be W/ will study n$lish literature.X

    !et q be W/ will study databases.X

    Dp r

  • 7/24/2019 Lara Discretecompletion2

    24/66

    p q__

    q r

    / will not study discrete -ath or / will study n$lish literature.X

    W/ will study discrete -ath or / will study databases.X

    HTherefore 6 will stud data/ases or 6 will 'nglish literature.I

    ?.)#how that the followin$ ar$u-ent for-

    p ' r

    r ' s

    t Ds

    Dt uDu_____

    Dp

    is alid by breain$ it into a list of nown ele-entary alid ar$u-ent for-s or rules.

    6. p ' r+ r ' s Pre-ise

    7. p ' s #yllo$is-

    8. t Cs Pre-ise

    ;. Cs t ?o--utatie !aw of

    3. s't Ds t\ s't

    . p' t #yllo$is-

    F. Ct u Pre-ise

    . t' u Dt u \ t'u

    ^. p' u #yllo$is-

    6H. Cu Pre-ise

    66. Cp 4

    *.) +eter&ine whether it is valid or invalid.

  • 7/24/2019 Lara Discretecompletion2

    25/66

    P6= p' q

    P7= p___

    ? = q

    %%p' q) p )' qP Q p' q %p' q) p %%p' q) p )' q

    5 5 5 5 5 5 5 5

    tautolo$yK 9L6+

    0.) -how that the hpotheses (p)r and rs i&pl the conclusion ps.

    ?learly `%pq)r %r's)= `0 %pq) 'r %r's). >pplyin$ 9ypotheses syllo$is-+ fro- `0 %pq)'r %r's) follows 0 %pq) 's. Out 0%pq) 's=%pq) s. >pplyin$ the distributie law %pq)s =%ps)%qs) and si-plification fro- %ps)%qs) follows %ps).

    .) -how if the following argu&ent is valid@

    /f you do eery proble- in this boo+ then you will learn discrete -athe-atics. ,ou learneddiscrete -athe-atics. herefore+ you did eery proble- in this boo.

    !et

    p: W,ou did eery proble- in this boo+X

    q: W,ou learned discrete -athe-atics.X

    #o the ar$u-ent can be expressed as: `%p'q)q'p. Out `%p'q)q'p is not a tautolo$y+ it isfalse if p=5 and q=. herefore the reasonin$ is not correct. his type incorrect reasonin$ is

    called the fallacy of denying te ypote!e!.

    3.) Let p and /e as in 'xa&ple 15. 6f (p)!p =T is it correct to Let p and /eas in 'xa&ple 15. 6f (p)!p =T is it correct to conclude that !=T@

    #olution:

  • 7/24/2019 Lara Discretecompletion2

    26/66

    1e chec if `%p'q)0p ' 0q is a tautolo$y. /t is not %chec for p=5+ q=). #o it is not correct toconclude that 0q=. his type incorrect reasonin$ is called the fallacy of denyin$ thehypotheses.

    15.) ssu&e that HFor all positive integer n if n is greater than $ then nQ2 is less

    than 2QnI is true. -how that 155Q2.#olution: !et

    P%n): WnG;X

    Q%n): Wn77nX.

    #o the state-ent can be represented as n%P%n)'Q%n))+ where B=N. 1e assu-e thatn%P%n)'Q%n)) is true.

    -T'P "'-R46. P%6HH) Pre-ise

    7. n%P%n)'Q%n)) Pre-ise

    8. P%6HH)'Q%6HH)) Mniersal instantiation fro-%7)

    ;. Q%6HH) 4odus ponens fro- %6) and %8)

    67.) Show that the following argument form

    p q, q r,p s t, r, q u s, t

    is valid b brea!ing it into a list of !nown elementar valid argumentforms or rules"

    Solution#e$ll treat all the rules of inferen%e introdu%ed earlier inthis subse%tion as the !nown elementar argument forms" &helogi%al inferen%e for the argument form in the 'uestion is as follows"

    (1) q r premiser premise

    q by modus tollens

    (2) p q premise

    q by (1)

    p by disjunctie syllo!ism

    (") q u s premise

  • 7/24/2019 Lara Discretecompletion2

    27/66

    q by (1)

    u s by modus ponens

    (#) u s by (")

    s by conjunctie simpli$ication

    (%) p by (2)

    s by (#)

    p s by conjunctie addition

    (&) p s t premise

    p s by (%)

    t by modus ponens

    11.) -uppose that the conditional state&ent H6f it snows toda then we will gos;iingI and its hpothesis H6t is snowing todaI are true. Then / &odusponens it follows that the conclusion of the conditional state&ent He will go

    s;iingI is true.> alid ar$u-ent can lead to an incorrect conclusion if one or -ore of its pre-ises is false.

    12.) ppl disOunctive sllogis&.

    5ro-: Joe is a plu-ber Joe too a colle$e class.

    >nd: Joe is not a plu-ber.___________________

    ?onclude: Soe too; a college class.

    1#.) ppl &odus ponens in predicate logic.5ro-: a = b and b = c i-plies a = c

    >nd: %x Y y)7 = x7 Y 7xy L y7 = %y Y x)7

    ?onclude: (x K )2= ( K x)2

    Tell the validit of each argu&ent / choosing one of the ff:

    CP< 4odus Ponens L-< !aw of #yllo$is-CT< 4odus ollens L,< !aw of ?ontrapositie

    49,< No *alid ?onclusion

    1$.)

    p ' r

  • 7/24/2019 Lara Discretecompletion2

    28/66

    Dp____

    r

    >nswer: 49,

    1?.)

    t( ) r(s*

    +)r(s*__

    Dt

    >nswer: CT

    1*.)

    r(+t

    +t ( v__

    t( v

    >nswer: L-

    10.) ( +r

    r ( +

    >nswer: L,

    1.) Fro& the single proposition.

    p ( p )Show that ' is a %on%lusion"

    S&-. /-0S12

    3"* )('* .remise

    4"* 5on6un%tion using )3*

  • 7/24/2019 Lara Discretecompletion2

    29/66

    7"* (' 5on6un%tion using )3*

    8"* ' 9odus .onens using )4* and )7*

    13.) Esing the rules of inference construct a valid argu&ent to show that HSohn-&ith has two legsI

    is a consequence of the pre-ises:

    H'ver &an has two legs.I HSohn -&ith is a &an.I

    #olution: !et 4%x) denote Wx is a -anX and !%x) W x has two le$sX and let John #-ith be a-e-ber of the do-ain.

    *alid >r$u-ent:

    #P R>#@N

    x %4%x) ' !%x)) Pre-ise

    4%J) ' !%J) M/ fro- %6)

    4%J) Pre-ise

    !%J) 4odus Ponens usin$ %7) and %8)

    25.) Ese the rules of inference to construct a valid argu&ent showing that theconclusion

    W#o-eone who passed the first exa- has not read the boo.X

    follows fro- the pre-ises

    W> student in this class has not read the boo.X

    Weryone in this class passed the first exa-.X

    #olution: !et ?%x) denote Wx is in this class+X O%x) denote W x has read the boo+X

    and P%x) denote Wx passed the first exa-.X

  • 7/24/2019 Lara Discretecompletion2

    30/66

    5irst we translate the pre-ises and conclusion into sy-bolic for-.

    x %?%x) DO%x))

    x %?%x) ' P%x))

    x %P%x) DO%x))

    #P R>#@N

    x %?%x) DO%x)) Pre-ise

    ?%a) DO%a) J fro- %6)

    ?%a) #i-plication fro- 7

    x %?%x) ' P%x)) Pre-ise

    ?%a) ' P%a) M/ fro- %;)P%a) 4B fro- %8) and %3)

    DO%a) #i-plication fro- %7)

    P%a) DO%a) ?on< fro- %) and %7)

    x %P%x) DO%x)) fro- %)

    SET T"EOR#

    1.) E = natural nu&/ersUBA= 2 $ * 15UB $= 1 # * 0 U

    #tate whether each of the followin$ is true or false:

    a) 7 :A%b) 66 :B

    %c) ; ;B

    %d)A:E

    %e)A= een nu-bersnswer:

  • 7/24/2019 Lara Discretecompletion2

    31/66

    %a)

    %b) 5

    %c)

    %d) 5K > is a subsetof M %which we -eet in the next section)

    %e) 5K een nu-bers -eans the set of all the een nu-bers+ not

  • 7/24/2019 Lara Discretecompletion2

    32/66

    %b) 6+ 8+ 3+ F+ U+ but not C8 or C6

    %c) 3+ D3

    %d) 8+ 7F+ 7;8+ U

    $.) 6fE= letters of the alpha/etU= a a a / / a cUD= c / a cU and,= a

    / cU what can /e said a/outDand,@

    nswer:

    hey are all equal.

    ?.) E = natural nu&/ersUB = 2 $ * 15UB D = 1 # * 0 U

    #tate whether each of the followin$ is true or false:%a) >

    %c)

  • 7/24/2019 Lara Discretecompletion2

    33/66

    0.)-;etch 9enn diagra&s that show the universal set E the sets and D and a

    single ele&ent x in each of the following cases:%a) x :>K >

    nswer:

    a.)

    b.)

    c.)

    d.)

  • 7/24/2019 Lara Discretecompletion2

    34/66

    .) E = 1 2 # $ ? * 0 3 15U

    = 2 $ * 15U

    D = 1 # * 0 U , = # 0U

    %a) /llustrate the sets E+A+ Band Cin a *enn dia$ra-+ -arin$ all the ele-ents in

    the appropriate places. %Note: if any re$ion in your dia$ra- does not contain any

    ele-ents+ reDdraw the set loops to correct this.)

    %b) Using your Venn diagram+ list the ele-ents in each of the followin$ sets:

    A B+A>C+Aj+ Bj+ BAj+ B Cj+AC B+Ak B

    %c) ?o-plete the state-ent usin$ a sin$le sy-bol: CD B= ... .

    nswer:

    a.)

    b.) A B= +

    A>C= 7+ 8+ ;+ + F+ + 6H

    Aj = 6+ 8+ 3+ F+ ^

  • 7/24/2019 Lara Discretecompletion2

    35/66

    Bj = 7+ ;+ 3+ ^+ 6H

    BAj = 6+ 8+ F

    B Cj = 6+ +

    AC B= 7+ ;+ 6H

    Ak B= 6+ 7+ 8+ ;+ F+ 6H

    %c) CD B=

    3.) True or false@

    %a) g g = 6

    %b) g x+ x g = 7%c) g M g = H

    nswer:

    %a) 5

    %b) 5

    %c)

    15.) hat can ou sa a/out two setsPandif:

    %a) P Qj =

    %b) P>Q= PA

    nswer:

    %a) P=Q

    %b) Q=P

    11.) Ca;e six copies of the 9enn diagra& shown alongside and then shade theareas represented /:

    %a)Aj >B

    %b)A Bj

  • 7/24/2019 Lara Discretecompletion2

    36/66

    %c) %A B) j

    %d)Aj >Bj

    %e) %A>B) j

    %f)Aj Bj

    nswer:

    a.) b.)

    12.) 6dentif the sets represented / each of the shaded areas /elow using theset notation s&/ols Z and [ onl:

    d.)c.)

    f"*e"*

  • 7/24/2019 Lara Discretecompletion2

    37/66

    a.)

    nswer:

    %a) Bj

    %b)A Bj%c) %A>B) %A B) j or %A Bj) >%Aj B)

    %d) %A B) >%Aj Bj) or %A>B) j >%A B) or UA

    1#.) %a) @ne of the shaded re$ions in question 3 represents the setAC B. /dentify whichone it is+ and hence write a definition ofAC Busin$ only sy-bols fro- the list + >and j.

    %b) >$ain usin$ one of your answers to question 3+ write a definition ofAk Busin$ onlysy-bols fro- the list + >and j. %here are two possibilities here C see if you can find the-

    bothE)nswer:

    %a) Re$ion %b) represents > C O. #o > C O = > O j

    %b) Re$ion %c) represents > k O.

    #o > k O = %> O) >%> j O j) or %> >O) j >%> O)

    d"*%"*

    b"*

  • 7/24/2019 Lara Discretecompletion2

    38/66

    1$.) %a) /f>= 6+ 7+ 8+ ;+ write downP%>) by listin$ its ele-ents. 1hat is the alue of gP%>)gA

    %b) /f g>g = 3+ what is the alue of gP%>) gA

    %c) /f g>g = 6H+ what is the alue of gP%>) gA

    nswer:

    %a)P%>) = + 6+ 7+ 8+ ;+ 6+ 7+ 6+ 8+ 6+ ;+ 7+ 8+ 7+;+ 8+ ;+ 7+ 8+ ;+ 6+ 8+ ;+ 6+7+ ;+ 6+ 7+ 8+ 6+ 7+ 8+ ;

    gP%>) g = 6

    %b) 87

    %c) 76H = 6H7;

    1?.) Prove the following identities stating carefull which of the set laws ou areusing at each stage of the proof.

    %a) O >% >) = O

    %b) %> j M) j = >

    %c) %? >>) %O >>) = > >%O ?)

    %d) %> O) >%> O 2 ) = >

    %e) %> O) >%> >O 2 ) j = O %f) > %> >O) = >

    nswer:

    %a) O >% >) = O >%> ) ?o--utatie

    = O > /dentity= O /dentity

    %b) %A2 E) 2 = %A') 2 >E\ Be 4or$an

    =A>E\ /nolution

    =A> ?o-ple-ent

    ?0#

  • 7/24/2019 Lara Discretecompletion2

    39/66

    =A /dentity

    %c) %? >>) %O >>) = %> >?) %O >>) ?o--utatie

    = %> >?) %> >O) ?o--utatie

    = > >%? O) Bistributie

    = > >%O ?) ?o--utatie

    %d) %> O) >%> O 2 ) = > %O >O 2 ) Bistributie

    = > M ?o-ple-ent

    = > /dentity

    %e) %> O) >%> >O 2 ) 2 = %> O) >%> 2 %O 2 ) 2 ) Be 4or$an

    = %> O) >%> 2 O) /nolution

    = %O >) >%O > 2 ) ?o--utatie % 7)

    = O %> >> 2 ) Bistributie= O M ?o-ple-ent

    = O /dentity

    1*.) ]= a cU andN= a / e fU

    1rite down the ele-ents of:

    %a)X Y

    %b) YX

    %c)X7%=XX)

    %d) 1hat could you say about two setsAand BifA B= BAA

    nswer:

    %a)m,= %a+ a)+ %a+ b)+ %a+ e)+ %a+ f)+ %c+ a)+ %c+ b)+ %c+ e)+ %c+ f)

    %b),m= %a+ a)+ %a+ c)+ %b+ a)+ %b+ c)+ %e+ a)+ %e+ c)+ %f+ a)+ %f+ c)

    %c)mm= %a+ a)+ %a+ c)+ %c+ a)+ %c+ c)

    f) A %A>B) = %A>) %A>B)/dentity

    =A>% B) Bistributie

    =A %B ) ?o--utatie

    =A> /dentity

    =A /dentity

  • 7/24/2019 Lara Discretecompletion2

    40/66

    %d) hey are equal: > = O

    10.) chess /oardMs rows are la/elled 1 to and its colu&ns a to h. 'achsuare of the /oard is descri/ed / the ordered pair (colu&n letter row nu&/er).

    %a) > ni$ht is positioned at %d+ 8). 1rite down its possible positions after a sin$le -oeof the ni$ht.

    %b) /fR= 6+ 7+ ...+ +?= a+b+ ...+h+ andP= coordinates of all squares on the chessboard+ use set notation to expressPin ter-s ofRand?.

    %c) > roo is positioned at %$+ 7). /f= 7 and= $+ express its possible positionsafter one -oe of the roo in ter-s ofR+?+and.

    nswer:

    %a) %b+ 7)+ %b+ ;)+ %c+ 6)+ %c+ 3)+ %e+ 6)+ %e+ 3)+ %f+ 7)+ %f+ ;)

    %b)P=?R

    %c) %%R) >%?)) D %)

    1.) 6n a certain progra&&ing language all varia/le na&es have to /e #characters long. The first character &ust /e a letter fro& \a\ to \\B the others can/e letters or digits fro& 5 to 3.

    /f!= a+ b+ c+ ... + V+B= H+ 6+ 7+ ...+ ^+ and*= per-issible ariable na-es+ use a ?artesian

    product to co-plete: *= pqrg %p+q+r) :...

    nswer:

    *= pqrg %p+q+r) :! %!>B) %!>B)

    = $ V2 2W#

  • 7/24/2019 Lara Discretecompletion2

    41/66

    $OOLEAN ALGE$RA

    1.)( J D) ( J ,)

    >> L >? L O> L O?

    > L >? L O> LO?

    >%6 L ?) L O> L O?

    > L O> L O?

    >%6L O) L O?

    J D,

    2.) ^( _ D) _ (^ J D) _ (^D J D)

    (%> O) %(> L O)

  • 7/24/2019 Lara Discretecompletion2

    42/66

    %(> L (O) %(> L O)

    (> L (O O

    ^

    #.) LC4 J CL

    4!N L 4!

    4! %N L 6)

    4! 6

    CL

    $.) -= ( J D) ++MJ (J M)+

    %> L O)H L 6H

    H L B

    +

    ?.) ]= ,MD J D>O L >O?

    D J ,

    *.) T = D J D(D J ,M) J DM,

    >O L OO L O? L O?

    >O L O L O? L O?

    O%> L 6 L ?) L O?

    O6 L O?

    OL O?

  • 7/24/2019 Lara Discretecompletion2

    43/66

    D J ,

    0.) (DM J DM,) (DM J ,M)

    >O L >O? L O?>O L O??

    >O L >O? L >O?

    >O %6 L ? L ?)

    D

    .) MDM,M J MDM, J DM,M J DM,

    >O%?L?) L >O%?L?)

    >O L >O

    O%>L>)

    O 6

    DM

    3.) (DM J ,)M>O L ?

    %> L O) ?

    (M J D) _ ,M

    15.) ( ( J D)M J (,+)M)M

    ]= %> L O)

    N= %?B)

    %m L,) = m L ,

    %> L O) ?B

  • 7/24/2019 Lara Discretecompletion2

    44/66

    ,+ J DM,+

    11.) ( (JD) ,M+M J ' J FM )M =( (JD),M+M )M _ 'M _ F

    ]=%>LO) ?B ]=%>LO)

    N= N= ?

    `= 5 `= B

    (]JNJ`)M = ]M _ NM _ `M =% %>LO) L ? L B ) 5

    (]_N_`) = ]M J NM J `M = %> O L ? L B) 5

    =M _ DM'MF J ,'MF J +'MF

    12.) ( (E J 9)M ( J ])M (N J )M )M = E J 9 J J ] J N J

    = (E J 9)M

    D= ( J ])M

    ,= (N J `)M (N J `)M

    ( _ D _ ,)M = M J DM J,M

    1#.) f= ( a / c d) = & (5 # * 11 1# 1$) J d(? 0 15 12)

    a/cd

    55 51 11 15

    55 1 ]51 x 1 111 1 ] 115 1 1 x

    /cdM J /Mcd J acMd J aM/McMdM

    1$.) f(wx ) = & ( ? 0 3 11 1# 1$) J d (2 * 15 12 1?)

    wx

    55 51 11 15

  • 7/24/2019 Lara Discretecompletion2

    45/66

    55 x51 1 1 111 1 x 115 x x 1 x

    x J w J w

    1?.) f(a / c d) = &(1 11 12 1?) J d (# 1#)

    a/cd

    55 51 11 15

    55 1 1 5 151 5 1 ] 111 ] 1 5 515 1 1 1 1

    f= aMd J aMd J cdM J a/McM -RP &inter&s

    f=(aM J cM J dM) _ (a J /M J dM) _ (aM J /M J c) PR- &axter&s

    1*.) f (a/cdef) = & (1? 1* 10 #2 ## $2 $#)

    defabc

    HHH HH6 H66 H6H 6HH 6H6 666 66H

    HHHHH6 1H66H6H 1 16HH 1 1

    6H6 1 166666H

    %@d@e@ ab@%d@e a@b@%def

    0nswerA cMdMeM J a/McdMe J aM/Mcdef

  • 7/24/2019 Lara Discretecompletion2

    46/66

    10.) f( uvwx)= &(5 * 1 13 25 21 2* 20 2 23 $ ?$)

    x+y+Vu++w

    HHH HH6 H66 H6H 6HH 6H6 666 66H

    HHH 6 6HH6H66 6 6 6 6H6H 6 6 6 66HH6H666666H 6 6

    wV u

    >nswer:wMM J uMv

    1.) f(uvwx)= & (5 1 0 13 21 20. #0 $ $3 ??)

    x+y+Vu++w

    HHH HH6 H66 H6H 6HH 6H6 666 66H

    HHH 6 6 6HH6H66 6H6H 6 66HH 6

    6H666666H 6 6 6

    w@B@@ u@wB@C w@B@Cw@BC

  • 7/24/2019 Lara Discretecompletion2

    47/66

    x+y+Vu++w

    HHH HH6 H66 H6H 6HH 6H6 666 66H

    HHHHH6H66 6 6 6H6H 6 6 6

    6HH 6 6 66H6 6 6 666666H

    0nswerA uMwxM J wMxMM J wMxM J wMx

    13.)f (uvwx)= & (10 1 21 2? 2* 23 ## #$ #0 $1 $2 $?)

    B@@C B@C@ B@C

    0nswerAxMM J xMM J xM

    25.) f(D,+'F) = &( 10 13 25 21 2? 2 23 ## #? ?0 ?3)D-E0F5

    HHH HH6 H66 H6H 6HH 6H6 666 66H

    HHHHH6H66 3 3H6H 3 3 3 36HH 3 36H6 3 3666 3 366H

    D@E 0@FD-@

    0nswerA MD+'M J +MF

    FUNCTION

    1. Delow are several functions fro& " to ". -elect all of the ones that areinOective.

    a.) f(x)=#x

  • 7/24/2019 Lara Discretecompletion2

    48/66

    >nswer:

    a b c

    2.) Prove that f: `? `? given / f(x) = xJ# is inOective.

    3 = H+ 6+ 7+ 8+ ;

    x f(x)H 86 ;7 H8 6; 7

    # .) Prove that g: `? `? given / g(x) = x#is inOective.

    x g(x)H H6 67 ;8 ;; 6

    $.) Let = 1 2 # U and D = a / U.

    " = (1a) (2a) (#/)U is a function fro& to D.

    ?.) Let = 1 2 # U and D = a / U.

    - = (1a) (1/) (2a) (#/)U is a not function fro& to D.

    *.) Let = 1 2 # U and D = a / U.

    No Colli!ion

    It i! in%ecti&e'

    It i! not in%ecti&e'

    a

    /

    6

    7

    8

    a

    /

    6

    7

    8

  • 7/24/2019 Lara Discretecompletion2

    49/66

    & G (1a) (#/)U is not a function fro& to D.

    0.) +eter&ine the do&ain codo&ain and range.

    he do-ain is 6+7+8.

    he codo-ain is p+ q+ r+ s

    he ran$e is p+ r

    +eter&ine if it is onto or not onto function.

    ll ele&ents in D are used. That is f(a) = /. ( su/Oective)

    .)

    >nswer:Rnto

    3.)

    a

    /

    6

    7

    8

    p

    r

    s

    6

    7

    8

    8

    4

    H

    r h

    o '

    8 4

    H I

    3

    r

    h

    '

  • 7/24/2019 Lara Discretecompletion2

    50/66

    >nswer:4ot onto

    15.) hich of the relations /elow is a function@

    a.) %7+8)+ %8+;)+ %3+6)+ %+7)+ %7+;)

    b.) %7+8)+ %8+;)+ %3+6)+ %+7)+ %F+8)

    c.) %7+8)+ %8+;)+ %3+6)+ %+7)+ %8+8)

    >nswer: /

    11.) %iven the relation = (?2) (0$) (315) (x ?)U. hich of the following valuesfor x will &a;e relation a function@

    a.) F

    b.) ^

    c.) ;

    >nswer: c

    12.) True or False.

    The following relation is a function.(1512) (?#) (1? 15) (?*) (15)U

    >nswer: False

    1#.) hich of the relations /elow is a function@

    a.) %6+6)+ %7+6)+ %8+6)+ %;+6)+ %3+6)

    b.) %7+6)+ %7+7)+ %7+8)+ %7+;)+ %7+3)

    c.) %H+7)+ %H+8)+ %H+;)+ %H+3)+ %H+)

    >nswer: a

  • 7/24/2019 Lara Discretecompletion2

    51/66

    1$.) 6s the relation depicted in the chart /elow a function@

    ] 5 1 # ? # 3 3 15 * 15 0

    ,es

    No

    ?annot be deter-ined fro- a chart.

    >nswer:Nes

    +eter&ine if it is function or not.

    1?.)

    >nswer:4ot a function

    1*.)

    >nswer: Function

    10.) 6s the relation depicted in the chart /elow a function@

    34

    7

    ab

    %

    3

    4

    7

    a

    b

    %

  • 7/24/2019 Lara Discretecompletion2

    52/66

    ] nswer: +o&ain= (

  • 7/24/2019 Lara Discretecompletion2

    53/66

  • 7/24/2019 Lara Discretecompletion2

    54/66

    %c) R is not transitie. his is because otherwise the arrow fro- 6 to H and arrow fro- H to 8would i-ply the existence of an arrow fro- 6 to 8 %which doesn2t exist). /n other words %6+H)R+ %H+8) R and %6+8) Ri-ply R is not transitie.

    2.) Let &n and d /e integers with d 5. Then if d divides (&

  • 7/24/2019 Lara Discretecompletion2

    55/66

  • 7/24/2019 Lara Discretecompletion2

    56/66

    only if they are equal. R3 is antisy--etric because it is i-possible that a = b L 6 and b = a L 6.he reader should erify that none of the other relations is antisy--etric.

    .) 6n pro/le& no.* hich of the relations in pro/le& no.* are transitive@

    #olution:he relations R6+ R7+ R8+ and R; are transitie. R6 is transitie because a I b and b Ic i-ply that a I c. R7 is transitie because aGb and bGc i-ply that aGc. R8 is transitie becausea = b and b = c i-ply that a = c. R; is clearly transitie+ as the reader should erify. R3 is nottransitie because %7+ 6) and %6+ H) belon$ to R3+ but %7+ H) does not. R is not transitiebecause %7+ 6) and %6+ 7) belon$ to R+ but %7+ 7) does not.

    3.) hich of the relations fro& pro/le& no.* are reflexive@

    #olution: he reflexie relations fro- xa-ple 3 are R6 %because a I a for eery inte$er a)+ R8+and R;. 5or each of the other relations in this exa-ple it is easy to find a pair of the for- %a+ a)that is not in the relation. %his is left as an exercise for the reader.)

    15.) 6s the HdividesI relation on the set of positive integers reflexive@

    #olution: Oecause a g a wheneer a is a positie inte$er+ the WdiidesX relation is reflexie. %Notethat if we replace the set of positie inte$ers with the set of all inte$ers the relation is notreflexie because by definition H does not diide H.)

    11.) 6s the HdividesI relation on the set of positive integers s&&etric@ 6s itantis&&etric@

    #olution: his relation is not sy--etric because 6g7+ but 7 g 6. /t is antisy--etric+ for if a and bare positie inte$ers with a gb and b ga+ then a = b %the erification of this is left as an exercisefor the reader).

    !et R be the relation consistin$ of all pairs %x+ y) of students at your school+ where x has taen-ore credits than y. #uppose that x is related to y and y is related to V. his -eans that x has

    taen -ore credits than y and y has taen -ore credits than V. 1e can conclude that x hastaen -ore credits than V+ so that x is related to V. 1hat we hae shown is that R has thetransitie property+ which is defined as follows.

    12.) 6s the HdividesI relation on the set of positive integers transitive@

  • 7/24/2019 Lara Discretecompletion2

    57/66

    #olution: #uppose that a diides b and b diides c. hen there are positie inte$ers and l suchthat b = a and c = bl. 9ence+ c = a%l)+ so a diides c. /t follows that this relation is transitie.

    1e can use countin$ techniques to deter-ine the nu-ber of relations with specific properties.5indin$ the nu-ber of relations with a particular property proides infor-ation about how

    co--on this property is in the set of all relations on a set with n ele-ents.

    1#.) Let = 1 2 #U and D = 1 2 # $U. The relations "1 = (1 1) (2 2) (# #)U and"2 = (1 1) (1 2) (1 #) (1 $)U can /e co&/ined to o/tain

    R6 >R7 = %6+ 6)+ %6+ 7)+ %6+ 8)+ %6+ ;)+ %7+ 7)+ %8+ 8)+

    R6 R7 = %6+ 6)+

    R6 Y R7 = %7+ 7)+ %8+ 8)+

    R7 Y R6 = %6+ 7)+ %6+ 8)+ %6+ ;)

    1$.) Let and D /e the set of all students and the set of all courses at a schoolrespectivel. -uppose that "1 consists of all ordered pairs (a /) where a is astudent who has ta;en course / and "2 consists of all ordered pairs(a /) wherea is a student who reuires course / to graduate. hat are the relations "1 "2"1 Z "2 "1 "2 "1 K "2 and "2 K "1@

    #olution: he relation R6 >R7 consists of all ordered pairs %a+ b)+ where a is a student whoeither has taen course b or needs course b to $raduate+ and R6 R7 is the set of all orderedpairs %a+ b)+ where a is a student who has taen course b and needs this course to $raduate.

    >lso+ R6 R7 consists of all ordered pairs %a+ b)+ where student a has taen course b but doesnot need it to $raduate or needs course b to $raduate but has not taen it. R6 Y R7 is the set ofordered pairs %a+ b)+ where a has taen course b but does not need it to $raduateK that is+ b is anelectie course that a has taen. R7 Y R6 is the set of all ordered pairs %a+ b)+ where b is acourse that a needs to $raduate but has not taen.

    1?.) hat is the co&posite of the relations " and - where " is the relationfro&1 2 #Uto 1 2 # $U with " = (1 1) (1 $) (2 #) (# 1) (# $)U and - is therelation fro& 1 2 # $U to 5 1 2U with - = (1 5) (2 5) (# 1) (# 2) ($ 1)U@

    #olution: # R is constructed usin$ all ordered pairs in R and ordered pairs in #+ where thesecond ele-ent of the ordered pair in R a$rees with the first ele-ent of the ordered pair in #.5or exa-ple+ the ordered pairs %7+ 8) in R and %8+ 6) in # produce the ordered pair %7+ 6) in # R.?o-putin$ all the ordered pairs in the co-posite+ we find

  • 7/24/2019 Lara Discretecompletion2

    58/66

    # R = %6+ H)+ %6+ 6)+ %7+ 6)+ %7+ 7)+ %8+ H)+ %8+ 6).

    1*.) Let " = (1 1) (2 1) (# 2) ($ #)U. Find the powers "n n = 2 # $....

    #olution: Oecause R7 = R R+ we find that R7 = %6+ 6)+ %7+ 6)+ %8+ 6)+ %;+ 7). 5urther-ore+because R8 = R7 R+ R8 = %6+ 6)+ %7+ 6)+ %8+ 6)+ %;+ 6). >dditional co-putation shows that R; isthe sa-e as R8+ so R; = %6+ 6)+ %7+ 6)+ %8+ 6)+ %;+ 6). /t also follows that Rn = R8 for n = 3+ +F+.... he reader should erify this.

    10.) Let "1 /e the Hless thanI relation on the set of real nu&/ers and let "2 /e theHgreater thanI relation on the set of real nu&/ers that is "1 = (x ) Y xU. hatare "1 "2 "1 Z "2 "1 K "2 "2 K "1 and "1 "2@

    #olution: 1e note that %x+ y) :R6 >R7 if and only if %x+ y) :R6 or %x+ y) :R7. 9ence+ %x+ y) :R6 >R7 if and only if xy. Oecause the condition xy is the sa-e as the condition x = y+ it followsthat R6 >R7 = %x+ y) g x = y. /n other words+ the union of the Wless thanX relation and theW$reater thanX relation is the Wnot equalsX relation.

    Next+ note that it is i-possible for a pair %x+ y) to belon$ to both R6 and R7 because it isi-possible that xy. /t follows that R6 R7 = J. 1e also see that R6 Y R7 = R6+ R7 Y R6 = R7+and R6 R7 = R6 >R7 Y R6 R7 = %x+ y) g x = y.

    1.) Let /e the set of cities in the E.-.. and let D /e the set of the ?5 states inthe E.-.. +efine the relation " / specifing that (a /) /elongs to " if a cit withna&e a is in the state /.

    5or instance+ %Ooulder+ ?olorado)+ %Oan$or+ 4aine)+ %>nn >rbor+ 4ichi$an)+ %4iddletown+ NewJersey)+ %4iddletown+ New ,or)+ %?upertino+ ?alifornia)+ and %Red Oan+ New Jersey) are in R.

    13.) ,onsider the relation " = (1 #) (1 $) (# 2) (# #) (# $)U on = 1 2 # $U.Find the do&ain and range of ".

    Bo-ain = 6+ 8+

    Ran$e = 7+ 8+ ;

  • 7/24/2019 Lara Discretecompletion2

    59/66

    25.) Find the do&ain and range of the function that assigns to each positiveinteger the largest perfect suare not exceeding this integer.

    0nswerA

    Domain the set of positive integers

    NU($ER S#STE(1.) dd K to J#

    %L8) HHHH HH66L%Y) 6666 6HHH

    ))))))))))))))

    %Y3) 6666 6H66

    2.) dd K? to K2

    %Y7) 6666 666HL%Y3) 6666 6H66

    ))))))))))))))

    %YF) 6 6666 6HH6

    #.) K* fro& J0

  • 7/24/2019 Lara Discretecompletion2

    60/66

    %LF) H666 H666Y%Y) 6H6H DG Ne$ate DG LH66H

    __________ _____ 68 66H6 = Y L 3 = Y8 : @erflow

    $.) 11551512 1111512(15115 *115)

    66HH6H6 6H66H 6666H6 66H

    ____________66HH6H6 L66HH6H6

    ____________ 666666HH6 L66HH6H6

    ____________

    6H6HH6HHHH6L66HH6H6

    ____________6H66H666HHH6L66HH6H6

    ____________66HHHHHH6HHH6 = ;H^6HL 7H;6HL 66HL 6 = *1*115

    ?.) 1551512 1512(#015 ?15)

    666 result = F6H _________6H6)6HH6H6 Y6H6 ______ 6HHH Y6H6 ______ 666 Y6H6 ______ 6H re-ainder = 215

    *.) 11512 315=@

    66H6 = %6x7) L %6x7) L %Hx7) L %6x7)

    = L;LHL6

  • 7/24/2019 Lara Discretecompletion2

    61/66

    = 68

    68D^ =$15

    0.) ,onvert the following /inar nu&/ers to their deci&al euivalent. (a) 5.511 (/)

    5.111. +ivide a b /.a.) H.H66= %Hx7D6) L %6x7D7) L %6x78)

    = H L 6[; L 6[

    = H.73 L H.673 = H.8F3

    b.) H.666= %6 x 7D6) L %6 x 7D7) L %6 x 7D8)

    = 6 [7 L 6[ ; L 6[

    = H.3 L H.73 L H.673 = H.F3= H.3 L H.73 L H.673 = H.F3

    a [ b = H.8F3 [ H.F3 = 5.$2?015

    .) ,onvert the following octal nu&/ers to their deci&al euivalent. dd a / b c.

    %a) 83 %b) 6HH %c) H.7;

    #? = % x 6) L %3 x H)

    = 7; L 3

    = 7^

    155 = %6 x 7) L %H x 6) L %H x H)

    = ; L H L H

    = ;

    5.2$ = %7 x 6) L %; x D7)

    = 7[7 L ;[;

    = H.8673

    a L b L c = 7^ L ; L H.8673

    = 3#.#12?

    3.) ,onvert the following /inar nu&/ers to their deci&al euivalent. -u/tract a b/.

  • 7/24/2019 Lara Discretecompletion2

    62/66

    (a)15551112 (/) 11552

    15551112 = %6 x 6H) L %H x 6H3) L %H x 6H;) L %H x 6H8) L %6 x 6H7) L %6 x 6H6) L %6 x 6HH)

    = F6

    11552= %6 x 6H8) L %6 x 6H7) L %H x 6H6) L %H x 6HH)

    = 67

    15551112< 11552= F6 C 67 = ?315

    15.) D,1*J 1515112=@. nswer in deci&al.

    D,1* = 67 x 6 L 66 x 6 L 6H x 73

    = 7F;6H

    1515112 = 6 x 7H L 6 x 76 L H x 77 L 6 x 78 L H x 7; L 6 x 73

    = ;86H

    D,1*J 1515112= 7F;6HL ;86H

    = 203115

    11.) 151151511152 < 15552. 'xpress the answer in octal.

    3KL33KL3K3L33K + 3 LKKK

    7 v v 3 v ; v H

    73 C ;H = ##2

    11.) 12*J ?1* 15112. 'xpress the answer in deci&al.

    12* = %6 x 7) L %7 x 6) L % x H)

    =

    ?1*= %6H x 66) L %3 x 6H)

    =63

  • 7/24/2019 Lara Discretecompletion2

    63/66

    15112 =%6 m 6H8) L %H m 6H7) L %6 m 6H6) L %6 m 6HH)

    = 66

    12*J ?1* 15112 = L 63 D66 = 2$515

    12.) ?51 < 2$0 .'xpress in /inar.

    ?51 = 151555551

    2$0 = 15155111

    = 155115152

    1#.) 12#$15 ?*. 'xpress the answer in octal.

    12#$15 = 678;

    ?* = %3 x 6) L % x H)

    = ;

    678;6HC 3= 66F

    1 j 1 j 0 j

    5551 5551 5111 1555 2

    1$.) 112 1512

    6H6

    66______

    6H6

    6H6______

    11112

    1?.) D+1*1*< 1?*$. 'xpress the answer in deci&al.

    D+1*1*= %6H x 68) L %68 x 67) L %6 x 66) L % x 6H)

  • 7/24/2019 Lara Discretecompletion2

    64/66

    = ;;H

    1?*$ = %6 x 8) L %3 x 7) L % x 6) L %; x H)

    = ;

    D+1*1*< 1?*$ = ;;H C ; = $0??215

    1*.) ,onvert 1 x 2$ to /inar for& and then perfor& the /inar &ultiplication.

    1 = 6[7 = K H 7; = 7;[7 = 67K H

    ^[7 =; : 6 =67[7 =K H

    ;[7 =7 K H =[7 = 8K 6

    7[7 =H =8[7 = 6K 6

    115= 5515 2$15 = 1155

    HH66

    x66HH

    HHHHHHHH

    HH66

    5511______

    1551552

    10.) ,onvert the following /inar nu&/ers to their deci&al euivalent. (a) 5.511 (/)5.111. dd a b /.

    5.511= %H x 7D6) L %6 x 7D7) L %6 x 7D8)

    = H L 6[; L 6[

    = H.73 L H.673 = H.8F3

    5.111= %6 x 7D6) L %6 x 7D7) L %6 x 7D8)

  • 7/24/2019 Lara Discretecompletion2

    65/66

    = 6[7 L 6[; L 6[

    = H.3 L H.73 L H.673 = H.F3

    5.5112J 5.1112= H.8F3 L H.F3= 1.2?15

    1.) ','1*x 1512 .'xpress the answer in deci&al.

    ','1*= %6; x 67) L %67 x 66) L %6; x 6H)

    = 8F^H

    1512 = %6 x 77) L %H x 76) L %6 x 7H)

    = 3

    ','1* x 1512= 8F^H x 3 = 13?515

    13.)11552 112. 'xpress the answer in octal.

    6HH____

    66 v66HHH

    66___

    H H

    H H___

    H H

    H H___ H H

    1552= v6HHv

    = $

  • 7/24/2019 Lara Discretecompletion2

    66/66

    25. 15515515555112 J 115512. 'xpress the answer in octal.

    15515515555112= 6vHH6vHH6vHHHvH66

    = 666H8

    115512= 66vHH6

    = 86

    15515515555112 J 115512= 666H8 L86 = 111#$