Branch Name: Exam Type: Midterm Final Academic Year: Form: Semester: A B First Second Summer Course Name/No. :Discrete Mathematics/M131 Exam Date: / / Exam Time: 2.5 Section Number: Question Earned No. Points hrs. First Marker’s Signature Second Marker’s Signature Total Quality Assurance Responsible Signature I. MULTIPLE CHOICE PART (WORTH 21 POINTS). 1 Reviewer’s Signature You may try all questions. Each question is worth 3 points. Your grade in this part is that of the best 7 questions. In the template below write down the letter corresponding to the correct answer for each question. Q A 1 c 2 c 3 d 4 d 5 c 6 b 7 d 8 c 9 d ………………………………………………………………………………... Q–1 : The negation of the proposition “x is less than y and x is prime” is: (a) x is greater than y and x is prime. (b) x is not less than y or x is not prime. (c) x is not less than y and x is not prime. (d) x is not less than y or x is prime. (e) none Q–2 : The contrapositive of the proposition “if x is an integer then y is zero” is: (a) if x is not an integer then y is not zero. (b) if y is not zero then x is not an integer. (c) if y is not zero then x is an integer. (d) if y is zero then x is an integer. (e) none Q–3: The quotient q and remainder r when 165 is divided by 18 are: (a) q = 9 , r = 4 (b) q = 4 , r = 9 (c) q = 8 , r = 4 (d) q = 9 , r = 3 (e) none 𝑎 = 𝑑 ∗ 𝑞 + 𝑟 165 = 18 ∗ 9 + 3 Q–4 The binary notation for the number 49 in decimal notation is: (a) 100111 (b) 100101 (c) 100011 (d) 110001 (e) none 𝑎 = 𝑑 ∗ 𝑞 + 𝑟 49 = 2 ∗ 24 + 1 24 = 2 ∗ 12 + 0 12 = 2 ∗ 6 + 0 6 = 2 ∗ 3 + 0 3 = 2 ∗ 1 + 1 1 = 2 ∗ 0 + 1 من اليسار إلى اليمين من أسفل إلى أعلىr نكتب الصفر والواحد أو الـ 110001 2 Q-5: The relation R={(x,y): 2x 2 y 100} on the set of positive integers is : (a) transitive (b) reflexive (c) symmetric (d) partial order (e) none Q–6: Let R = {(a,a),(a,b) ,(a,c),(b,a) , (b,b) ,(b,c),(c,a),(c,c)} be a relation the set {a,b,c}.The reflexive closure of R is : (a) {(a,a),(a,b) ,(a,c),(b,a), b,c),(c,a),(c,c)} (b) R (c) {(a,a) ,(b,b) ,(c,c)} (d) {(a,a),(a,b) ,(a,c),(b,a) , (b,b) ,(b,c),(c,a)} (e) none Q–7: The number of edges of the complete bipartite graph K 2,7 is : (a)9 (b) 7 (c) 2 (d) 14 (e) none 7 * 2 ) نضربedges( إذا طلب عدد األضالع 7 + 2 ) نجمعvertices( وإذا طلب عدد الرؤوس Q–8: If the degrees of the vertices of a graph G are : 4 , 7 , 3, 6 ,2 , then the number of edges of G is : (a) 14 (b) 22 (c) 11 (d) 21 (e) none من الكتاب599 القاعدة صفحة 2𝑒 = ∑ deg(𝑣) 𝑣∈𝑉 :بالعربي الطرف األيمن معناه مجموع الدرجات )e( ضرب عدد األضالع2 الطرف األيسر معناه : القاعدة ككل هي * عدد األضالع2 = مجموع الدرجات e * 2 = 4+7+3+6+2 e * 2 = 22 e = 11 Q–9: The relation R on the set of integers defined by aRb a b is divisible by 4 is: (a) Reflexive and antisymmetric (b) antisymmetric and transitive (c) partial order (d) equivalence relation (e) none . *It is Reflexive because (1,1)→1-1 = 0 is divisible by 4 *It is antisymmetric because (8,2) )→8-2 = 4 is divisible by 4 We say the relation antisymmetric when a= b such as (1,1) or any only pair that it is not existed its converse such as (8,2) ,if we have (8,2)(2,8) here the relation it is not antisymmetric *It is not transitive because (4,1)(1,1)→(4.1) → 4-1= 3 it is not divisible by 4 3 II. ESSAY QUESTIONS PART(WORTH 80 POINTS). >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> You may try all questions. Each question is worth 20 points. Your grade in this part is that of the best 4 questions (there is one extra bonus point) . Please show the details of your work and not just the final answer .Write down your answers neatly in the Answer Book provided .The question paper with the Multiple Choice Questions answers templates should be attached to the answer book. >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Q–1. (a) (a) Determine the truth value of (p q) ( p q) when : 𝑝 𝑞 ¬𝑝 ¬𝑞 (¬𝑝 ∨ 𝑞) (𝑝 ∧ ¬𝑞) (¬𝑝 ∨ 𝑞) → (𝑝 ∧ ¬𝑞) T T F F T F F T F F T F T T F T T F T F F F F T T T F F (i) (4 points) p is true and q is false . From the table above, the answer is T (ii) (4 points) p is false and q is true. From the table above, the answer is F (b) (3 points each) Write the converse and contrapositive of the statement “ if x B then x 4 ” let 𝑝 = "𝑖𝑓 𝑥 ∉ 𝐵 " , and 𝑞 = "𝑥 ≠ 4" then ¬𝑝 = "𝑖𝑓 𝑥 ∈ 𝐵" , and ¬𝑞 = "𝑥 = 4" the statement "if x ∉ B then x ≠4" = (𝑝 → 𝑞) converse = (𝒒 → 𝒑) = "𝒊𝒇 𝒙 ≠ 𝟒 𝒕𝒉𝒆𝒏 𝒙 ∉ 𝑩" contrapositive = (¬𝒒 → ¬𝒑) = "𝒊𝒇 𝒙 = 𝟒 𝒕𝒉𝒆𝒏 𝒙 ∈ 𝑩" (c) Suppose that P(x) is the statement “ x2 6 5x ” where the domain is the set of positive numbers. Determine the truth values of : (i) (3 points) xP( x) ∀𝑥 ¬𝑃(𝑥) = ∀𝑥 ¬(𝑥 2 + 6 = 5𝑥) = ∀𝑥 (𝑥 2 + 6 ≠ 5𝑥) 𝑥( يصبح2 + 6 ≠ 5𝑥) هل إذا عوضنا بأي عدد موجب في العبارة:سؤال الطرف األيسر ≠ الطرف األيمن False إذا الجواب ال فالجواب النهائي، True إذا الجواب نعم فالجواب النهائي بحيث يكون الطرف األيسر = الطرف األيمن في هذه المعادلةx نبحث عن عدد (𝑥 2 + 6 = 5𝑥) ) بالصدفة3 أو2 (إال إذا عوضت بـ:أسهل طريقة هو بحل المعادلة أعاله كالتالي 𝑥 2 + 6 = 5𝑥 4 𝑥 2 − 5𝑥 + 6 = 0 نبحث عن عددين ضربهم 6ومجموعهم ، 5نجد 2و 3 (𝑥 − 2)(𝑥 − 3) = 0 𝑥 = 2 𝑜𝑟 𝑥 = 3 نعوض بواحد منهم في )𝑥 ، ∀𝑥 (𝑥 2 + 6 ≠ 5مثالً نعوض بـ :2 22 + 6 ≠ 5 ∗ 2 10 ≠ 10خطأ طبعا ً إذن فالجواب النهائي هو False (ii) (3 points) xP( x) . )𝑥∃𝑥 𝑃(𝑥) = ∃𝑥 (𝑥 2 + 6 = 5 سؤال :هل يوجد عدد واحد موجب على األقل يحقق العبارة )𝑥 (𝑥 2 + 6 = 5؟ إذا الجواب نعم فالجواب النهائي ، Trueإذا الجواب ال فالجواب النهائي False طبعا ً نحن نعرف أن 3و 2يحققان العبارة ،خلونا نجرب 3 )(32 + 6 = 5 ∗ 3 15 = 15أكيد صح إذن الجواب النهائي هو True )Q–2: (a) (i)(4 points) Decide whether 332 23 (mod 9 )𝑚 𝑑𝑜𝑚( 𝑏 ≡ 𝑎 )𝑏 𝑚|(𝑎 − )9|(332 − 23 9 ∤ 309 )∴ 332 ≢ 23 (𝑚𝑜𝑑 9 (ii) (6 points) Write the prime factorization of 92928 and 123552 and hence find their gcd and lcm. 92928 = 28 ∗ 3 ∗ 112 123552 = 25 ∗ 33 ∗ 11 ∗ 13 𝑔𝑐𝑑(92928,123552) = 25 ∗ 3 ∗ 11 = 1056نأخذ األس األصغر 𝑙𝑐𝑚(92928,123552) = 28 ∗ 33 ∗ 112 ∗ 13 = 10872576نأخذ األس األكبر (iii) (3 points) Find the decimal notation for the number given in binary notation by 110101011 . العدد الثنائي 1 1 0 1 0 1 0 1 1 7 8 أسس العدد 2 2 26 25 24 23 22 21 20 2 ناتج األسس 256 128 64 32 16 8 4 2 1 ضرب الصف األول في الصف الثالث 256 128 0 32 0 8 0 2 1 مجموع الصف الرابع ويساوي العدد العشري (427)10 5 1 1 0 1 0 1 (b) Let A 0 0 0 and B 0 1 1 1 1 0 1 1 0 Find (i) (2 points) the join , 1 1 0 1 0 1 1 1 1 [ 0 0 0] ∨ [ 0 1 1 ] = [ 0 1 1] 1 1 0 1 1 0 1 1 0 (ii) ( 2 points) the meet and 1 1 0 1 0 1 1 0 0 [ 0 0 0] ∧ [ 0 1 1 ] = [ 0 0 0] 1 1 0 1 1 0 1 1 0 (iii) ( 3 points ) the Boolean product AoB of these two zero-one matrices. 1 1 0 1 0 1 1 1 1 [ 0 0 0] ⨀ [ 0 1 1 ] = [ 0 0 0] 1 1 0 1 1 0 1 1 1 Q–3. (4 points) Which ordered pairs are in the relation {( x, y) 2 x 2 y 2} on the set {1 ,2 ,3, 4}? : عن طريق الضرب الديكارتي وهي، أول شيء راح اكتب كل األزواج المحتملة {(1,1),(1,2),(1,3),(1,4),(2,1),(2,2),(2,3),(2,4),(3,1),(3,2),(3,3),(3,4),(4,1),(4,2),(4,3),(4,4)} {(𝑥, 𝑦)|2𝑥 > 2𝑦 = 2} في العالقةy والـx ثم أجرب كل زوج من األزواج مكان الـ (1,1) مثالً الزوج {(1,1)|(2 ∗ 1) > (2 ∗ 1) + 2} {(1,1)| 2 > 4 } ؟ طبعا ً ال2 > 4 هل فما نكتبه، ( ليس ضمن العالقة1,1) إذن الزوج :إذن األزواج التي ضمن العالقة هي {(3,1), (4,1), (4,2)} (b) Consider the relations R and S below on the set {1 ,2 ,3}: R = {(1,1) , (1,3) , (2,1) , (2,2) , (3,2)} S = { (1,1) ,(1,2) , (2,1) , (3,1) ,(3,2),(3,3)}. (i) (4 points) Which of these relations is reflexive ? Justify your answer. ) El112 >> (متأثر من اختبارNeither R nor S is reflexive Justify التعليل أو R is not reflexive, because {(𝑥, 𝑥) ∉ 𝑅} ∀𝑥 ∈ {1,2,3} :أو باإلمكان أن يُقال R is not reflexive, because (3, 3) ∉ R S is not reflexive, because {(𝑥, 𝑥) ∉ 𝑆} ∀𝑥 ∈ {1,2,3} أو 6 S is not reflexive, because (2,2) ∉ S (ii) (4 points) Which of these relations is transitive ? Justify your answer. R is not transitive, because {(1,2),(2,3),(3,1),(3,3)} ∉ R أعتقد يكفي ذكر واحدة فقط وهللا أعلم S is not transitive, because (2,2) ∉ S (c) (8 points) Find the reflexive and symmetric closures of each of the relations R and S above. The reflexive closure of R {(1,1) , (1,3) , (2,1) , (2,2) , (3,2),(3,3)} The symmetric closure of R {(1,1) , (1,3) ,(3,1), (2,1) ,(1,2), (2,2) , (3,2),(2,3)} The reflexive closure of S {(1,1) ,(1,2) , (2,1) ,(2,2), (3,1) ,(3,2),(3,3)} The symmetric closure of S {(1,1) ,(1,2) , (2,1) , (3,1) ,(1,3),(3,2),(2,3),(3,3)} e1 v1 1 v2 0 Q–4(a)Let A=v 3 1 v4 0 e2 e3 e4 e5 0 0 0 0 1 1 1 1 be the incidence matrix of a graph G. 0 0 0 1 1 0 0 0 (i)(5 points) Draw the graph G. ) معناها مصفوفة ساقطة (ال يروح بالكم بعيدincidence matrix v3 وv1 نجده ساقط على الرأسينe1 مثالً عندكم الضلع self-loop فنمثله بعروة أو، v2 ساقط على رأس واحد هوe4 ومثالً الضلع e4 e3 v2 v1 e5 e1 v3 e2 v4 (ii)(5 points) Find the adjacency matrix of G. v1 v2 v3 v4 v1 v2 v3 v4 0 [0 1 0 0 𝟐 1 1 0 1] 0 0 1 1 0 0 :ً) أنها دائماthe adjacency matrix of a simple graph( من مميزات مصفوفة التجاور للرسم البسيط:للفائدة 7 مربعة (الصفوف = األعمدة) ،القطر كله أصفار ،متناظرة ال ينطبق هذا الكالم على المصفوفة أعاله ألن الرسم غير بسيط. (الرسم البسيط يعتبر ( )undirectedوال يحتوي على loopأو )multiple edges (b) (i)(5 points) Write the adjacency matrix of the graph G in the figure below following the order {a,b,c,d,f} for the vertices.. f d c b 1 0 0 0 ]0 0 1 0 0 0 1 1 0 0 0 0 0 1 1 0 a a 0 b 0 G= c 1 d 0 f [1 (ii) (5 points) Use the adjacency matrix to find the number of paths between c and a of length f d c b 2 1 0 0 ]0 0 2 0 0 0 3 3 0 0 0 0 0 3 2 1 f a a 0 0 b 0 0 1 G3 = c 3 d 1 0 ] f [2 1 d c b 0 0 1 1 0 0 0 2 1 1 1 2 0 0 0 a a 2 b 1 2 =c G 0 d 0 f [0 f d c b 1 0 0 0 ]0 0 1 0 0 0 1 1 0 0 0 0 0 1 1 0 a a 0 b 0 G= c 1 d 0 f [1 3. The number of paths of length 3 from 𝑐 to 𝑎 is the (3,1)th entry of G3 𝑎 Hence, there are exactly 3 paths of length 3 from 𝑐 to From the graph G above, we see: 𝑎 𝑐, 𝑎, 𝑓, 𝑎 ; 𝑐, 𝑎, 𝑐, 𝑎 ; 𝑎𝑛𝑑 𝑐, 𝑏, 𝑐, 3 معنى العبارة ( ) (3,1)th entry of G3هو رقم 3في المصفوفة G الشرح: في السؤال طلب استخدام مصفوفة التجاور (نحن حليناها في السؤال السابق) لحساب عدد الـ ( pathsالطرق) من cإلى a بحيث الـ lengthأو الطول هو 3 بمعنى آخر :بكم طريقة يمكننا أن نسافر من النقطة ( cنقطة البداية) إلى النقطة ( aنقطة النهاية) في الرسم أعاله بحيث نسير على 3أضالع فقط ؟ المصفوفات أعاله نحسبها بطريقة ضرب المصفوفات (راجع الكتاب مثال 3صفحة )248 G2 = G * G G3 = G * G2 8 Q– 5 :(a)(8 points) Let R be a relation from {x,y,z} to {x,y,,z,w} and S a relation from {x,y,z,w} to {x,y,z} with R ={(x,x),(x,w),(y,z),(z,x),(z,w)} and S={(x,x),(y,x),(z,y),(z,z),(w,y)}. Compute the composite relations: (i) SoR S = {(x,x),(y,x),(z,y),(z,z),(w,y)} R = {(x,x),(x,w),(y,z),(z,x),(z,w)} SoR = {(x,x),(x,w),(y,x),(y,w),(z,z),(z,x),(z,w),(w,z)} مثل ما أنتم مالحظين في الزوج األخير كمثال ليه ؟R منz وS منw أخذنا R والثاني منS لذا نأخذ العنصر األول من، R ثمcomposite ثمS ألن السؤال ابتدأ بـ:أو ًلا مع العنصر األول من أي زوج مرتب في العالقةS لتساوي العنصر الثاني من أي زوج مرتب في العالقة:)ثانيااً(وهوًشرط R . في مثالنا هذاy وهو and (ii) RoS. R = {(x,x),(x,w),(y,z),(z,x),(z,w)} S = {(x,x),(y,x),(z,y),(z,z),(w,y)} RoS = {(x,x),(x,y),(y,y),(y,z),(z,x),(z,y)} (b) (6 points) Let R={(x,x),(y,x),(z,y),(w,z)} be a relation on {x,y,z,w}. (i) Compute R 2 and R 3 . R2 = RoR R3 = R2oR لكن راح نحلها بطريقة المصفوفة والضرب المنطقي، هي مثل السؤال السابق ) لكن ما راح اكتبها (مشـــــــــــوار صراحةx,y,z,w المصفوفة صفوفها وأعمدتها هي 1 R2 = RoR = 𝑅 ⊙ 𝑅 = [1 0 0 R2 = {(x,x),(y,x),(z,x),(w,y)} 1 R3 = R2oR = 𝑅2 ⊙ 𝑅 = [1 1 0 0 0 1 0 0 0 0 1 0 0 0 1 0 0 0 0 0 1 0] ⊙ [ 1 0 0 0 0 0 1 0] ⊙ [1 0 0 0 0 (ii) Decide whether R 4 R3 . 9 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0 1 0 1 0] = [ 1 0 1 0 0 0 1 0] = [ 1 0 1 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0] 0 0 0 0] 0 0 0 ]0 0 0 0 0 0 0 0 0 0 0 0 1 0] = [ 1 0 1 0 1 0 0 0 0 0 0 0 1 0 1 0] ⊙ [1 0 1 0 0 0 0 0 0 0 0 0 1 0 ]0 0 0 0 0 0 0 0 0 0 0 1 R3 = [1 1 1 1 R4 = R2o R2 = 𝑅2 ⊙ 𝑅2 = [1 1 0 ∴ 𝑅4 = 𝑅3 . (c) (6 points) Let R1 ={(a,a),(a,b),(b,a),(b,b),(c,a),(c,d),(d,a),(d,b)(d,d)} and })R2 ={(a,a),(a,c),(a,d),(b,a),(b,b),(b,c),(c,a),(c,c),(c,d),(d,a Compute (i) R1 R2 (ii) R1 R2 and (iii) R1 R2 . 𝑅1 ∪ 𝑅2 })𝑐 = {(𝑎, 𝑎), (𝑎, 𝑏), (𝑏, 𝑎), (𝑏, 𝑏), (𝑐, 𝑎), (𝑐, 𝑑), (𝑑, 𝑎), (𝑑, 𝑏)(𝑑, 𝑑), (𝑎, 𝑐), (𝑎, 𝑑), (𝑏, 𝑐), (𝑐, })𝑎 𝑅1 ∩ 𝑅2 = {(𝑎, 𝑎), (𝑏, 𝑎), (𝑏, 𝑏), (𝑐, 𝑎), (𝑐, 𝑑), (𝑑, })𝑑 𝑅1 − 𝑅2= {(𝑎, 𝑏), (𝑑, 𝑏), (𝑑, مت حبمد هللا وتوفيقه إن أصبت فمن هللا وإن أخطأت فمن نفسي والشيطان أرجو من اإلخوة واألخوات املراجعة والتصحيح وفق هللا اجلميع ملا حيبه ويرضاه أخوكم اسم مستعار 10
© Copyright 2025 Paperzz