교환 학생 프로그램 내년 1월 중순부터 6월 초 현재 학부 2,3 학년? Department of Information Technology, Uppsala University, Sweden (http://www.it.uu.se?lang=en) 마감이 11월 30일 민상렬 교수님 symin@snu.ac.kr 011-9120-7047, 또는 감지혜 조교 (880-7287,7288)
교환 학생 프로그램 정통부의 지원 본인 부담 비용: 약 500만원 120만원: 비행기표 6개월 전체 생활비 약 800만원 중 420만원은 정부 보조, 나머지 380만원 본인 부담, 등록금은 없음 서울대학교에서도 등록을 하지 않아도 되므로, 그리고 실제로 국내에 있어도 생활비와 용돈은 필요하므로 개인 부담은 전혀 없는 것과 마찬가지임
지원 자격 IT전공 학생으로서 직전 학기까지 평균성적이 80% 이상인 자: 서울대학교 GPA 2.8~2.9정도에 해당 TOEFL CBT 213점(PBT 550점), TOEIC 750점, TEPS 656점, G-TELP 92점(Level 3), 69점 (Level 2) 이상인 자 ※ 공인 어학성적은 신청마감일(11월 30일) 을 기준으로 최근 2년 이내의 성적을 인정
Module #18: Relations- part II Rosen 5th ed., ch. 7
§7.4: Closures of Relations For any property X, the “X closure” of a set A is defined as the “smallest” superset of A that has the given property. The reflexive closure of a relation R on A is obtained by adding (a,a) to R for each aA. I.e., it is R IA The symmetric closure of R is obtained by adding (b,a) to R for each (a,b) in R. I.e., it is R R−1 The transitive closure or connectivity relation of R is obtained by repeatedly adding (a,c) to R for each (a,b),(b,c) in R. I.e., it is
Paths in Digraphs/Binary Relations A path of length n from node a to b in the directed graph G (or the binary relation R) is a sequence (a,x1), (x1,x2), …, (xn−1,b) of n ordered pairs in EG (or R). An empty set of edges is considered a path of length 0 from a to a. If any path from a to b exists, then we say that a is connected to b. (“You can get there from here.”) A path of length n≥1 from a to a is called a circuit or a cycle. Note that there exists a path of length n from a to b in R if and only if (a,b)Rn.
Simple Transitive Closure Alg. A procedure to compute R* of n elements with 0-1 matrices. procedure transClosure(MR:rank-n 0-1 mat.) A := B := MR; for i := 2 to n begin A := A⊙MR; B := B A {join} end return B {Alg. takes Θ(n4) time} {note: A represents Ri}
Warshall’s Algorithm Uses only Θ(n3) operations! Procedure Warshall(MR : rank-n 0-1 matrix) W := MR for k := 1 to n for i := 1 to n for j := 1 to n wij := wij (wik wkj) return W {this represents R*} wij = 1 means there is a path from i to j going only through nodes ≤k
§7.5: Equivalence Relations An equivalence relation (e.r.) on a set A is simply any binary relation on A that is reflexive, symmetric, and transitive. E.g., = itself is an equivalence relation. For any function f:A→B, the relation “have the same f value”, or = {(a1,a2) | f(a1)=f(a2)} is an equivalence relation, e.g., let m=“mother of” then = “have the same mother” is an e.r.
Equivalence Relation Examples “Strings a and b are the same length.” “Integers a and b have the same absolute value.” “Real numbers a and b have the same fractional part (i.e., a − b Z).” “Integers a and b have the same residue modulo m.” (for a given m>1)
Equivalence Classes Let R be any equiv. rel. on a set A. The equivalence class of a, [a]R :≡ { b | aRb } (optional subscript R) It is the set of all elements of A that are “equivalent” to a according to the eq. rel. R. Each such b (including a itself) is called a representative of [a]R. Since f(a)=[a]R is a function of a, any equivalence relation R be defined using aRb :≡ “a and b have the same f value”, given that f. A set is divided into one or more classes
Equivalence Class Examples “Strings a and b are the same length.” [a] = the set of all strings of the same length as a. “Integers a and b have the same absolute value.” [a] = the set {a, −a} “Real numbers a and b have the same fractional part (i.e., a − b Z).” [a] = the set {…, a−2, a−1, a, a+1, a+2, …} “Integers a and b have the same residue modulo m.” (for a given m>1) [a] = the set {…, a−2m, a−m, a, a+m, a+2m, …}
Equivalent classes Let R be an equivalence relation on the set A, then the following statements are equivalent aRb [a] = [b] [a] [b]
Partitions A partition of a set A is the set of all the equivalence classes {A1, A2, … } for some e.r. on A. The Ai’s are all disjoint and their union = A. They “partition” the set into pieces. Within each piece, all members of the set are equivalent to each other.
§7.6: Partial Orderings (POSET) A relation R on a set S is called a partial ordering or partial order if it is reflexive, antisymmetric, and transitive. A set S together with a partial ordering R is called a partially ordered set, or poset, and is denoted by (S, R)
Example Let S = {1, 2, 3} and let R = {(1,1), (2,2), (3,3), (1, 2), (3,1), (3,2) } 1 2 3
In a poset, the notation a b denotes that This notation is used because the “less than or equal to” relation is a paradigm for a partial ordering. (Note that the symbol is used to denote the relation in any poset, not just the “less than or equals” relation.) The notation a b denotes that a b, but
Example Let S = {1, 2, 3} and let R = {(1,1), (2,2), (3,3), (1, 2), (3,1), (3,2)} 2 2 3 2 1 2 3
Comparable/Incomparable The elements a and b of a poset (S, ) are called comparable if either a b or b a. When a and b are elements of S such that neither a b nor b a, a and b are called incomparable.
Example Consider the power set of {a, b, c} and the subset relation. (P({a,b,c}), ) So, {a,c} and {a,b} are incomparable
Totally Ordered, Chains If is a poset and every two elements of S are comparable, S is called totally ordered or linearly ordered set, and is called a total order or a linear order. A totally ordered set is also called a chain. If (A,R) is a poset, we say that A is totally ordered if for all x,y in A either xRy or yRx. In this case R is called a total order. (S, )
Well-Ordered Set is a well-ordered set if it is a poset such that is a total ordering and such that every nonempty subset of S has a least element. (S, ) 1 1 2 2 3 3
Hasse Diagrams Given any partial order relation defined on a finite set, it is possible to draw the directed graph so that all of these properties are satisfied. This makes it possible to associate a somewhat simpler graph, called a Hasse diagram, with a partial order relation defined on a finite set.
Hasse Diagrams (continued) Start with a directed graph of the relation in which all arrows point upward. Then eliminate the loops at all the vertices, all arrows whose existence is implied by the transitive property, the direction indicators on the arrows.
a is located lower than b Example Let A = {1, 2, 3, 9, 18} and consider the “divides” relation on A: For all 18 If aRb, normally a is located lower than b 9 2 3 1
Example Eliminate the loops at all the vertices. Eliminate all arrows whose existence is implied by the transitive property. Eliminate the direction indicators on the arrows. 18 18 9 9 2 2 3 3 1 1
Maximal and Minimal Elements a is a maximal in the poset (S, ) if there is no such that a b. Similarly, an element of a poset is called minimal if it is not greater than any element of the poset. That is, a is minimal if there is no element such that b a. It is possible to have multiple minimals and maximals.
Greatest Element, Least Element a is the greatest element in the poset (S, ) if b a for all . Similarly, an element of a poset is called the least element if it is less than all other elements in the poset. That is, a is the least element if a b for all v e f u d w Hasse diagrams c y z a b x
Upper bound, Lower bound Sometimes it is possible to find an element that is greater than all the elements in a subset A of a poset (S, ). If u is an element of S such that a u for all elements , then u is called an upper bound of A. Likewise, there may be an element less than all the elements in A. If l is an element of S such that l a for all elements , then l is called a lower bound of A.
Least Upper Bound, Greatest Lower Bound The element x is called the least upper bound of the subset A if x is an upper bound that is less than every other upper bound of A. The element y is called the greatest lower bound of A if y is a lower bound of A and z y whenever z is a lower bound of A.
Find the glb and lub of {y,m,u}, if they exist v p The upper bounds are u,v. Since u v, u is the lub u w m n The lower bounds are x,y. Since x y, y is the glb y z x How about glb and lub of {m,n,w}?
Lattices A partially ordered set in which every pair of elements has both a least upper bound and a greatest lower bound is called a lattice.
Are they lattices? v v p v z u u u w w w m n m n n m y y z z x x x
schedule 11/25 graph-part I 11/30 no class due to SNU entrance exam 12/2 graph-part II, tree 12/7 final exam