MATH1043 Discrete Mathematics
4. Obtain the Theta notation for each of the comp...
Jun 20, 2024
Generated Graph
Solution by Steps
step 1
Identify the dominant term in the function
step 2
The dominant term is 5nen because it grows faster than n100, 3en, and log(n)
step 3
Therefore, f(n)=Θ(nen)
# (b) g(n)=(4n−1)2(n−3)
step 1
Expand the function to find the dominant term
step 2
(4n−1)2=16n2−8n+1 and (16n2−8n+1)(n−3)=16n3−48n2−8n2+24n+n−3=16n3−56n2+25n−3
step 3
The dominant term is 16n3
step 4
Therefore, g(n)=Θ(n3)
# (c) h(n)=n2+2n+1n3log(n)+log(n)+100e−n
step 1
Simplify the function by dividing the numerator and the denominator by n2
step 2
h(n)=1+n2+n21nlog(n)+n2log(n)+n2100e−n
step 3
As n→∞, the dominant term in the numerator is nlog(n) and in the denominator is 1
step 4
Therefore, h(n)=Θ(nlog(n))
Answer
(a) Θ(nen), (b) Θ(n3), (c) Θ(nlog(n))
Question 5
# (a) Counting to come up with 2n
step 1
Consider counting the number of ways to flip n coins, each of which can be heads or tails
step 2
Each coin has 2 possible outcomes, so the total number of outcomes is 2n
# (b) Counting to come up with ∑k=0nCkn
step 1
Consider counting the number of ways to choose k heads out of n coins
step 2
The number of ways to choose k heads out of n coins is given by the binomial coefficient Ckn
step 3
Summing over all possible values of k from 0 to n, we get ∑k=0nCkn
# (c) Justification
step 1
Both parts (a) and (b) are counting the same set of outcomes (the number of ways to flip n coins)
step 2
Therefore, 2n=∑k=0nCkn
Answer
(a) 2n, (b) ∑k=0nCkn, (c) 2n=∑k=0nCkn
Question 6
# (a) Integer solutions for xi≥0
step 1
Use the stars and bars method to find the number of non-negative integer solutions
step 2
The number of solutions is given by C(30+3−1,3−1)=C(32,2)
step 3
C(32,2)=232⋅31=496
# (b) Integer solutions for x_{i} > 0
step 1
Use the stars and bars method to find the number of positive integer solutions
step 2
Let xi′=xi−1 so that xi′≥0
step 3
The equation becomes x1′+x2′+x3′=27
step 4
The number of solutions is given by C(27+3−1,3−1)=C(29,2)
step 5
C(29,2)=229⋅28=406
# (c) Integer solutions for x1≥0,x2≥1,x3≥2
step 1
Adjust the variables to account for the constraints: let x2′=x2−1 and x3′=x3−2
step 2
The equation becomes x1+x2′+x3′=27
step 3
The number of solutions is given by C(27+3−1,3−1)=C(29,2)
step 4
C(29,2)=229⋅28=406
Answer
(a) 496, (b) 406, (c) 406
Key Concept
Theta notation, Counting arguments, Stars and bars method
Explanation
Theta notation helps in understanding the growth rate of functions. Counting arguments and the stars and bars method are useful in combinatorial problems to find the number of ways to distribute objects.
Generated Graph
Solution by Steps
step 1
To show that 2n=∑k=0n(kn) using a counting argument, we start by considering the total number of subsets of a set with n elements
step 2
Each element in the set can either be included in a subset or not, giving us 2 choices per element. Therefore, the total number of subsets is 2n
step 3
Now, let's count the subsets by their sizes. A subset can have 0 elements, 1 element, 2 elements, and so on, up to n elements
step 4
The number of subsets with exactly k elements is given by the binomial coefficient (kn)
step 5
Summing the number of subsets of all possible sizes, we get ∑k=0n(kn)
step 6
Since both methods count the same thing (the total number of subsets of a set with n elements), we have 2n=∑k=0n(kn)
Answer
2n=∑k=0n(kn)
Key Concept
Counting Subsets
Explanation
We used two different counting methods to show that the total number of subsets of a set with n elements is 2n, which is also the sum of the binomial coefficients (kn) for k from 0 to n.
Solution by Steps
step 1
To find a constant solution to the non-homogeneous part, we assume an=C where C is a constant
step 2
Substituting an=C into the recurrence relation an+2−6an+1+9an=2, we get C−6C+9C=2
step 3
Simplifying, we have 4C=2, so C=21
# Part (b)
step 1
To solve the homogeneous part an+2−6an+1+9an=0, we solve the characteristic equation r2−6r+9=0
step 2
The characteristic equation factors as (r−3)2=0, giving a repeated root r=3
step 3
Therefore, the general solution to the homogeneous part is an=(A+Bn)3n, where A and B are constants
# Part (c)
step 1
The general solution to the non-homogeneous recurrence relation is the sum of the homogeneous solution and the particular solution: an=(A+Bn)3n+21
step 2
Using the initial conditions a0=1 and a1=3, we substitute n=0 and n=1 to find A and B
step 3
For n=0: 1=A⋅30+21⇒A+21=1⇒A=21
step 4
For n=1: 3=(A+B)3+21⇒3=(21+B)3+21⇒3=23+3B+21⇒3=2+3B⇒3B=1⇒B=31
step 5
Therefore, the particular solution is an=(21+3n)3n+21
Answer
an=(21+3n)3n+21
Question 8
# Part (a)
step 1
K2,1 can be drawn as a straight line with 3 vertices: a, b, and 1
step 2
Euler's formula for planar graphs is V−E+F=2. For K2,1, V=3, E=2, and F=1
step 3
Substituting, we get 3−2+1=2, which holds true
# Part (b)
step 1
K2,2 can be drawn as a square (or diamond) with vertices a, b, 1, and 2
step 2
Euler's formula for planar graphs is V−E+F=2. For K2,2, V=4, E=4, and F=2
step 3
Substituting, we get 4−4+2=2, which holds true
# Part (c)
step 1
To prove by induction that K2,m is planar, we start with the base case m=1 and m=2, which are planar as shown in parts (a) and (b)
step 2
Assume K2,k is planar for some k≥2
step 3
For K2,k+1, add one more vertex to the group of m vertices and connect it to a and b
step 4
This does not introduce any crossings, so K2,k+1 is also planar
step 5
By induction, K2,m is planar for all positive integers m
# Part (d)
step 1
K2,m can be drawn with vertices a and b connected to 1,2,…,m without any crossings
# Part (e)
step 1
If m is odd, there is no Euler tour because each vertex must have an even degree for an Euler tour to exist
# Part (f)
step 1
If m is even, there is an Euler tour. One possible path is a→1→b→2→a→3→b→4→…→a→m→b
Answer
(a) Euler's formula holds for K2,1. (b) Euler's formula holds for K2,2. (c) K2,m is planar by induction. (d) K2,m can be drawn without crossings. (e) No Euler tour if m is odd. (f) Euler tour exists if m is even.
Key Concept
Recurrence relations and planar graphs
Explanation
The solution involves finding particular and general solutions to recurrence relations and verifying properties of planar graphs using Euler's formula and induction.