#
代做CIT 592课程作业、Python，Java，c/c++程序设计作业代写、代写data留学生作业
帮做R语言编程|帮做Java程序

CIT 592 Spring 2020 Homework 1

YOUR NAME HERE

YOUR PENN EMAIL HERE

1. [10 pts] Jack and Jill want to rent separate apartments on the third floor of a new building

by the river. The building has nine apartments available, numbered 301, 302,. . . , 309. The

odd-numbered apartments have a river view, and the even-numbered apartments do not. Jill

will only rent an apartment with a river view, and Jack does not care about the view.

How many distinct possibilities exist for the pair of apartments they end up renting?

Solution.

YOUR SOLUTION HERE

2. [10 pts]

(a) A number n ∈ N is called perfect if the sum of all of n’s factors other than n itself is equal

to n. For example, 6 is perfect because its factors are 1, 2, 3, and 6, and 1 + 2 + 3 = 6.

Prove that there are no perfect prime numbers.

(b) Let m, n ∈ Z

+, and suppose that m is a factor of both n and n + 1. Prove that m = 1.

Solution.

(a) YOUR SOLUTION HERE

(b) YOUR SOLUTION HERE

Homework 1 CIT 592 2

3. [10 pts] n ≥ 2 distinguishable Hogwarts students participate in Professor Snape’s experiment.

Each student is given one of three concoctions: potion A, or potion B, or a mixture of the two.

Snape makes sure to give a different concoction to each of Harry and Hermione. In how many

distinct ways could Snape have distributed his concoctions?

Solution.

YOUR SOLUTION HERE

4. [12 pts] Prove that for all odd integers x and y we have 8 | x

2 − y

2

.

Solution.

YOUR SOLUTION HERE

5. [8 pts]

(a) Give an example of three distinct (no two are the same), nonempty sets A, B, C such that

• there are elements that are common to A and B;

• every element of A that is also in B must also be in C;

• there are elements in A that are not in C.

(b) Let A be a finite set such that {∅} ∈ A and {∅} ⊆ A and |A| = 2. List all the subsets of

A. Justify your answer.

(c) Consider the sets A = {1, 2, 3}, B = {x

2

| x ∈ A}, and also C = {x+y | x ∈ B and y ∈ A}.

List the elements of A ∩ C. Show your work.

(d) Give examples of three sets A, B, C ⊆ {1, 2, 3, 4, 5, 6, 7} such that A and B are disjoint,

A \ C = {1, 3, 7}, B ∪ C = {2, 4, 5}, |A| = 5, and B \ C 6= ∅. Show your work.

Solution.

(a) YOUR SOLUTION HERE

(b) YOUR SOLUTION HERE

(c) YOUR SOLUTION HERE

Homework 1 CIT 592 3

(d) YOUR SOLUTION HERE

6. [10 pts] Let A = {2, 3}, B = {3, 4}, C = {2, 3, 4}, and S = A × 2

B×2

C

. Answer each of the

following questions. Explain your answers.

(a) (2, {(2, {2})}) ∈ S ?

(b) (2, {(3, {4})}) ∈ S ?

(c) (2, {({4}, 4)}) ∈ S ?

Solution.

(a) YOUR SOLUTION HERE

(b) YOUR SOLUTION HERE

(c) YOUR SOLUTION HERE

7. [6 pts] EXTRA CREDIT CHALLENGE PROBLEM

We have a bag filled with 110 marbles, where 55 of them are blue and 55 of them are red. Every

turn, we remove 2 marbles from the bag. If the two marbles are of the same color, we remove

the two marbles but add a red marble into the bag. If the two marbles are of different colors,

we remove the two marbles and add a blue marble into the bag.

What is the color of the last marble in the bag?

Solution.

YOUR SOLUTION HERE