CS 173 Lecture 18: Relations on a Set
|
|
- Jasmin Lynch
- 5 years ago
- Views:
Transcription
1 CS 173 Lecture 18: Relations on a Set José Meseguer University of Illinois at Urbana-Champaign 1 Relations on a Set 1.1 The Data Type RelpAq Many algorithms, in particular the so-called graph algorithms, manipulate data structures that are binary relations on a set A. Therefore the question: What is the data type of binary relations on a set A? is not an idle question at all, since it is at the heart of many important problems and algorithms in Computer Science. Have we seen this before? Indeed, we have. This data type is just the data type of typed relations RelpA, Aq. Recall that for any sets A and B, the set Rel pa, Bq of typed relations from A to B was defined as the set of triples pa, R, Bq such that R P PpA ˆ Bq. Therefore, the data type RelpA, Aq of binary relations on A is just the set of triples pa, R, Aq such that R P PpA 2 q. Abbreviations. Since A B, the second A in the triple pa, R, Aq is redundant, so we can abbreviate a relation R on A to just a pair pa, Rq without any loss of information. Likewise, we can abbreviate RelpA, Aq to just RelpAq. In this abbreviated form, the data type RelpAq has a very simple description. It is just the product type: RelpAq def tau ˆ PpA 2 q whose elements are the pairs pa, Rq with R P PpA 2 q. This means that, up to a small, bijective change of data representation, the data type RelpAq is equivalent to the powerset data type PpA 2 q. Indeed, the second projection function p 2 : PpA 2 q Ñ PpA 2 q such that p 2 pa, Rq R has an obvious inverse function mapping each R P PpA 2 q to the pair pa, Rq P RelpAq. This also mens that RelpAq is a Bolean Algebra, since we can define union, intersection and complement operations as follows: pa, Rq Y pa, Gq def pa, R Y Gq pa, Rq X pa, Gq def pa, R X Gq pa, Rq def pa, Rq.
2 2 J. Meseguer 1.2 Logical and Graphical Perspectives on Rel paq There are two mutually reinforcing perspectives from which we can look at a binary relation pa, Rq P RelpAq: 1. Logically, we look at pa, Rq as a binary predicate on A. 2. Graphically, we look at pa, Rq as a directed graph on A. By a binary predicate on A we usually mean a function p : A 2 Ñ tt, Fu. However, since the data types ra 2 ÑtT, F us and PpA 2 q are equivalent thanks to the bijective change of representation pred2set : ra 2 ÑtT, Fus Ñ PpA 2 q where pred2setppq tpx, yq P A 2 ppx, yq Tu, in First-Order Logic the set of pairs tpx, yq P A 2 ppx, yq Tu is also called a binary predicate on A. These are just two equivalent representations (what we have called the flashlight and the subset representations) for the same concept. Example. The greater than predicate ą: N 2 Ñ tt, Fu on the natural numbers has the equivalent representation as the binary relation pn, ąq, where ą def tpx, yq P N 2 x ą y Tu The slides for this lecture give several examples of how the logical and graphical perspectives can reinforce each other, including the graphical views for the following logical relations: the greater than relation pn, ąq. the relation pn, sq, where s is the successor function the relation pn, pq, where p is the predecessor function. 1.3 Children and Degree When we view pa, Gq P RelpAq as a graph, we call each a P A a node in the graph, and each pa, bq P G a directed edge of the graph pa, Gq. Also, for each node a P A we call the set Gras the set of children nodes of node a, and call the cardinality Gras the degree of node a, denoted deg G paq. Exercise 1. Prove that pa, fq P RelpAq is a function if and only if for all a P A deg f paq Inverse Relation/Inverse Graph Since for any pa, Rq P RelpAq we also have pa, R 1 q P RelpAq, we call pa, R 1 q the inverse relation (resp. the inverse graph) of pa, Rq. Graphically, pa, R 1 q has a very intuitive description: we just reverse the direction of all the edges in pa, Rq.
3 2 Paths in a Graph and Transitive Relations 2.1 Paths in a Graph Relations on a Set 3 Intutively, a path (also called a walk) in a graph is a sequence of the form a 1 Ñ a 2 Ñ a 3... a n 1 Ñ a n where for each i, 1 ď i ă n we have a i`1 P Gra i s. That is, each node a i`1 is a child of the previous node a i. More precisely given a relation pa, Rq P RelpAq, we can define the set PathpA, Rq as the following set of strings: PathpA, Rq def ta 1... a n P A n ě 2^@i P N pp0 ă i^i ă nq ñ a i`1 P Rra i squ Notation. When we adopt a logical perspective, a path a 1... a n P PathpA, Rq is depicted as follows: a 1 R a 2... a n 1 R a n For example, for the ą relation on natural numbers 10 ą 7 ą 5 ą 3 ą 2 ą 1 ą 0 is a path. Instead, when we adopt a graphical perspective, as already mentioned, a path a 1... a n P PathpA, Rq is depicted as follows: a 1 Ñ a 2 Ñ a 3... a n 1 Ñ a n. Note that, since paths are special strings of lenght ě 2, any path in PathpA, Rq has the form a w b for some (possibly empty) string w P A. Whe then call a the source and b the target of the path a w b P PathpA, Rq. Note also that if a w b and b w 1 c are paths in PathpA, Rq, then a w b w 1 c is also a path in PathpA, Rq, called the composition of a w b and b w 1 c. Notation. Given a binary relation pa, Rq and elements a, b P A, the set of all paths from a to be b is, by definition, the set: PathpA, Rqpa, bq def ta w b P A a w b P PathpA, Rqu The slides for this lecture give a simple example of a set of paths PathpA, Gqpa, bq that happens to be infinite, even though the graph pa, Gq is finite. 2.2 Closed Paths, Cycles, and Loops Given a relation pa, Rq P RelpAq: A closed path is a path of the form a w a P PathpA, Rq for some a P A. A cycle is a closed path of the form a a 1... a n a P PathpA, Rq with n ě 1 such that ta, a 1,..., a n u n ` 1. That is, the only repeated element in the string a a 1... a n a is a itself. A loop is a closed path of the form a a P PathpA, Rq for some a P A. The slides give several examples of closed paths, cycles, and loops in a graph.
4 4 J. Meseguer 2.3 Transitive Relations A relation pa, Rq P RelpAq is called transitive if and only if for each a, b, c P A arb ^ brc ñ arc where, using a logical notation, we write xry if and only if px, yq P R. A key question about transitive relations is the following: How are the transitivity of a relation pa, Rq P RelpAq and the set of paths PathpA, Rq related to each other? Transitive Closure. Given a relation pa, Rq P Rel paq, its transitive closure, denoted pa, R`q P RelpAq, is the relation defined by the following equivalence for all a, b P A: pa, bq P R` ô def Dw P A pa w b P PathpA, Rqq That is, pa, bq P R` if and only if there is a path in PathpA, Rq of the form: a R a 1 R a 2... a n 1 R b where the string a 1... a n 1 could be the empty string ɛ. Theorem 1. Given any relation pa, Rq P RelpAq the following two properties hold:. 1. pa, R`q, is a transitive relation. 2. pa, Rq, is transitive if and only if pa, Rq pa, R`q. Proof: Let us first prove (1). Let a, b, c P A be such that ar`b and br`c. By definition this means that we have paths a w b and b w 1 c in PathpA, Rq. But then a w b w 1 c is also a path in PathpA, Rq, and this means that ar`c, making R` transitive, as desired. To prove (2), first note that, by definition of pa, R`q, we always have pa, Rq Ď pa, R`q. We just need to show that if pa, Rq, is transitive, then we also have pa, R`q Ď pa, Rq, that is, that for each x, y P A, if x w y P PathpA, Rq then px, yq P R. This can be proved by induction of the lenght w of the string w in x w y P PathpA, Rq. Base Case w 0. Then w ɛ and by the definition of PathpA, Rq this means that if x y P PathpA, Rq then we must have px, yq P R, as desided. Induction Step. Suppose that for all x, y P A if x w y P PathpA, Rq and w ď n then px, yq P R. Now consider for any x, y P A any path x w 1 y P PathpA, Rq with w 1 n ` 1. Then w 1 must be of the form w z for some w with w n. But then x w z P PathpA, Rq and pz, yq P R. But by the induction hypothesis we have xrz, and since we also have zry and R is transitive, we also have xry, as desired. This finishes the proof of the Theorem.
5 Relations on a Set 5 3 Reflexive and Irreflexive Relations, DAGs, Trees, and Forests Reflexive and Irreflexive Relations. A relation pa, Rq P Rel paq is called: 1. Reflexive P A ppa, aq P Rq 2. Not Reflexive iff Da P A ppa, aq R Rq 3. Irreflexive P A ppa, aq R Rq. Exercise 2. Prove that pa, Rq P RelpAq is reflexive (resp. irreflexive) if and only if R R Y id A (resp. R R id A ). Reflexive Closure. Given a relation pa, Rq P RelpAq, its reflexive closure is, by definition, the relation pa, R Y id A q. Note that, by Exercise 2, for any pa, Rq P RelpAq: (i) pa, R Y id A q is reflexive; and (ii) if pa, Rq is reflexive, then pa, Rq pa, R Y id A q. Directed Acyclic Graphs (DAGs). A relation pa, Rq P Rel paq is called a directed acyclic graph (DAG) if an only if its transitive closure pa, R`q is irreflexive. Exercise 3. Prove that a relation pa, Rq P RelpAq is a DAG if and only if there are no closed paths in PathpA, Rq. This explains the mention of acyclic in directed acyclic graph. The slides give examples of acyclic and non-acyclic graphs. Trees. A relation pa, T q P RelpAq is called a tree if and only if: 1. pa, T q is a DAG, and 2. There exists an element a P A called the root of pa, T q such that for any b P A tau there is a unique path a w b P PathpA, Rqpa, bq, that is, PathpA, Rqpa, bq 1. The slides give examples of DAGs that are trees and DAGS that fail to be trees. Forests. If pa 1, T 1 q,..., pa n, T n q are trees, and for 1 ď i ă j ď n we have A i X A j H, then the DAG pa 1 Y... Y A n, T 1 Y... Y T n q is called a forest. The slides give an example of a forest made up of several trees. 4 Strict Partial Orders A relation pa, ąq P RelpAq is called a strict partial order if and only if: 1. ą is irreflexive, and 2. ą is transitive.
6 6 J. Meseguer Note that it follows from the definition of a DAG pa, Rq P RelpAq that its transitive closure pa, R`q is always a strict partial order. The slides give several examples of strict partial orders. Strict Total Orders. A strict partial order pa, ąq is called total if and only if it satisfies the following property: Trichotomy y P A px ą y _ x y _ y ą xq The slides give several examples of strict total orders and of a strict partial order that is not total.
Slides for Faculty Oxford University Press All rights reserved.
Oxford University Press 2013 Slides for Faculty Assistance Preliminaries Author: Vivek Kulkarni vivek_kulkarni@yahoo.com Outline Following topics are covered in the slides: Basic concepts, namely, symbols,
More information9.5 Equivalence Relations
9.5 Equivalence Relations You know from your early study of fractions that each fraction has many equivalent forms. For example, 2, 2 4, 3 6, 2, 3 6, 5 30,... are all different ways to represent the same
More informationCSC Discrete Math I, Spring Sets
CSC 125 - Discrete Math I, Spring 2017 Sets Sets A set is well-defined, unordered collection of objects The objects in a set are called the elements, or members, of the set A set is said to contain its
More informationEDAA40 At home exercises 1
EDAA40 At home exercises 1 1. Given, with as always the natural numbers starting at 1, let us define the following sets (with iff ): Give the number of elements in these sets as follows: 1. 23 2. 6 3.
More informationAntisymmetric Relations. Definition A relation R on A is said to be antisymmetric
Antisymmetric Relations Definition A relation R on A is said to be antisymmetric if ( a, b A)(a R b b R a a = b). The picture for this is: Except For Example The relation on R: if a b and b a then a =
More informationDiscrete Mathematics Lecture 4. Harper Langston New York University
Discrete Mathematics Lecture 4 Harper Langston New York University Sequences Sequence is a set of (usually infinite number of) ordered elements: a 1, a 2,, a n, Each individual element a k is called a
More informationRECURSIVE AND COMPUTABLE FUNCTIONS
RECURSIVE AND COMPUTABLE FUNCTIONS 0. Preliminary set-theoretic notions Before we begin, let us introduce the following convenient definitions from set theory 1 : We let 0 H, and in general the natural
More informationFoundations of Computer Science Spring Mathematical Preliminaries
Foundations of Computer Science Spring 2017 Equivalence Relation, Recursive Definition, and Mathematical Induction Mathematical Preliminaries Mohammad Ashiqur Rahman Department of Computer Science College
More information1. Represent each of these relations on {1, 2, 3} with a matrix (with the elements of this set listed in increasing order).
Exercises Exercises 1. Represent each of these relations on {1, 2, 3} with a matrix (with the elements of this set listed in increasing order). a) {(1, 1), (1, 2), (1, 3)} b) {(1, 2), (2, 1), (2, 2), (3,
More informationCHAPTER 3 FUZZY RELATION and COMPOSITION
CHAPTER 3 FUZZY RELATION and COMPOSITION Crisp relation! Definition (Product set) Let A and B be two non-empty sets, the prod uct set or Cartesian product A B is defined as follows, A B = {(a, b) a A,
More informationCardinality Lectures
Cardinality Lectures Enrique Treviño March 8, 014 1 Definition of cardinality The cardinality of a set is a measure of the size of a set. When a set A is finite, its cardinality is the number of elements
More informationLecture 17: Continuous Functions
Lecture 17: Continuous Functions 1 Continuous Functions Let (X, T X ) and (Y, T Y ) be topological spaces. Definition 1.1 (Continuous Function). A function f : X Y is said to be continuous if the inverse
More informationBinary Decision Diagrams
Logic and roof Hilary 2016 James Worrell Binary Decision Diagrams A propositional formula is determined up to logical equivalence by its truth table. If the formula has n variables then its truth table
More informationPower Set of a set and Relations
Power Set of a set and Relations 1 Power Set (1) Definition: The power set of a set S, denoted P(S), is the set of all subsets of S. Examples Let A={a,b,c}, P(A)={,{a},{b},{c},{a,b},{b,c},{a,c},{a,b,c}}
More informationThese notes present some properties of chordal graphs, a set of undirected graphs that are important for undirected graphical models.
Undirected Graphical Models: Chordal Graphs, Decomposable Graphs, Junction Trees, and Factorizations Peter Bartlett. October 2003. These notes present some properties of chordal graphs, a set of undirected
More informationColecture 1: Algebras, algebraic data types, and recursion
Colecture 1: Algebras, algebraic data types, and recursion Aleks Kissinger (and Juriaan Rot) ovember 15, 2016 1 Turning arrows around A common past-time of category theories is to double their research
More informationINTRODUCTION TO TOPOLOGY
INTRODUCTION TO TOPOLOGY MARTINA ROVELLI These notes are an outline of the topics covered in class, and are not substitutive of the lectures, where (most) proofs are provided and examples are discussed
More informationA set with only one member is called a SINGLETON. A set with no members is called the EMPTY SET or 2 N
Mathematical Preliminaries Read pages 529-540 1. Set Theory 1.1 What is a set? A set is a collection of entities of any kind. It can be finite or infinite. A = {a, b, c} N = {1, 2, 3, } An entity is an
More informationRelations and Graphs
s and are Pictures of (Binary) s E. Wenderholm Department of Computer Science SUNY Oswego c 2016 Elaine Wenderholm All rights Reserved Outline 1 A Function that returns a boolean Special Properties of
More informationIntroduction to Sets and Logic (MATH 1190)
Introduction to Sets and Logic () Instructor: Email: shenlili@yorku.ca Department of Mathematics and Statistics York University Dec 4, 2014 Outline 1 2 3 4 Definition A relation R from a set A to a set
More informationT. Background material: Topology
MATH41071/MATH61071 Algebraic topology Autumn Semester 2017 2018 T. Background material: Topology For convenience this is an overview of basic topological ideas which will be used in the course. This material
More informationMathematics for Computer Science Exercises from Week 4
Mathematics for Computer Science Exercises from Week 4 Silvio Capobianco Last update: 26 September 2018 Problems from Section 4.1 Problem 4.3. Set Formulas and Propositional Formulas. (a) Verify that the
More informationTOPOLOGY, DR. BLOCK, FALL 2015, NOTES, PART 3.
TOPOLOGY, DR. BLOCK, FALL 2015, NOTES, PART 3. 301. Definition. Let m be a positive integer, and let X be a set. An m-tuple of elements of X is a function x : {1,..., m} X. We sometimes use x i instead
More informationTaibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103. Chapter 2. Sets
Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 2 Sets Slides are adopted from Discrete Mathematics and It's Applications Kenneth H.
More information9/19/12. Why Study Discrete Math? What is discrete? Sets (Rosen, Chapter 2) can be described by discrete math TOPICS
What is discrete? Sets (Rosen, Chapter 2) TOPICS Discrete math Set Definition Set Operations Tuples Consisting of distinct or unconnected elements, not continuous (calculus) Helps us in Computer Science
More informationCSE 20 DISCRETE MATH. Winter
CSE 20 DISCRETE MATH Winter 2017 http://cseweb.ucsd.edu/classes/wi17/cse20-ab/ Final exam The final exam is Saturday March 18 8am-11am. Lecture A will take the exam in GH 242 Lecture B will take the exam
More informationSection 6.3: Further Rules for Counting Sets
Section 6.3: Further Rules for Counting Sets Often when we are considering the probability of an event, that event is itself a union of other events. For example, suppose there is a horse race with three
More informationTHREE LECTURES ON BASIC TOPOLOGY. 1. Basic notions.
THREE LECTURES ON BASIC TOPOLOGY PHILIP FOTH 1. Basic notions. Let X be a set. To make a topological space out of X, one must specify a collection T of subsets of X, which are said to be open subsets of
More informationSets. Sets. Subset, universe. Specifying sets, membership. Examples: Specifying a set using a predicate. Examples
Sets 2/36 We will not give a precise definition of what is a set, but we will say precisely what you can do with it. Sets Lectures 7 and 8 (hapter 16) (Think of a set as a collection of things of which
More informationLecture 10: Strongly Connected Components, Biconnected Graphs
15-750: Graduate Algorithms February 8, 2016 Lecture 10: Strongly Connected Components, Biconnected Graphs Lecturer: David Witmer Scribe: Zhong Zhou 1 DFS Continued We have introduced Depth-First Search
More informationCMPSCI 250: Introduction to Computation. Lecture #22: Graphs, Paths, and Trees David Mix Barrington 12 March 2014
CMPSCI 250: Introduction to Computation Lecture #22: Graphs, Paths, and Trees David Mix Barrington 12 March 2014 Graphs, Paths, and Trees Graph Definitions Paths and the Path Predicate Cycles, Directed
More informationChapter 3. Set Theory. 3.1 What is a Set?
Chapter 3 Set Theory 3.1 What is a Set? A set is a well-defined collection of objects called elements or members of the set. Here, well-defined means accurately and unambiguously stated or described. Any
More informationLecture 22 Tuesday, April 10
CIS 160 - Spring 2018 (instructor Val Tannen) Lecture 22 Tuesday, April 10 GRAPH THEORY Directed Graphs Directed graphs (a.k.a. digraphs) are an important mathematical modeling tool in Computer Science,
More informationCS5371 Theory of Computation. Lecture 8: Automata Theory VI (PDA, PDA = CFG)
CS5371 Theory of Computation Lecture 8: Automata Theory VI (PDA, PDA = CFG) Objectives Introduce Pushdown Automaton (PDA) Show that PDA = CFG In terms of descriptive power Pushdown Automaton (PDA) Roughly
More informationFinite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018
Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018 Lecture 11 Ana Bove April 26th 2018 Recap: Regular Languages Decision properties of RL: Is it empty? Does it contain this word? Contains
More informationLogic and Discrete Mathematics. Section 2.5 Equivalence relations and partitions
Logic and Discrete Mathematics Section 2.5 Equivalence relations and partitions Slides version: January 2015 Equivalence relations Let X be a set and R X X a binary relation on X. We call R an equivalence
More informationMA651 Topology. Lecture 4. Topological spaces 2
MA651 Topology. Lecture 4. Topological spaces 2 This text is based on the following books: Linear Algebra and Analysis by Marc Zamansky Topology by James Dugundgji Fundamental concepts of topology by Peter
More informationMATH 139 W12 Review 1 Checklist 1. Exam Checklist. 1. Introduction to Predicates and Quantified Statements (chapters ).
MATH 139 W12 Review 1 Checklist 1 Exam Checklist 1. Introduction to Predicates and Quantified Statements (chapters 3.1-3.4). universal and existential statements truth set negations of universal and existential
More informationLecture 4: examples of topological spaces, coarser and finer topologies, bases and closed sets
Lecture 4: examples of topological spaces, coarser and finer topologies, bases and closed sets Saul Glasman 14 September 2016 Let s give the definition of an open subset of R. Definition 1. Let U R. We
More informationCSE 20 DISCRETE MATH. Fall
CSE 20 DISCRETE MATH Fall 2017 http://cseweb.ucsd.edu/classes/fa17/cse20-ab/ Final exam The final exam is Saturday December 16 11:30am-2:30pm. Lecture A will take the exam in Lecture B will take the exam
More informationCS243, Logic and Computation Sets, functions, and languages
CS243, Prof. Alvarez 1 NAIVE SET THEORY Prof. Sergio A. Alvarez http://www.cs.bc.edu/ alvarez/ Maloney Hall, room 569 alvarez@cs.bc.edu Computer Science Department voice: (617) 552-4333 Boston College
More information2.1 Sets 2.2 Set Operations
CSC2510 Theoretical Foundations of Computer Science 2.1 Sets 2.2 Set Operations Introduction to Set Theory A set is a structure, representing an unordered collection (group, plurality) of zero or more
More informationCSE 215: Foundations of Computer Science Recitation Exercises Set #9 Stony Brook University. Name: ID#: Section #: Score: / 4
CSE 215: Foundations of Computer Science Recitation Exercises Set #9 Stony Brook University Name: ID#: Section #: Score: / 4 Unit 14: Set Theory: Definitions and Properties 1. Let C = {n Z n = 6r 5 for
More informationSets MAT231. Fall Transition to Higher Mathematics. MAT231 (Transition to Higher Math) Sets Fall / 31
Sets MAT231 Transition to Higher Mathematics Fall 2014 MAT231 (Transition to Higher Math) Sets Fall 2014 1 / 31 Outline 1 Sets Introduction Cartesian Products Subsets Power Sets Union, Intersection, Difference
More informationSets. Mukulika Ghosh. Fall Based on slides by Dr. Hyunyoung Lee
Sets Mukulika Ghosh Fall 2018 Based on slides by Dr. Hyunyoung Lee Sets Sets A set is an unordered collection of objects, called elements, without duplication. We write a A to denote that a is an element
More informationComputability Theory XI
Computability Theory XI Recursively Enumerable Set Guoqiang Li Shanghai Jiao Tong University Dec. 12&19, 2013 Assignment Assignment 4 was announced! The deadline is Dec. 26! An Exercise Let A, B N. Define
More informationComparing sizes of sets
Comparing sizes of sets Sets A and B are the same size if there is a bijection from A to B. (That was a definition!) For finite sets A, B, it is not difficult to verify that there is a bijection from A
More informationAbout the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Discrete Mathematics
About the Tutorial Discrete Mathematics is a branch of mathematics involving discrete elements that uses algebra and arithmetic. It is increasingly being applied in the practical fields of mathematics
More informationIntroduction to Algebraic and Geometric Topology Week 5
Introduction to Algebraic and Geometric Topology Week 5 Domingo Toledo University of Utah Fall 2017 Topology of Metric Spaces I (X, d) metric space. I Recall the definition of Open sets: Definition U
More informationA GRAPH FROM THE VIEWPOINT OF ALGEBRAIC TOPOLOGY
A GRAPH FROM THE VIEWPOINT OF ALGEBRAIC TOPOLOGY KARL L. STRATOS Abstract. The conventional method of describing a graph as a pair (V, E), where V and E repectively denote the sets of vertices and edges,
More informationLecture 19 Thursday, March 29. Examples of isomorphic, and non-isomorphic graphs will be given in class.
CIS 160 - Spring 2018 (instructor Val Tannen) Lecture 19 Thursday, March 29 GRAPH THEORY Graph isomorphism Definition 19.1 Two graphs G 1 = (V 1, E 1 ) and G 2 = (V 2, E 2 ) are isomorphic, write G 1 G
More informationIntegers and Mathematical Induction
IT Program, NTUT, Fall 07 Integers and Mathematical Induction Chuan-Ming Liu Computer Science and Information Engineering National Taipei University of Technology TAIWAN 1 Learning Objectives Learn about
More informationHowever, this is not always true! For example, this fails if both A and B are closed and unbounded (find an example).
98 CHAPTER 3. PROPERTIES OF CONVEX SETS: A GLIMPSE 3.2 Separation Theorems It seems intuitively rather obvious that if A and B are two nonempty disjoint convex sets in A 2, then there is a line, H, separating
More informationQuiz 1 Solutions. [1 point] No hackers are willing to waltz. Solution. x R(x) S(x) [1 point] No artists are unwilling to waltz.
Massachusetts Institute of Technology Handout 26 6.042J/18.062J: Mathematics for Computer Science March 15 2000 Professors David Karger and Nancy Lynch Quiz 1 Solutions Problem 1 [10 points] Quantifiers
More informationCMSC 380. Graph Terminology and Representation
CMSC 380 Graph Terminology and Representation GRAPH BASICS 2 Basic Graph Definitions n A graph G = (V,E) consists of a finite set of vertices, V, and a finite set of edges, E. n Each edge is a pair (v,w)
More informationDigital Logic Design: a rigorous approach c
Digital Logic Design: a rigorous approach c Chapter 4: Directed Graphs Guy Even Moti Medina School of Electrical Engineering Tel-Aviv Univ. October 31, 2017 Book Homepage: http://www.eng.tau.ac.il/~guy/even-medina
More informationBinary search trees. Binary search trees are data structures based on binary trees that support operations on dynamic sets.
COMP3600/6466 Algorithms 2018 Lecture 12 1 Binary search trees Reading: Cormen et al, Sections 12.1 to 12.3 Binary search trees are data structures based on binary trees that support operations on dynamic
More informationTheory of Computation
Theory of Computation For Computer Science & Information Technology By www.thegateacademy.com Syllabus Syllabus for Theory of Computation Regular Expressions and Finite Automata, Context-Free Grammar s
More informationCS2 Algorithms and Data Structures Note 10. Depth-First Search and Topological Sorting
CS2 Algorithms and Data Structures Note 10 Depth-First Search and Topological Sorting In this lecture, we will analyse the running time of DFS and discuss a few applications. 10.1 A recursive implementation
More informationLECTURE 8: SETS. Software Engineering Mike Wooldridge
LECTURE 8: SETS Mike Wooldridge 1 What is a Set? The concept of a set is used throughout mathematics; its formal definition matches closely our intuitive understanding of the word. Definition: A set is
More informationCS100: DISCRETE STRUCTURES
CS: DISCRETE STRUCTURES Computer Science Department Lecture : Set and Sets Operations (Ch2) Lecture Contents 2 Sets Definition. Some Important Sets. Notation used to describe membership in sets. How to
More informationCHAPTER 3 FUZZY RELATION and COMPOSITION
CHAPTER 3 FUZZY RELATION and COMPOSITION The concept of fuzzy set as a generalization of crisp set has been introduced in the previous chapter. Relations between elements of crisp sets can be extended
More informationDiscrete Mathematics. Kruskal, order, sorting, induction
Discrete Mathematics wwwmifvult/~algis Kruskal, order, sorting, induction Kruskal algorithm Kruskal s Algorithm for Minimal Spanning Trees The algorithm constructs a minimal spanning tree as follows: Starting
More information[Ch 6] Set Theory. 1. Basic Concepts and Definitions. 400 lecture note #4. 1) Basics
400 lecture note #4 [Ch 6] Set Theory 1. Basic Concepts and Definitions 1) Basics Element: ; A is a set consisting of elements x which is in a/another set S such that P(x) is true. Empty set: notated {
More informationPoint-Set Topology 1. TOPOLOGICAL SPACES AND CONTINUOUS FUNCTIONS
Point-Set Topology 1. TOPOLOGICAL SPACES AND CONTINUOUS FUNCTIONS Definition 1.1. Let X be a set and T a subset of the power set P(X) of X. Then T is a topology on X if and only if all of the following
More informationCS 6783 (Applied Algorithms) Lecture 5
CS 6783 (Applied Algorithms) Lecture 5 Antonina Kolokolova January 19, 2012 1 Minimum Spanning Trees An undirected graph G is a pair (V, E); V is a set (of vertices or nodes); E is a set of (undirected)
More informationr=1 The Binomial Theorem. 4 MA095/98G Revision
Revision Read through the whole course once Make summary sheets of important definitions and results, you can use the following pages as a start and fill in more yourself Do all assignments again Do the
More informationLecture 15: The subspace topology, Closed sets
Lecture 15: The subspace topology, Closed sets 1 The Subspace Topology Definition 1.1. Let (X, T) be a topological space with topology T. subset of X, the collection If Y is a T Y = {Y U U T} is a topology
More informationMath 776 Graph Theory Lecture Note 1 Basic concepts
Math 776 Graph Theory Lecture Note 1 Basic concepts Lectured by Lincoln Lu Transcribed by Lincoln Lu Graph theory was founded by the great Swiss mathematician Leonhard Euler (1707-178) after he solved
More information6c Lecture 3 & 4: April 8 & 10, 2014
6c Lecture 3 & 4: April 8 & 10, 2014 3.1 Graphs and trees We begin by recalling some basic definitions from graph theory. Definition 3.1. A (undirected, simple) graph consists of a set of vertices V and
More informationChapter 4. Relations & Graphs. 4.1 Relations. Exercises For each of the relations specified below:
Chapter 4 Relations & Graphs 4.1 Relations Definition: Let A and B be sets. A relation from A to B is a subset of A B. When we have a relation from A to A we often call it a relation on A. When we have
More informationNotes for Recitation 8
6.04/8.06J Mathematics for Computer Science October 5, 00 Tom Leighton and Marten van Dijk Notes for Recitation 8 Build-up error Recall a graph is connected iff there is a path between every pair of its
More information(Refer Slide Time: 0:19)
Theory of Computation. Professor somenath Biswas. Department of Computer Science & Engineering. Indian Institute of Technology, Kanpur. Lecture-15. Decision Problems for Regular Languages. (Refer Slide
More informationSFU CMPT Lecture: Week 9
SFU CMPT-307 2008-2 1 Lecture: Week 9 SFU CMPT-307 2008-2 Lecture: Week 9 Ján Maňuch E-mail: jmanuch@sfu.ca Lecture on July 8, 2008, 5.30pm-8.20pm SFU CMPT-307 2008-2 2 Lecture: Week 9 Binary search trees
More informationγ(ɛ) (a, b) (a, d) (d, a) (a, b) (c, d) (d, d) (e, e) (e, a) (e, e) (a) Draw a picture of G.
MAD 3105 Spring 2006 Solutions for Review for Test 2 1. Define a graph G with V (G) = {a, b, c, d, e}, E(G) = {r, s, t, u, v, w, x, y, z} and γ, the function defining the edges, is given by the table ɛ
More information1 of 7 7/15/2009 3:40 PM Virtual Laboratories > 1. Foundations > 1 2 3 4 5 6 7 8 9 1. Sets Poincaré's quote, on the title page of this chapter could not be more wrong (what was he thinking?). Set theory
More informationRelations, Equivalence Relations, and Partial Orders
Massachusetts Institute of Technology Lecture 6 6.042J/18.062J: Mathematics for Computer Science February 17, 2000 Professors David Karger and Nancy Lynch Relations, Equivalence Relations, and Partial
More informationOpen and Closed Sets
Open and Closed Sets Definition: A subset S of a metric space (X, d) is open if it contains an open ball about each of its points i.e., if x S : ɛ > 0 : B(x, ɛ) S. (1) Theorem: (O1) and X are open sets.
More informationDiscrete mathematics II. - Graphs
Emil Vatai April 25, 2018 Basic definitions Definition of an undirected graph Definition (Undirected graph) An undirected graph or (just) a graph is a triplet G = (ϕ, E, V ), where V is the set of vertices,
More informationLecture : Topological Space
Example of Lecture : Dr. Department of Mathematics Lovely Professional University Punjab, India October 18, 2014 Outline Example of 1 2 3 Example of 4 5 6 Example of I Topological spaces and continuous
More information2/18/14. Uses for Discrete Math in Computer Science. What is discrete? Why Study Discrete Math? Sets and Functions (Rosen, Sections 2.1,2.2, 2.
Why Study Discrete Math? Sets and Functions (Rosen, Sections 2.1,2.2, 2.3) TOPICS Discrete math Set Definition Set Operations Tuples Digital computers are based on discrete units of data (bits). Therefore,
More informationCONTROL FLOW ANALYSIS. The slides adapted from Vikram Adve
CONTROL FLOW ANALYSIS The slides adapted from Vikram Adve Flow Graphs Flow Graph: A triple G=(N,A,s), where (N,A) is a (finite) directed graph, s N is a designated initial node, and there is a path from
More informationModule 11. Directed Graphs. Contents
Module 11 Directed Graphs Contents 11.1 Basic concepts......................... 256 Underlying graph of a digraph................ 257 Out-degrees and in-degrees.................. 258 Isomorphism..........................
More informationCS 473: Algorithms. Chandra Chekuri 3228 Siebel Center. Fall University of Illinois, Urbana-Champaign
CS 473: Algorithms Chandra chekuri@cs.illinois.edu 3228 Siebel Center University of Illinois, Urbana-Champaign Fall 2010 Depth First Search Directed Graphs Searching ted Graphs Strong Connected Components
More information4&5 Binary Operations and Relations. The Integers. (part I)
c Oksana Shatalov, Spring 2016 1 4&5 Binary Operations and Relations. The Integers. (part I) 4.1: Binary Operations DEFINITION 1. A binary operation on a nonempty set A is a function from A A to A. Addition,
More informationWhat is Set? Set Theory. Notation. Venn Diagram
What is Set? Set Theory Peter Lo Set is any well-defined list, collection, or class of objects. The objects in set can be anything These objects are called the Elements or Members of the set. CS218 Peter
More informationReview of Sets. Review. Philippe B. Laval. Current Semester. Kennesaw State University. Philippe B. Laval (KSU) Sets Current Semester 1 / 16
Review of Sets Review Philippe B. Laval Kennesaw State University Current Semester Philippe B. Laval (KSU) Sets Current Semester 1 / 16 Outline 1 Introduction 2 Definitions, Notations and Examples 3 Special
More informationComplexity Theory. Compiled By : Hari Prasad Pokhrel Page 1 of 20. ioenotes.edu.np
Chapter 1: Introduction Introduction Purpose of the Theory of Computation: Develop formal mathematical models of computation that reflect real-world computers. Nowadays, the Theory of Computation can be
More informationCS422 - Programming Language Design
1 CS422 - Programming Language Design Denotational Semantics Grigore Roşu Department of Computer Science University of Illinois at Urbana-Champaign 2 Denotational semantics, alsoknownasfix-point semantics,
More informationGenerell Topologi. Richard Williamson. May 27, 2013
Generell Topologi Richard Williamson May 27, 2013 1 1 Tuesday 15th January 1.1 Topological spaces definition, terminology, finite examples Definition 1.1. A topological space is a pair (X, O) of a set
More informationSemantics via Syntax. f (4) = if define f (x) =2 x + 55.
1 Semantics via Syntax The specification of a programming language starts with its syntax. As every programmer knows, the syntax of a language comes in the shape of a variant of a BNF (Backus-Naur Form)
More information2. Sets. 2.1&2.2: Sets and Subsets. Combining Sets. c Dr Oksana Shatalov, Fall
c Dr Oksana Shatalov, Fall 2014 1 2. Sets 2.1&2.2: Sets and Subsets. Combining Sets. Set Terminology and Notation DEFINITIONS: Set is well-defined collection of objects. Elements are objects or members
More informationFunctions. How is this definition written in symbolic logic notation?
functions 1 Functions Def. Let A and B be sets. A function f from A to B is an assignment of exactly one element of B to each element of A. We write f(a) = b if b is the unique element of B assigned by
More informationBinary search trees 3. Binary search trees. Binary search trees 2. Reading: Cormen et al, Sections 12.1 to 12.3
Binary search trees Reading: Cormen et al, Sections 12.1 to 12.3 Binary search trees 3 Binary search trees are data structures based on binary trees that support operations on dynamic sets. Each element
More informationExercises: Disjoint Sets/ Union-find [updated Feb. 3]
Exercises: Disjoint Sets/ Union-find [updated Feb. 3] Questions 1) Suppose you have an implementation of union that is by-size and an implementation of find that does not use path compression. Give the
More information10/11/2018. Partial Orderings. Partial Orderings. Partial Orderings. Partial Orderings. Partial Orderings. Partial Orderings
Sometimes, relations define an order on the elements in a set. Definition: A relation R on a set S is called a partial ordering or partial order if it is reflexive, antisymmetric, and transitive. A set
More informationFinite Automata Theory and Formal Languages TMV027/DIT321 LP4 2016
Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2016 Lecture 15 Ana Bove May 23rd 2016 More on Turing machines; Summary of the course. Overview of today s lecture: Recap: PDA, TM Push-down
More informationCS473-Algorithms I. Lecture 13-A. Graphs. Cevdet Aykanat - Bilkent University Computer Engineering Department
CS473-Algorithms I Lecture 3-A Graphs Graphs A directed graph (or digraph) G is a pair (V, E), where V is a finite set, and E is a binary relation on V The set V: Vertex set of G The set E: Edge set of
More informationContents of Lecture 2
Contents of Lecture Dominance relation An inefficient and simple algorithm to compute dominance Immediate dominators Dominator tree Jonas Skeppstedt (js@cs.lth.se) Lecture / Definition of Dominance Consider
More informationLecture 1. 1 Notation
Lecture 1 (The material on mathematical logic is covered in the textbook starting with Chapter 5; however, for the first few lectures, I will be providing some required background topics and will not be
More information