Cmsc 180 Discrete Mathematics

Cmsc 180 Discrete Mathematics

<p> CmSc 180 Discrete Mathematics Homework 08, due 04/03</p><p>Part 1: Problems</p><p>Prove by Mathematical Induction 1. 12 + 32 + 52 + …. + (2n-1) 2 = n(2n+1)(2n-1)/3, n ≥1 2. 1*2 + 2*3 + 3*4 + …. + n(n+1) = n(n+1)(n+2)/3</p><p>Part 2: Programming</p><p>Write a program that reads a relation R on a set A as a sequence of pairs of natural numbers, represents the relation as a matrix and a) finds the composition R o R and prints it as a set of pairs b) determines whether R is transitive or not transitive</p><p>The input to the program should be number of elements in A, number of pairs in R list of pairs, entered one by one, each pair on a separate line</p><p>The output should be - matrix representation of the relation - a statement about the transitivity of the relation - the composition R * R as a set of pairs - matrix representation of R * R </p><p>Sample transcript of program run: (underlined text is user input)</p><p>This program reads a relation on a finite set of natural numbers and determines the reflexivity and the symmetry of the relation</p><p>Please enter the number of the elements in the set: 4 Please enter the number of pairs in the relation: 4 Please enter the pairs, each pair on a separate line 1 2 1 3 1 4 2 3</p><p>Matrix representation: 1 2 3 4 1 0 1 1 1 2 0 0 1 0 3 0 0 0 0 4 0 0 0 0 </p><p>1 The relation is transitive. </p><p>Composition R * R: {(1,3)}</p><p>Matrix representation of R * R: 1 2 3 4 1 0 0 1 0 2 0 0 0 0 3 0 0 0 0 4 0 0 0 0 </p><p>Turn in the problems in Part 1 as a Word document, and the source code of your Java program sent as e-mail attachments</p><p>2</p>

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    2 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us