announcements ics 6b
play

Announcements ICS 6B Dont forget Regrades for Quizzes 1 & 2, - PDF document

Announcements ICS 6B Dont forget Regrades for Quizzes 1 & 2, and Homeworks 13 are due today Boolean Algebra & Logic Lecture Notes for Summer Quarter, 2008 Michele Rousseau Set 6 Ch. 8.4 2 Lecture Set 6 - Chpts 8.3


  1. Announcements ICS 6B � Don’t forget Regrades for Quizzes 1 & 2, and Homeworks 1‐3 are due today Boolean Algebra & Logic Lecture Notes for Summer Quarter, 2008 Michele Rousseau Set 6 – Ch. 8.4 2 Lecture Set 6 - Chpts 8.3 Where you stand Quizzes � Homeworks � Quiz #1 12 – 90‐100 ● Max: 97% ● Min: 28% 4 ‐ 80‐89 ● Avg: 70% 2 ‐ less than 5 � Quiz #2 ● Max: 97% ● Min: 46% ● Avg: 77% Lecture Set 6 - Chpts 8.3 3 Lecture Set 6 - Chpts 8.3 4 Some perspective Overall You can drop your lowest Quiz Score 3 – 90‐100 3 – 80‐89 I suffer from test anxiety – what can I do? 3 – 70‐79 http://www.studygs.net/tstprp8.htm 4 – 60‐69 http :// ub‐counseling.buffalo.edu/stresstestanxiety.shtml // 1 – 50‐59 http://www.sdc.uwo.ca/learning/mcanx.html 4 – less than 50 http://www.kidshealth.org/teen/school_jobs/school/ test_anxiety.html Lecture Set 6 - Chpts 8.3 5 Lecture Set 6 - Chpts 8.3 6 1

  2. How do I improve my performance on Today’s Lecture Quizzes – and the final? � Chapter 8 �8.3, 8.4� � If you have to miss lecture – ● Representing Relations �8.3� ● get notes from your friends ● Closures of Relations �8.4� � Review lecture slides �take notes� � Do the reading � Form a study group y g p � Ask questions ● In class ● Email ● Office hours � What if I aced them? � WTG! 7 8 Lecture Set 6 - Chpts 8.3 Lecture Set 6 - Chpts 8.3 Property Definition Matrix Def In other words Properties on Relations Reflexive �i�1…n �i�1…n All the diagonal entries of M R =1 (a i , a i ) � R m ii =1 Irreflexive �i�1…n �i�1…n All the diagonal entries of M R =0 � (a i , a i ) � R Chapter 8: Section 8.3 m ii =0 �i,j�1…n, i�j �i,j�1…n, i�j Symmetric m ij ,= m ji is either (0,0) or (1,1) (a i , a j ) � R & � a j , m ij ,= 1 & m ji ,= 1 M R is symmetric wrt diagonal a i ) � R m ij ,= m ji Antisymmetric �i,j�1…n, i�j �i,j�1…n, i�j {m ij ,,m ji } ≠ {1,1} (a i , a j ) � R & � a j , R & � ( ) m ij ,= 1 & m ji ,= 0 1 & 0 a i ) � R m ij ≠ m ji If i=j then {1,1} or {0,0} Representing Relations Asymmetric R both irreflexive �I,j�1…n All the diagonal entries of M R =0 & m ii =0 AND i�j Antisymmetric m ij ,,m ji } ≠ {1,1} m ij ≠ m ji If i=j then {1,1} or {0,0} Transitivity �i,j,k�1…n Well discuss this If (a i , a j ) � R & later (a j , a k ) � R then (a i , a k ) � R Lecture Set 6 - Chpts 8.3 10 Transitivity revisited Transitive Property Example Consider the relations on �1,2,3,4� Consider the relations on �1,2,3,4� Which are Transitive? � R 5 ���1,1�,�1,2�,�1,3�,�2,1�,�2,2�,�2,3�,�3,3�,�4,4�� R 1 ���1,1�,�1,2�,�2,1�,�2,2�,�3,4�,�4,1�,�4,4�� R 2 ���1,1�,�1,2�,�2,1�� x�y y y�z y x�z 1 2 R 3 ���1,1�,�1,2�,�1,4�,�2,1�,�2,2�,�3,3�,�4,1�,�4,4�� R ��1 1� �1 2� �1 4� �2 1� �2 2� �3 3� �4 1� �4 4�� �2, 1� �1, 3� �2, 3� R 4 ���2,1�,�3,1�,�3,2�,�4,1�,�4,2�,�4,3�� �1, 2� �2, 3� �1, 3� R 5 ���1,1�,�1,2�,�1,3�,�2,1�,�2,2�,�2,3�,�3,3�,�4,4�� 3 4 4, 5,6 R 6 ���3,4�� 4- shown in slide set #5 5 - shown in previous slide 6 - because (a, b) � (b,c) is false so (a, b) � (b,c) � �c,d� is true Lecture Set 6 - Chpts 8.3 11 Lecture Set 6 - Chpts 8.3 12 2

  3. Using Matrices to represent Relations Matrices Examples R2���1,1�,�1,2�,�2,1�� Express the relation R 1 as a matrix Express the relation R 1 as a matrix R3���1,1�,�1,2�,�1,4�,�2,1�,�2,2�,�3,3�,�4,1�,�4,4�� A��1.2.3.4�. B��1,2,3,4� A��1.2.3.4�. B��1,2,3,4� R4���2,1�,�3,1�,�3,2�,�4,1�,�4,2�,�4,3�� R1���1,1�,�1,2�,�2,1�,�2,2�,�3,4�,�4,1�,�4,4�� R1���1,1�,�1,2�,�2,1�,�2,2�,�3,4�,�4,1�,�4,4�� R5���1,1�,�1,2�,�1,3�,�2,1�,�2,2�,�2,3�,�3,3�,�4,4�� Think of the �a, b� pairs and remember that A�Rows Think of the �a, b� pairs and remember that A�Rows and B� Cols and B� Cols B B 0 [ ] M M R3 M M R4 M M R5 [ ] No [ ] No [ ] M R2 M [ ] 1 2 3 4 1 1 0 1 0 0 0 0 1 1 1 0 1 �1,1� �1, 2� �1,3� �1,4� �1,1� �1, 2� �1,3� �1,4� 1 1 0 0 1 1 0 0 1 1 0 0 1 0 0 0 1 1 1 0 1 0 0 0 2 �2,1� �2, 2� �2,3� �2,4� �2,1� �2, 2� �2,3� �2,4� A 1 1 0 0 M R1 � 0 0 1 0 1 1 0 0 0 0 1 0 0 0 0 0 3 �3,1� �3, 2� �3,3� �3,4� �3,1� �3, 2� �3,3� �3,4� 0 0 0 1 1 0 0 1 1 1 1 0 0 0 1 0 0 0 0 1 0 0 1 4 �4,1� �4, 2� �4,3� �4,4� �4,1� �4, 2� �4,3� �4,4� Reflexive? No Yes No Yes Is R1 Reflexive? No Symmetric? Yes Yes No No Put a 1 in each of the Is R1 Symmetric? No Antisymmetric? No No Yes No Corresponding locations No Irreflexive? Yes No Is R1 Antisymmetric? 13 14 Lecture Set 6 - Chpts 8.3 Lecture Set 6 - Chpts 8.3 Operations on Matrices/Relations Join & Meet – bit operations Let R & S be relations on a set A with or � These are a “join” b � a � b 1 if a�1 � b�1 corresponding matrices M r & M s defined in 0 otherwise more detail and � in section How do we find ? 1 if a�1 � b�1 a “meet” b � a � b 3.8 0 otherwise M r�s � M r � M s & M � M � M & In other words.. M r �s � M r � M s a � b � 0 if a�b�0, otherwise it is 1 a � b � 1 if a�b�1, otherwise it is 0 It helps if we first introduce a few operations on bits then apply it to Now we can extend this to matrices matrices…. (term by term) Lecture Set 6 - Chpts 8.3 15 Lecture Set 6 - Chpts 8.3 16 Join and Meet - Matrices Boolean Product For any two binary �n x n� matrices A & B Let A and B be nxn, 0-1 matrices. The boolean product is a nxn, 0-1 matrix We define A � B and A�B to be the n x n binary whose ij element is matrices whose ij element is given by: (a i1 � b 1j ) � (a i2 � b 2j ) � … � (a in � b nj ) �A join B� ij � A ij � B ij & �A meet B� ij � A ij � B ij , respectively �A meet B� � A � B respectively Notation: A� B A B A � B A � B 1 0 [ ] In other words: [ ] 0 0 [ ] [ ] 1 1 1 0 1 � 1 1 � 0 1 1 � � � 0 � 1 0 � 0 1 0 ● �A� B� ij �1 iff at least 1 of the terms A B A � B A � B a ik � b kj �1 [ ] 0 0 [ ] 1 0 [ ] [ ] 1 1 1 0 1 � 1 1 � 0 1 0 or �k�a ik �b kj �1� � � � 0 � 1 0 � 0 0 0 Lecture Set 6 - Chpts 8.3 17 Lecture Set 6 - Chpts 8.3 18 3

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend