TA: Jade Cheng ICS 241 Recitation Lecture Note #5 September 25, Let be the following relation defined on the set,,, :,,,,,,,,,,,,,,,,,,,,,.

Similar documents
Department of Computer Science University at Albany, State University of New York Solutions to Sample Discrete Mathematics Examination I (Spring 2008)

Relationships between elements of sets occur in many contexts. Every day we deal with

Math 3000 Section 003 Intro to Abstract Math Final Exam

Problem 1: Suppose A, B, C and D are finite sets such that A B = C D and C = D. Prove or disprove: A = B.

22A-2 SUMMER 2014 LECTURE Agenda

Math.3336: Discrete Mathematics. Chapter 9 Relations

CSC Discrete Math I, Spring Relations

Relations. Relations of Sets N-ary Relations Relational Databases Binary Relation Properties Equivalence Relations. Reading (Epp s textbook)

Definition 2.3. We define addition and multiplication of matrices as follows.

Discrete Structures: Sample Questions, Exam 2, SOLUTIONS

CHAPTER 1. Relations. 1. Relations and Their Properties. Discussion

Properties of Matrices

Matrices and Vectors

Definition: A binary relation R from a set A to a set B is a subset R A B. Example:

Chapter 2. Error Correcting Codes. 2.1 Basic Notions

Department of Computer Science University at Albany, State University of New York Solutions to Sample Discrete Mathematics Examination II (Fall 2007)

Math 4310 Solutions to homework 1 Due 9/1/16

1 Last time: inverses

Today. Binary relations establish a relationship between elements of two sets

a + b = b + a and a b = b a. (a + b) + c = a + (b + c) and (a b) c = a (b c). a (b + c) = a b + a c and (a + b) c = a c + b c.

Properties of the Integers

1 - Systems of Linear Equations

Relations. We have seen several types of abstract, mathematical objects, including propositions, predicates, sets, and ordered pairs and tuples.

Math 3191 Applied Linear Algebra

Section 29: What s an Inverse?

Relations MATH Relations. Benjamin V.C. Collins, James A. Swenson MATH 2730

1. Vectors.

Order of Operations. Real numbers

Econ Slides from Lecture 7

COMP232 - Mathematics for Computer Science

MODEL ANSWERS TO THE FIRST QUIZ. 1. (18pts) (i) Give the definition of a m n matrix. A m n matrix with entries in a field F is a function

REPLACE ONE ROW BY ADDING THE SCALAR MULTIPLE OF ANOTHER ROW

Relations Graphical View

Advanced Engineering Mathematics Prof. Pratima Panigrahi Department of Mathematics Indian Institute of Technology, Kharagpur

Generating Permutations and Combinations

Selected Solutions to Even Problems, Part 3

Section Summary. Sequences. Recurrence Relations. Summations Special Integer Sequences (optional)

Linear Algebra 1A - solutions of ex. 8

MA 3280 Lecture 05 - Generalized Echelon Form and Free Variables. Friday, January 31, 2014.

Notes. Relations. Introduction. Notes. Relations. Notes. Definition. Example. Slides by Christopher M. Bourke Instructor: Berthe Y.

Dynamic Programming. Shuang Zhao. Microsoft Research Asia September 5, Dynamic Programming. Shuang Zhao. Outline. Introduction.

Determine whether the following system has a trivial solution or non-trivial solution:

Nonnegative Matrices I

Math 3191 Applied Linear Algebra

CS100: DISCRETE STRUCTURES. Lecture 3 Matrices Ch 3 Pages:

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

What are relations? f: A B

Chapter 9: Relations Relations

= main diagonal, in the order in which their corresponding eigenvectors appear as columns of E.

Section Summary. Relations and Functions Properties of Relations. Combining Relations

Databases 2011 The Relational Algebra

MTH 215: Introduction to Linear Algebra

Discrete Structures: Sample Questions, Exam 2, SOLUTIONS

Math 315: Linear Algebra Solutions to Assignment 7

Recitation 8: Graphs and Adjacency Matrices

Linear Equations in Linear Algebra

Week 4-5: Generating Permutations and Combinations

Consider an infinite row of dominoes, labeled by 1, 2, 3,, where each domino is standing up. What should one do to knock over all dominoes?

Today s Menu. Administrativia Two Problems Cutting a Pizza Lighting Rooms

Chapter 3. Cartesian Products and Relations. 3.1 Cartesian Products

NAME MATH 304 Examination 2 Page 1

Name (please print) Mathematics Final Examination December 14, 2005 I. (4)

Math 1324 Review 2(answers) x y 2z R R R

MATH 580, midterm exam SOLUTIONS

CSE548, AMS542: Analysis of Algorithms, Spring 2014 Date: May 12. Final In-Class Exam. ( 2:35 PM 3:50 PM : 75 Minutes )

Matrix Theory and Differential Equations Homework 6 Solutions, 10/5/6

Optimization Methods in Management Science

1.1.1 Algebraic Operations

Math 205, Summer I, Week 4b: Continued. Chapter 5, Section 8

Axioms of Kleene Algebra

Discrete Structures May 13, (40 points) Define each of the following terms:

Math Models of OR: Some Definitions

LINEAR ALGEBRA 1, 2012-I PARTIAL EXAM 3 SOLUTIONS TO PRACTICE PROBLEMS

5 Irreducible representations

Characterizations of Strongly Regular Graphs: Part II: Bose-Mesner algebras of graphs. Sung Y. Song Iowa State University

CIS 375 Intro to Discrete Mathematics Exam 3 (Section M004: Blue) 6 December Points Possible

Analysis of Algorithms I: Perfect Hashing

Definition: A binary relation R from a set A to a set B is a subset R A B. Example:

Lecture Summaries for Linear Algebra M51A

1. What is the determinant of the following matrix? a 1 a 2 4a 3 2a 2 b 1 b 2 4b 3 2b c 1. = 4, then det

Linear Algebra March 16, 2019

CSL361 Problem set 4: Basic linear algebra

sum of squared error.

Matrix compositions. Emanuele Munarini. Dipartimento di Matematica Politecnico di Milano

Today s topics. Binary Relations. Inverse Relations. Complementary Relations. Let R:A,B be any binary relation.

2. Transience and Recurrence

Math 42, Discrete Mathematics

CIS 375 Intro to Discrete Mathematics Exam 3 (Section M001: Green) 6 December Points Possible

Chapter 1: Systems of linear equations and matrices. Section 1.1: Introduction to systems of linear equations

Lecture 23 Branch-and-Bound Algorithm. November 3, 2009

New Inequalities for q-ary Constant-Weight Codes

DRAFT CONCEPTUAL SOLUTION REPORT DRAFT

Math 54 HW 4 solutions

Multiple Choice Questions for Review

TMA Calculus 3. Lecture 21, April 3. Toke Meier Carlsen Norwegian University of Science and Technology Spring 2013

Economics 204 Summer/Fall 2011 Lecture 2 Tuesday July 26, 2011 N Now, on the main diagonal, change all the 0s to 1s and vice versa:

Rooks and Pascal s Triangle. shading in the first k squares of the diagonal running downwards to the right. We

Announcements Monday, September 18

7.6 The Inverse of a Square Matrix

Find the following matrix products, if possible.(1-4)

Transcription:

TA: Jade Cheng ICS 241 Recitation Lecture Note #5 September 25, 2009 Recitation #5 Let be the following relation defined on the set,,, :,,,,,,,,,,,,,,,,,,,,,. Determine whether is [Chapter 8.1 Review] a. Reflexive is reflexive because contains,,,,,, and,. b. symmetric is not symmetric because,, but,. c. antisymmetric is not antisymmetric because,, and,,.but. d. transitive is not transitive because, for example,, and,, but,. Let be the following relation on the set of real numbers: Determine whether is [Chapter 8.1 Review] a. Reflexive, where is the loor of. is reflexive because is true from all real numbers.

b. symmetric is symmetric suppose ; then. c. antisymmetric is not antisymmetric: we can have and for distinct and. For example, 1.1 1.2. d. transitive is transitive, suppose and ; from transitivity of equality of real numbers, it follows that. Answer the following questions regarding this Flight Table: [Chapter 8.2 Review] Airline Flight_number Gate Destination Departure_time N 122 34 Detroit 08:10 A 221 22 Denver 08:17 A 122 33 Anchorage 08:22 A 323 34 Honolulu 08:30 N 199 13 Detroit 08:47 A 222 22 Denver 09:10 N 322 34 Detroit 09:44 a. Assuming that no new -tuples are added, find a composite key with two fields containing the Airline field for the database in the Flight Table. Airline and Flight_number; Airline and Departure_time b. What do you obtain when you apply the selection operator, where is the condition Destination = Detroit, to the data base in the Flight Table. (N, 122, 34, Detroit, 08:10), (N, 199, 13, Detroit, 08:47), (N, 322, 34, Detroit, 09:44). c. What do you obtain when you apply the selection operator, where is the condition (Airline = N) (Destination = Denver), to the data base in the Flight Table. (N, 122, 34, Detroit, 08:10), (N, 199, 13, Detroit, 08:47), (N, 322, 34, Detroit, 09:44), (A, 221, 22, Denver, 08:17), (A, 222, 22, Denver, 09:10).

d. Display the table produced by applying the projection, to the Flight Table. Airline Destination N Detroit A Denver A Anchorage A Honolulu N Detroit A Denver N Detroit Show that if and are conditions that elements of the -ary relation may satisfy, then. [Chapter 8.2 Review] Both sides of this equation pick out the subset of consisting of those -tuples satisfying both conditions and.,,. Give an example to show that if and are both -ary relations, then,, may be different from,,,,. [Chapter 8.2 Review] Let set be the -tuple relation below: Airline Flight_number Gate Destination Departure_time N 122 34 Detroit 08:10 A 221 22 Denver 08:17 A 122 33 Anchorage 08:22 A 323 34 Honolulu 08:30 Let set be the -tuple relation below: Airline Flight_number Gate Destination Departure_time A 221 22 Denver 08:17 A 122 33 Anchorage 08:22 A 323 34 Honolulu 08:30 N 199 13 Detroit 08:47 A 222 22 Denver 09:10 N 322 34 Detroit 09:44

By definition contains the set elements that are in but not in. So is as below: Airline Flight_number Gate Destination Departure_time N 122 34 Detroit 08:10 Let 1, We obtain the following relationship regarding,, and,,,, :,, N.,,,, N, A N, A. N,,,,,,. Represent each of these relations on 1, 2, 3 with a matrix (with the elements of this set listed in increasing order) [Chapter 8.3 Review] a. 1, 1, 1, 2, 1, 3 0 0 0. 0 0 0 b. 1, 2, 2, 1, 2, 2, 3, 3 1 1 0. 0 0 1 c. 1, 1, 1, 2, 1, 3, 2, 2, 2, 3, 3, 3 0 1 1. 0 0 1

List the ordered pairs in the relations on 1, 2, 3 corresponding to these matrices (where the rows and columns correspond to the integers listed in increasing order). [Chapter 8.3 Review] 1 0 1 a. 1 0 1 1, 1, 1, 3, 2, 2, 3, 1, 3, 3. b. 1, 2, 2, 2, 3, 2. c. 1 0 1 1, 1, 2, 2, 1, 3 2, 1 2, 3 3, 1 3, 2 3, 3. Determine whether the relations represented by the matrices in the previous Question are reflexive, irreflexive, symmetric, antisymmetric. [Chapter 8.3 Review] The matrix representing a reflexive relation has 1 s for all its main diagonal entries such as: 1??? 1?.?? 1 The matrix representing a irreflexive relation has 0 s for all its main diagonal entries such as 0??? 0?.?? 0 The matrix representing a symmetric relation has a symmetric 1 s and 0 s layout according to its main diagonal, such as?? 0?? 1. 0 1? The matrix representing an antisymmetric relation has all 1 s having 0 s as the counterpart according to its main diagonal, such as? 1 0 0? 0. 0 1?

1 0 1 So it s clear is reflexive, and symmetric, is antisymmetric, 1 0 1 is 1 0 1 symmetric. Let be the relation represented by the matrix: [Chapter 8.3 Review] 0 0 1 1 1 0 Find the matrices that represent,, and. 0 0 1 0 0 1. 0 0 1 1 1 0. 1 1 0 1 1 0 0 1 1 0 1 0 1 1 0. 0 0 1 1 1 0. 0 0 1 0 1 1. 1 1 0 0 1 0 1 1 0 0 1 1. 0 0 1 0 1 1. 0 0 1. 1 1 0 1 1 0 Some Problems that appeared in HW#2 and E1 Find the number of solutions of the equation 17, where, 1, 2, 3, 4, are nonnegative integers such that 3, 4, 5, and 8. [Chapter 7.6 Review] To apply the principle of inclusion-exclusion, let a solution have property if 3, property if 4, property if 5, and property if 8. The number of solutions satisfying the inequalities 3, 4, 5 and 8 is

. total number of solutions 4 17 1, 17 1140 number of solutions with 3 4 13 1, 13 560 total number of solutions 4 4 12 1, 12 455 total number of solutions 5 4 11 1, 11 364 total number of solutions 8 4 8 1, 8 165 total number of solutions 3 and 4 4 8 1, 8 165 total number of solutions 3 and 5 4 7 1, 7 120 total number of solutions 3 and 8 4 4 1, 4 35 total number of solutions 4 and 5 4 6 1, 6 84 total number of solutions 4 and 8 4 3 1, 3 20 total number of solutions 5 and 8 4 2 1, 2 10 total number of solutions 3, 4, 5 4 2 1, 2 10 total number of solutions 3, 4, 8 0 total number of solutions 3, 5, 8 0 total number of solutions 4, 5, 8 0 total number of solutions 3, 4, 5, 8 0 Inserting these quantities into the formula for shows that the number of solutions with that 3, 4, 5, and 8 equals: 1140 560 455 364 165 165 120 35 84 20 10 10 0 0 0 0 20. Determine which of these are linear homogeneous recurrence relations with constant coefficients. Also, find the degree of those that are. [Chapter 7.2] a. 3 Linear, homogeneous, with constant coefficients, degree 2. b. 3 Linear, with constant coefficients but not homogeneous.

c. not Linear. d. 2 Linear, homogeneous, with constant coefficients, degree 3. e. / Linear, homogeneous, but not with constant coefficients. f. 3 Linear, with constant coefficients, but not homogeneous. g. 4 5 9 Linear, homogeneous, with constant coefficients, degree 7. Solve the recurrence relation 2 2 with initial condition 4. [Chapter 7.2 Review] The characteristic equation for the associated homogeneous recurrence relation is 2 0. So it has solutions 2 Therefore the general solution to the associated homogeneous recurrence relation is: 2. To obtain a particular solution to the given recurrence relation, try obtaining:, 2 1 2 1 2 2 2 4 2 2 0

The coefficient of, terms and the constant term must each equal 0. Therefore, we have 2 0 4 0 2 2 0 Hence, we have 2 8 and 12. Therefore: 2 2 8 12. The initial condition 4, yields the system of equations coefficient: 2 2 1 8 1 12 4 13. The coefficient is found to be 13. Therefore the solution to the given recurrence relation is: 13 2 2 8 12.