Let S be a set of size 37, and let x, y, and z be three distinct elements of S. How many subsets of S are there that contain x and y, but do not contain z?

Jadon Stein

Jadon Stein

Answered question

2022-09-07

Discrete Math: Combinatorics and recursion
3. Let S be a set of size 37, and let x, y, and z be three distinct elements of S. How many subsets of S are there that contain x and y, but do not contain z?
(a) 2 33
(b) 2 34
(c) 2 35
(d) 2 37 2 35 2 36
(d) none of the above
Why is it B) I thought there is size 37 so it is 37 - 2 Is it because there is size 37 and for x and y; you do 37-2. but you cannot have z so you minus another 1. so 37 2 1 = 34; 2 34
12. The Fibonacci numbers are defined as follows: f 0 = 0 , f 1 = 1, and f n = f n 1 + f n 2 for n 2. Consider again the recursive algorithm Fib, which takes as input an integer n 0:
Algorithm Fib(n):
if n = 0   o r   n = 1
then f = n
else f = F i b ( n 1 ) + F i b ( n 2 )
end if;
return f
For n 3, run algorithm Fib(n) and let an be the number of times that Fib(2) is called. Which of the following is true?
(a) For n 3, a n = f n 1
(b) For n 3, a n = f n
(c) For n 3, a n = f n + 1
(d) For n 3, a n = 1 + f n
So if it is n = 3 i will call fib(2) 1 time and if n = 4 then fib(2) is called 2 times
How do I put this into an equation like above?

Answer & Explanation

Dwayne Small

Dwayne Small

Beginner2022-09-08Added 12 answers

Step 1
The intuition of the first one is fine. You can see it very clearly by doing the bijection between subsets and binary strings, there you have constant values on the position x,y and z.
Step 2
For the second one do some recursion, you have counted it to 3 and 4, if you call Fib(5), then the times you call Fib(2) is the times you called it in Fib( 5 1) plus the times it is called in Fib( 5 2). In general, a n = a n 1 + a n 2 with your basic cases, you can conclude a n = f n 1

Do you have a similar question?

Recalculate according to your conditions!

New Questions in Discrete math

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?