• Hey, guest user. Hope you're enjoying NeoGAF! Have you considered registering for an account? Come join us and add your take to the daily discourse.

Anyone able to help me with two discrete math probs?

Status
Not open for further replies.
So I have this assignment to do for Discrete Mathematics and I'm not sure how to do two of the problems. IF anyone can help me out, I would greatly appreciate it.

Here are the problems:
4. Let A = {a, b, c, d, e} and B = {a, b, c, d, e, f, g, h}. Find
c. A – B
A – B = {a, b, c, d, e} – {a, b, c, d, e, f, g, h} = ?


12. Let A and B be sets. Show that
a. The union of A and B is the subset of A.

Edit: Going to sleep. Will check back in the morning!
 

BuddyC

Member
A-B is {f, g, h}, as the {a, b, c, d, e} in A would subtract from the same set in B, leaving the remnants behind.

Look at White Man's post for 12, he's got it.
 

White Man

Member
12. Let A and B be sets. Show that
a. The union of A and B is the subset of A.

I believe the only way this could be true is:

Let A = {A, B, C, D}
Let B = {B, C}

Either that or the wording is screwey.
 

GG-Duo

Member
Man, it's been a while.
I thought the second one was false, and then for a while thought it was true and tried to prove it, and then realized how horribly wrong i was :/

sheesh, and this is basic stuff.
 

Dilbert

Member
GG-Duo said:
1.) {}
http://mathworld.wolfram.com/SetDifference.html

2.) check your wording. that's only true if B is an empty set or a subset of A.
The answer for #1 sounds right. There is nothing in A which is not a member of B.

As for #2: That statement about A union B being a subset of A is NOT true for arbitrary sets A and B. It's only true if every member of B is also a member of A, or if B is the empty set. So, I don't think I understand the problem...
 
Thanks for the help with the first problem. I wasn't 100% sure if {} was the answer because my professor didn't actually go over most of this stuff.

About the second question. I made a mistake, it should be:

12. Let A and B be sets. Show that
a. The intersection of A and B is the subset of A.
 

Ecrofirt

Member
Hey, I've got an answer for your problem #12.

First thing I'm going to do is make symbols for intersection, subset, and element.

є = element
Δ = intersection
Θ = subset

AΔB Θ A
Proof:
Let x є AΔB. Then x є A, and x є B. In particular, x є A. Now x є AΔB implies x є A. So AΔB Θ A.

The proof worked in my logic class.
 
Well, I got another assignment and there are some problems that I do not really understand. If anyone can help me, please do:

4. Find the domain and range of these functions.
a. the function that assigns to each nonnegative its last digit.


b. the function that assigns the next largest integer to a positive integer.


c. the function that assigns to a bit string the number of one bits in the string.


d. the function that assigns to a bit string the number of bits in the string.


N is the set of all natural numbers
Z is the set of all integers
Q is the set of all rational numbers
R is the set of all real numbers

16. Give an example of a function from N to N that is
a. One-to-one but not onto.
An example of a function that is one-to-one but not onto is f (n) = n3 + 5.


b. onto but not one-to-one.
An example of a function that is onto but not one-to-one is .


c. both onto and one-to-one (but different from the identity function).
An example of a function that is both onto and one-to-one (but different from the identity function) is .


d. neither one-to-one nor onto.
An example of a function that is neither one-to-one nor onto is


24. Let f (x) = 2x. What is
a. f (Z)?

b. f (N)?

c. f (R)?
 

Dilbert

Member
Gotta run out and get some coffee, so here are some quickie answers. "Domain" is the "goes into" of a function -- the values on which the function operates. "Range" is the "comes out of" for a function -- the values which the function yields.

crimsonheadGCN said:
4. Find the domain and range of these functions.
a. the function that assigns to each nonnegative its last digit.


b. the function that assigns the next largest integer to a positive integer.


c. the function that assigns to a bit string the number of one bits in the string.


d. the function that assigns to a bit string the number of bits in the string.
a. The function only works on certain kinds of numbers: those which are non-negative, and those which have a last digit. So, by definition, we cannot include irrational numbers. Where this gets hard is how to consider rational numbers. Some rational numbers -- say, 8/5 -- can be written as non-repeating decimals (1.6). Other rational numbers -- say, 10/9 -- can only be written as infinitely repeating decimals, which by definition do NOT have a last digit. Also, fractions don't have a "last digit" unless you convert them into a decimal. So, I would say that the domain is non-negative integers. The range would be the set of all possible last digits: {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}

b. There is no detail about what algorithm is used to "assign" the positive integer. But, it's clear that the doman is all integers, and the range would be positive integers.

c, d. What the heck is a "bit string" in discrete math? (Is this a pure math class, or math applied to computer science?) If you mean the binary representation of some arbitrary number, then I don't know how you'd write the domain. All bit strings are comprised only of 0s and 1s, so it might be tempting to say that the domain is {0, 1}. However, there is a difference between, say, 1011 and 1100, since they represent different values. The range for both functions would seem to be all positive integers. All bit strings must have at least one 1 in them, and there cannot be a 0-bit string by definition -- what would you output? The upper limit on the range would depend on the length restriction for the bit string -- clearly, for an n-bit string limit, the output value of each function can be no larger than n.

N is the set of all natural numbers
Z is the set of all integers
Q is the set of all rational numbers
R is the set of all real numbers

24. Let f (x) = 2x. What is
a. f (Z)?

b. f (N)?

c. f (R)?
a. The set of all even integers (both positive and negative): {..., -4, -2, 0, 2, 4, ...}
b. The set of all even natural numbers: {2, 4, 6, ...}
c. R

Hope these are right...I'm not quite awake yet. :(
 
Those were right, but I found out the answers before I even looked here again. IThe answers just came to me after I logged off and look at the problems again.

Also, this discrete math course is for mainly computer science students.

Thanks for the help though
 
Status
Not open for further replies.
Top Bottom