Chapter 5: Problem 4
If there are 2187 functions \(f: A \rightarrow B\) and \(|B|=3\), what is \(|A|\) ?
Short Answer
Step by step solution
Key Concepts
These are the key concepts you need to understand to accurately answer the question.
/*! This file is auto-generated */ .wp-block-button__link{color:#fff;background-color:#32373c;border-radius:9999px;box-shadow:none;text-decoration:none;padding:calc(.667em + 2px) calc(1.333em + 2px);font-size:1.125em}.wp-block-file__button{background:#32373c;color:#fff;text-decoration:none}
Learning Materials
Features
Discover
Chapter 5: Problem 4
If there are 2187 functions \(f: A \rightarrow B\) and \(|B|=3\), what is \(|A|\) ?
These are the key concepts you need to understand to accurately answer the question.
All the tools & learning materials you need for study success - in one app.
Get started for free
Let \(S\) be a set of seven positive integers the maximum of which is at most 24. Prove that the sums of the elements in all the nonempty subsets of \(S\) cannot be distinct.
The following Pascal program segment implements an algorithm for determining the maximum value in an array \(A[1], A[2], A[3], \ldots, A[n]\) of integers. The array and the value of \(n(\geq 2)\) are supplied earlier in the program; the integer variables \(i\) and Max are declared at the start of the program. (Here the entries in the array need not be distinct) Begin \(\mathrm{Max}:=\mathrm{A}[1]\) For \(1:=2\) to \(n\) do If \(A[1]>M a x\) then Max : = A[1] End; a) If the worst-case complexity function \(f(n)\) for this segment is determined by the number of times the comparison \(A[i]>\mathrm{Max}\) is executed, find the appropriate "big-Oh" form for \(f\). b) What can we say about the best-case and average-case complexities for this implementation?
Let \(f: A \rightarrow A\) be an invertible function. For \(n \in \mathbf{Z}^{+}\) prove that \(\left(f^{n}\right)^{-1}=\left(f^{-1}\right)^{n}\). (This result can be used to define \(f^{-n}\) as either \(\left(f^{n}\right)^{-1}\) or \(\left.\left(f^{-1}\right)^{n} .\right)\)
Let \(f: \mathbf{R} \rightarrow \mathbf{R}\) be defined by \(f(x)=x^{2}\). For each of the following subsets \(B\) of \(\mathbf{R}\), find \(f^{-1}(B)\). a) \(B=\\{0,1\\}\) b) \(B=\\{-1,0,1\\}\) c) \(B=[0,1]\) d) \(B=[0,1)\) e) \(B=[-1,1]\) f) \(B=[0,4]\) g) \(B=[0,1] \cup[4,9]\) h) \(B=(0,1] \cup(4,9)\) Determine three infinite subsets \(B\) of \(\mathbf{R}\) for which \(f^{-1}(B)=\emptyset\).
a) Write a computer program (or develop an algorithm) to locate the first occurrence of the maximum value in an array \(A[1], A[2], A[3], \ldots, A[n]\) of integers. (Here \(n \in \mathbf{Z}^{+}\) and the entries in the array need not be distinct.) b) Determine the worst-case complexity function for the implementation developed in part (a).
What do you think about this solution?
We value your feedback to improve our textbook solutions.