Let A be a set with m elements and B be a set with n elements in it.
-When is it possible to have a k-to-1 function f such that f : A → B?
-Count the number of k-to-1 functions f such that f : A → B
Let A be a set with m elements and B a set of n elements, where m, n are positive integers. Find the number of one-to-one functions from A to B.
1. Suppose N is a set with n elements and M is a set with m elements. a. If n <m, how many one-to-one functions are there from N to M? b. If n > m, how many onto functions are there from N to M?
Recall, a rule assigning elements of a set A to a set B is said to be well-defined if the assignment of elements in A to those of B is unique. Furthermore, such a rule is said to be a function when it is well-defined. Consider the rule f : Q → Z where f m n = m − n for any q = m n ∈ Q. Explain why this rule is not a function.
Prove that the number of unordered sequences of length k with elements from a set X of size n is n+k−1 k . Hint: For illustration, first consider the example n = 4, k = 6. Let the 4 elements of the set X be denoted a, b, c, d. Argue that any unordered sequence of size 6 consisting of elements a, b, c, d can be represented uniquely by a symbol similar to “··|·|··|·”, corresponding to the sequence aabccd....
(2) For an integer n, let Z/nZ denote the set of equivalence classes [k) tez: k -é is divisible by n (a) Prove that the set Z/nZ has n elements. (b) Find a minimal set of representatives for these n elements. (c) Prove that the operation gives a well-defined addition on Z/nZ Hint: The operution should not depend on the choice of coset representatives Verify that this gives Z/n2 the structure of an ahelian group. Be sure to verify all...
1. (9pts) Suppose A is a set with m elements and B is a set with n elements. a. How many relations are there from A to B? Explain b. How many functions are there from A to B? Explain C. How many relations from A to itself are reflexive? Explain
7. Let A, , An be non-empty subsets of a finite set Ω. If 1 k n and Ek is the set of elements in Ω which belong to at least k of the Ai's show that Pal i-1 7. Let A, , An be non-empty subsets of a finite set Ω. If 1 k n and Ek is the set of elements in Ω which belong to at least k of the Ai's show that Pal i-1
6. Let A and B be some finite sets with N elements. • Prove that any onto function : A B is an one-to-one function. • Prove that any one-to-one function /: A B is an onto function. • How many different one-to-one functions f: A+B are there?
Let A[1..n] be an array with n elements. Consider the Count-Occurrence algorithm with the pseudocode below. Count-Occurrence(A, n, k). count 0 for j = 1 to n if A[j] ==k count = count+1 print count Which of the following is the correct loop invariant for the for loop? At the start of each iteration jof the for loop, count represents the number of times that k occurs in the subarray A[1.j]. At the start of each iteration of the for...
Let P(n) be the proposition that a set with n elements has 2" subsets. What would the basis step to prove this proposition PO) is true, because a set with zero elements, the empty set, has exactly 2° = 1 subset, namely, itself. 01 Ploi 2. This is not possible to prove this proposition. 3. po 3p(1) is true, we need to show first what happens a set with 1 element. Because, we can't do P(O), that is not allowed....