#discrete-math
1 messages · Page 103 of 1
I think so.
well, I don't know the format for question posting in this group
is there any?
or I should just start describing the question
Just start describing the question. Make sure you read #rules before participating in the server though.
Okay. I am currently on graph edge improper coloring. Currently investigating case of complete graphs. I am trying to improve lower bound of t^(G) (the maximum number of colors, that graph can be colored).
I present the graph in matrice way, where in each cell I write the color of the edge connecting corresponding vertices
so the matrix symmetric
and if I want it to be improper each row and column of matrix has to be an interal
that's where i stuck, I mean, I think this problem should be famous and want to know if anyone has any info related to that.
<@&286206848099549185>
interval?
improper probably means you are given k colours, but you don't have to use all of them
@honest zodiac
improper interval coloring is where each vertex's spector make interval where numbers can be repeated. Like {1, 2, 3}, {4, 5, 6} {4, 5, 5} but not like {1, 3, 4}
so, you want to colour the edges with as many different colours as possible while the colours adjacent to each vertex are contiguous integers
well, the diameter of the graph probably is a nice lower bound, just bfs from one end, and colour edges connecting vertices of distance a and a+1 colour a+1, edge connecting vertices of distance a and a, colour a.
Assuming connected, every vertex distance a>0 would have an edge with colour a, possibly an edge with colour a+1
@honest zodiac
yes, but t^(G) is the parameter of the maximum number of colours in an
improper interval colouring of G. Ans as I am researching on total graphs your idea will result in max 1 or 2.
am I right, or I didn't get your idea
yeah if you are doing complete graphs, it wouldn't be too useful there
ah yeah, sry, complete graph 😄 total is very different from complete 😄
on page 9-11 there is a lower bound
and some kind of algorithms
but that needs still to be improved
9/11 haha
You want to check a space if it is in A or (B and C)
im confused
oh so the the intersection has to be included too?
so i check everything in that circle?
If something is in A or (B and C)
Then it's in A
Or it's in (B and C)
So yes, everything in A is in A or (B and C)
Nope, you want to check them all
The red is A
The green is B intersection C
Then, the union of both of those spaces, is anything that's in either space
A U B
Is anything that's in A or B
A U C
Is anything that's in A or C
Then, the intersection of those two spaces is anything that's in both spaces
The bottom check is in A U C
But it is not in A U B
So it is not in (A U B)∩(A U C)
yikes
The red is A U B
The green is A U C
You're interested in their intersection. That is, what's in both?
that check in between b and c?
i ma try color coding my next one
is this correct?
You're interested in whatever's in both the red and green
I know what the answer needed to be without doing any mental shenanigans, there's a way to cheat here lol. Both questions have the same answer
o-o
This is the distributive property.
A U (B ∩ C) = (A U B) ∩ (A U C)
No
A is the red
(B ∩ C) is the green
You want their union. That is, whatever's in both
i really need help with the top question
Please, an empty channel
oh the one i showed is a different question
hmm ok i think i get it a bit now although i may be circling wrong i guess
The green is B U C
ok and i circle the entire a circle for a
these two didnt match did i do something wrong?
In order to find
(A ∩ B)'
You want to find
A ∩ B
But select everything that's NOT in that @ocean viper
Oh, no you got that right
The other one. You want to identity A' and B', then check everything in both
i dont really get A^c U B^c
What's NOT in A? Check those.
What's NOT in B? Check those too.
It's hard to do these with circles because we're looking for what's NOT in the circles lol
yeah its confusing
everything that is not in these circles is the answer
but it doesnt match the first one
so idk if i got it right
Can someone help me with this problem ?
@summer gull
Weird hint. I would instead begin by finding specific and simple sets to sub in. We want to show that C is not a subset of B, what better way than letting B be the empty set?
Okay... and to clarify, the empty set exists in all sets right?
What is the overarchign set? I'm still kind of confused. Which side of the subset symbol is the bigger set?
summing from k=1 to k+1 makes no sense
that's not a good approach
[1/(1+2) + 2/(2+2) + 3/(3+2) + 4/(4+2) + ....+ m/(m+2) ] + (m+1)/((m+1)+2)
Now it is self explanatory ^
@pale epoch I have a question
It is related to the problem : https://codeforces.com/contest/1244/problem/C which was asked in a contest 3 days ago
||The crucial observation is that d wins give us the same amount of points as w draws. Let's use them to solve a problem where we want to minimize the total amount of wins and draws giving p points (if it is not greater than n, we can just lose all other matches).||
that's the crucial information they've made
I am unable to understand why
i dont get this 😦
Notice that it is alternating minus and plus @ocean viper
this is difficult :c
You are close, just need to change the exponent to something else
k-1?
parentheses around the (-1)
Yep that should work
aight
and uh
it worked
Nice catch on the () I forgot
-.-
So what it is asking is for the same summation just with using a different variable
@last sigil is that homework?
yes on the textbook they didnt have variables on the upper limbit
limit*
im not sure how to approach this
Just Google it so you can learn the method
whats the name of the method?
iirc change of variables in summations
aight thanks
Also seems to be called change of index @ocean viper
@cerulean ore d wins give d * w points and w draws give w * d points
argh
What I thought it is : wx+dy = p can be written as dx+wy = p
even though I read it 5 times
@pale epoch Did you get the rest of the part as well?
||
how can we limit y to w-1?
can you give the original problem again
i mean i could check it later, i have some other stuff to do now. but i'm sure ann can help as well
@stray reef https://codeforces.com/contest/1244/problem/C i think
Hey guys can anyone tell me good books about discrete maths?
<@&286206848099549185>
hey guys i have a question, how would i go about calculating the number of solutions to an equation with 5 variables such as (x1 + x2 + x3 + x4 + x5 = k) if each of the variables has an extra set condition (lets say x1 > 10, x2 <=5 etc)
i know the formula to calculate it without the conditions is n + k -1 over n - 1 (or however u call it in english), with n being the number of variables and k is the right side/solution of the equation
@stray reef Actually, it is more of maths than code
can someone help me with that problem?
Nvm I already figured it out
anyone got a clue how to write it out?
my homework task expects me to write it out without using set theory stuff
One example in my book:
'
Im really stuck with it, cant understand how its supposed to be written out 😶
You might be confused about the indexing
When people index like that they mean that you do it over all things
So the first one means you union over all natural numbers
@faint narwhal So thats essentially just.. ℕ?
not too well, but go on
Things like $\sum_{n = 1}^8 n^2 $
Zopherus:
Is just 1^2 + 2^2 + ... + 8^2
Well you can write this as $\sum_{n \in {1,2,\dots, 8}} n^2$
Zopherus:
As in you sum over all possible n
okay so my task is union of natural numbers AND negative versions of them?
i mean sure it makes sense now, it just is confusing since im quite new to all this stuff :p
however
i do not understand the how real numbers R comes from rational numbers Q
Think about what (a,b) means
a to b, both not included, idk the english word for _____ between them
Between them is fine
Anyways, this contains a lot of real numbers
Like sqrt(2) is in (1,2)
Correct but sqrt(2) is not a rational number
okay so what it means is, all numbers between a,b but they don't have to be the same kind as a and b are?
Yeah
Thank you, kind Sir.
got 1 more question
does it mean i can present my initial task as {-N,N}
mm sounds wrong
Yeah thats not right
Could u push me a little more :)? i suck too hard at this :S
@faint narwhal
{-n,n} is just a set of 2 elements
(a,b) is a infinite set of all real numbers between a and b
Could someone help me create functions from N to N (natural numbers) that are also one-to-one and onto
this idea of them being natural numbers is kind of confusing me
the identity function
so the question I have to answer says but not the identity function
,rotate -90
and you're asking about (a)?
yes.
yeah there are plenty of functions like that actually
you could have something like
f(n) = 2 if n=1, 1 if n=2, n otherwise
and then so a function that is neither onto or 1-1, would sin(x) be a valid answer or no, since it's mapping only natural numbers?
or part (d)
uh
you have a function from N to N
there is basically no sensible way to wrangle sine into that
not only are your inputs natural numbers, your outputs have to be natural numbers too
that's what i assumed. so what would be an example of part (d) that would fit?
a constant function
how to write it out
my homework task says: Present this witout using set theory elements
and to prove the equivalence
does your book say $0 \in \bN$ or $0 \notin \bN$
Ann:
says 0 does belong to N
then that union of yours is Z
just as you would prove any other two sets are equal
show they're subsets of each other
@stray reef I never done any of that
not really
would be super helpful if u gave some guidelines
my homework is due 30min
ok let's step back
have you ever proved one set is a subset of another set
bc if you don't even know that then there is nothing i can do in 30 mins
not in the state i'm in rn
Uhm i'm trying to write an recursive function of n+1 choose k+1.
(n+1 choose k+1) = (n choose k) + (n choose k+1)
( (n choose k) = (n-1 choose k) + (n-1 choose k-1) ) + here i'm lost, dont know if i'm even trying the right approach
it's a recursive definition of binomial coefficients
but you can make a nonrecursive definition (if you accept factorial as nonrecursive)
there's another one too, considering the factorial based definition
uhmm how do i write show the relationship of when
x_0 = 0
x_1 = rad(2)
x_2= rad(2+x_1)
so x_2 = rad(2+rad(2))
this is the question
@reef thistle Yes I buy that, I just can't see how i'm going to replace the (n choose k) with the whole thing
@weary tiger wdym
I find looking at pascal's triangle as a good way to understand that identity
It's okay I get it now 🙂
Can anyone help me with cardinality

ok
A = {x^y|x, y ∈ Z, xy = 4}
what is the cardinality of Set A
I just know the very basics of cardinality
which is why I am confused
@warped topaz how do you find elements in set A?
@weary tiger so you have n!/(k!(n-k)!) and you probably want to relate to n!/((k-1)!(n-k+1)!)
$F(x, y) = 1$
Doukutem:
this is relatively simple but I don't know how to find the sum-of-products expansion of this
could i break the right side into x + complement(x)? what happens to the y then?
ah, but you see, 1 is a product of zero variables
@humble bridge
and 1 is a sum of one product
Yes @reef thistle how many carinality of set A
Would anyone be kind enough to review my midterm practice sheet. 10 questions, and they are all finished and easy to read.. I would greatly appreciate it. I would just like to know if I missed any.
Particularly this problem
@warped topaz
The cardinality is just how many elements in the set A.
So, the question is about finding what's in set A. It's pretty clear what should be in the set, if you understand the rule that we use to build set A.
@clever nacelle
Both of those work, I like it.
Thank you! And I have a really simple questions.
Negate (b) The variable S is undefined or the data are out of order.
->The variable S is defined, and The data are not in order.
That is what I got, I was marked wrong. I feel like it was a mistake.
I agree with you
maybe they want "The variable S is defined, and The data are of order. "
and The data are not in order is two negitives
You're lucky you got 2 points lol
Maybe they were happy you knew the mod laws
Argument was good other than that number
Np. Feel free to ask if you need anything else!
Last two questions for you! Thank you for your help
(b) Simple graph with four vertices of degrees 1, 1, 1, and 4.
We must have an integer when we sum all of the degrees and divide them by 2. We do
not, therefore this is impossible. (1+1+1+4)/2 =7/2, 7/2 is not an integer. Therefore a
simple graph does not exist.
Is this correct?
Correct
And this is my last one. Did I prove Onto correctly?
@weary tiger
Wait, I do have a problem. It looks like you're implying that 3^3 × 3^3 = 3^9
Your final result didn't depend on this assumption so nbd, but that's not correct.
Your final answer didn't depend on this, so nbd
Dividing and finding the remainder was the right move
All triangles are equilateral, for Onto. Do you have to do more than prove it is in the set of R? I feel like I have more steps
@clever nacelle
f is onto (or surjective) if every element of R is an output for f
@weary tiger
You can add and multiply the same as you can in base 10. Do the carry as you'd expect
Just, 10 isn't your limit anymore, 8 is
(a,b) is notation for gcd(a,b)?
yea in
i think
horsintiawntrin
book in algebra laso uses that
but i thougth thats like the only zombie
horinstein*
or whatever his name is
Unrelated
But the reason they use that notation is because in rings, usually (a,b) will denote the ideal generated by a and b
And if a and b are coprime, then (a,b) will be the whole ring
Ring theory stuff
hey, can i get some validation/invalidation on my answers here? thanks kindly
you're wrong in number 2
inconsistent propositions are ones that the conjunction of is a logical impossibility
but their disjunction may still be true
For example, 1+1=2 and 1+1=3 are inconsistent propositions, but their disjunction 1+1=2 V 1+1=3 is true.
Yes
Where the vertices are points in the euclidean plane
And two vertices are connected if and only if they're exactly distance 1 apart
I mean sure if a graph only has one vertex then you could use less than 5 colors
But there are finite graphs where you need a lot of colors
Uh
It just means infinite because there are infinitely many vertices
It has nothing to do with how many colors you need
There are infinite graphs you can color with 1 color
There are finite graphs that you need a billion colors to color
Because
This is a special infinite graph
They're not saying that you need 5,6, or 7 colors for any infinite graph
They're saying that this particular graph needs 5,6 or 7 colors
I'm so lost in discrete math
What are you confused about?
Same with me I am lost in discrete math as well
Should I just Google problems ?
And Google their answered
Answers*
And see how they got to it?
And it's very hard to find good videos to learn
Yea
Sadly there's no "it" in discrete. There's a lot of subjects that discrete covers. Which one you mean?
I'll have to whip out my book later and dive into them
I'll come back on specific topics if I have a question
For me I am doing Logic, Proof & Sets
Just struggling to think problems through
I am confused with the laws
that we apply to prove identities
like the De Morgan law
I have super confused with A)
The cardinality of A is just how many elements are in A
So one way to do this is to simply find everything in A
Yeah
I could do simple cardinality like {1,2,3,4}
so the Z is set of intergers right?
integers yes
I am just confused about how it says x^y
then it says x and y are element of Z (intergers) and xy = 4
it's the set of all numbers of the form x^y such that x and y are integers (x, y ∈ Z) and xy = 4
also, the word "integer" only has one R
here's what i would do
ok
list out all the pairs of integers (x,y) satisfying xy = 4
then for each of those pairs
compute x^y
then write those out in a set
and that'll be A
but isn't Z infinte
Yes, but the integers that multiply to 4 are a very small list
it's not "satisfy 4"
it's "satisfy xy = 4"
x*y = 4
you want all the integer solutions of that equation
I am so confused
that's because you're overthinking it
ok Imma think from beginning
so x**y such that x and y are element of (z) integer, xy = 4
english isn't your first language, is it?
no
if you don't mind sharing, what is your first language
ok nvm
For example,
1*4 = 4
Therefore 1^4 ∈ A
Choose an x and y so that xy = 4
oh ok
Then x^y ∈ A
Yes
You want all possible solutions to xy = 4
Not x^y = 4
And, remember, this is all integers
oh
wait
2^2 isn't a solution?
oh it's x times y
A = {-4,-2,-2,-1,1,2,2,4,1}
/A/ = 6
no
the set of all (x,y) such that xy = 4 is {(-4, -1), (-2, -2), (-1, -4), (1,4), (2,2), (4,1)}
(-4)^(-1) = -1/4
(-2)^(-2) = -1/4
(-1)^(-4) = 1
1^4 = 1
2^2 = 4
4^1 = 4
A = {-1/4, 1, 4}
|A| = 3
oh ok
so you put x,y within a open bracket ()
and then you do the power of those possible solutions
then the one's you get 4 will be the cardinality
oh ok I got it now
Just wondering...when people were learning Discrete in university, did your teacher like...give examples of problems?
nope
The teacher is very hard to understand. I learn more by just reading the power point then by paying attention in clas
Okay so I'm not the only one. Just making sure. I understand the approach but sadly I need more examples to learn.
Though it seems Discrete is more about the theory, but it isn't really connecting for me (or apparently 85% of the class as we all failed the first test)
what are you doing in your discrete class?
We started with proofs and now are on number theory
we are using Mathematics for Computer Science by Albert Meyer from MIT
I think the point is that examples are generally things you can read from the textbook on your own, but explaining new topics is the hard part which is done in class
and it's super dense, very little examples
at some point a student has to come up with examples himself
it's part of the learning process
not sure if this should be that point, though
Yeah but when 90% of class fail LUL
I think something needs to be reevaluated yeah?
I'll ask a question in one of the question channels if someone has some free time to help me understand...(#help-9 )
which word are you confused about?
so
my question is asking how many subsets does B have?
B = {2^3x+y |x, y ∈ Z, −4 ≤ 2x ≤ 2, xy = 12}
it says write elements of B and then compute |P(B)|)
.
.
So first I found elements that are inside or equal to −4 ≤ 2x ≤ 2
Then I multiplied those elements to see if I got 12
Then I placed them inside 2^3x+y
is this how is goes?
that is one approach to get B, yes
what is the another approach
well, you can first find solutions to xy=12 and then check if x satisfies the other condition
Also is this right or wrong −4 ≤ 2x ≤ 2 = {-4,-3,-2,1,0,1,2,3,4}
Then I do xy= 12 right?
what do you mean
so you don't need elements from {-4,-3,3,4} to multiply together to give 12
that subset should be a set of elements that multiply with any integer to give 12
where is {-4,-3,3,4} even coming from
1*12 = 12 as well
yeah but 12 is not inside the condition −4 ≤ 2x ≤ 2
y=12
this is only a condition on x
any integer
oh ok
so long as it can be multiplied by an x to give 12
but while considering xy = 12 yeah the only constraint is that its an integer
ok
but also
since it's −4 ≤ 2x ≤ 2
what does 2 interpret
2x?
Does it mean I need to find a value inside -4 and 2 but when the value 'x' is multiplied by 2 it should still be inside the range
oh ok
so for example -3 is within the range but when it's multiplied by 2 it will be -6 which means it's not in the range anymore
yes
Alright
so x=-3 does not satisfy that condition
wdym 4
ok
so the power set of 4 will be 16
If A ∩ B = A and C ⊆ A, then which of the following is equivalent to (A − B) ∪ (C ∪ B)?
Explain your solution.
a) B b) C c) {} d) A ∪ C
What is this question trying to say?
oh ok
Yeah
but none of the laws apply to (A-B)
the laws are only for union and intersect
which is where I am having problems
@tranquil cargo so I just solve the (A-B) U (C U B) how?
let x be in (A-B) U ( C U B )
keep like
unfolding definitions
x in (A-B) or x in ( C U B )
if x in (A-B)
then x is A not B
ok
so I can use my givens and the others law (De morgan's law)
Alright
what about A-B
keep thinking
ok
A = A intersects B
so for example
let x be in A
then x is in A and B
so its just like i said
if x is in A then its in B
now
from this like
piece of information
try to solve ur problem
you got it?
so Like (A-B) would be ((AnB)-B))
ok
I am confused about '-'
here is a definition
it doesn't apply in any law
Yeah
ok use that defintion
pick an element
and try going around
see what u get
maybe u get a contradiction
or anything
just try
ok
Me again... very confused with this answer on recurrance relations and how they got the characteristic equation here:
Isn't the characteristic equation supposed to be x^2 - 4x + 3 = 0
Because the CE = r^2 - c_1*r_1 - c_2. I thought c_2 in this case would be -3
Thanks, that means they've marked the exam wrong :/
This is the rest of the question
The formula that they get at the end seems to work, which is even more confusing to me
If they derived the wrong characteristic eq, why does it work 😩
Nvm
Isn't it always true that if:
if m | z then m | z*2 iff m is a positive integer
What do you think?
im assuming i can message now
info: theres 1000 computers, 20 are broken.
question: 5 are randomly selected, P(exactly one of them being defective)
my solution: if exactly one is defective, that would be 20/1000 odds and then the other 4 would have probabilities (980/999, 979/998, 978/997, 977/996) and then i could just multiply all of these numbers together, giving me 0.01851917584 but the answer is 0.092 somehow
not sure what im doing wrong, btw logic for 980/999... bit is just that there are sequentially one fewer to choose from but we start at 980 since there are 980 good ones after the one bad one is picked
hmm
ah, but there's exactly one
how many ways to select 5 computers, one defective?
how many ways to select 5 computers?
to select 5 computers its 1000C5 ?
okay let's see carefully
actually, you are off by a factor of 5
yeah
but let's analyse it slowly
to select 5 computers, exactly one defective, how many ways?
oh i get the right answer thank you but like why is my other process wrong ?
ah
because
you were selecting with order
but you didn't consider the position you selected the defective one
you were "selecting the defective one first", where it could have been second to fifth
ahh and based off of that then for each position, there will be 999/980 * 998/979 ... combinations okayy
thank you!
How do you determine if a undirected tree is a binary tree?
If you choose one vertex as a root it’s binary another vertex would result in the tree not being binary
assuming we have the same definition of binary tree (every vertex has either 0 or 2 children) then I think you just have to
•check it’s a tree
•check that there’s exactly one root (vertex of degree 2)
•check that all other vertices are either leaves (degree 1) or have degree 3
which you can all do while executing a BFS
if you allow vertices to have any number of children ≤ 2 then it’s more complicated and I’d have to think about it
though actually I think in that case it simply boils down to checking it’s a tree where every vertex has degree ≤ 2
But its undirected that means there can be multiple roots(multiple vertexses with degree of 2)
So if there is ONE vertex
that makes it be a binary tree
then its a binary tree?
yea I think it wouldn’t matter where you start? because at every step you either find a vertex with degree 1 (leaf), degree 2 (only one child) or degree 3 (two children)
as long as you start at a vertex with degree 2
but again it depends on the definition
i.e. whether having just one child is allowed
okay just to make sure, in my case there is multiple vertexses that i could choose to make it a binary tree, but there is one vertex with a degree of three.
This would make it a binary tree
since there is the other vertexses (if chosen as root) it is a binary tree?
(it’s vertices btw, not vertexes)
also I’m not quite sure I understand your situation
if you have the following situation:
•T is a tree
•every vertex in T has degree 1, 2 or 3
then you can build a binary tree out of it by starting at a vertex of degree 1 or 2 and simply declaring its neighbors to be its children, and so on
and because of condition 2, at every step you’ll at most get two children
so it’s a binary tree
actually I guess the root doesn’t even have to be of degree 2 sorry
it could also have degree 1
This is the problem if with rn, it is a tree since its connected and not a circuit. By the things i have read, is for it to be binary, it needs to be rooted, and a rooted tree is a tree where a vertex can be distinguished from others, but thats not possible in this case?
well a binary tree has a distinguished root and often even distinguishes children into “left” and “right”
so this tree could be made into a binary tree but I suppose you could say it isn’t one per se
in particular except for b and d, any node could be chosen to be the root
would result in a binary tree yes
So by definition of Math (lol) are you allowed to just select one vertex as a root (on a undirected graph)
and from that say its a binary tree
So by definition of Math
this is very meaningless
the image above is not a well-defined binary tree because it lacks a root
if you choose a vertex to be a root, then it would define a binary tree
but choosing a different vertex gives a different binary tree
(note if you think I’m contradicting earlier statements of mine, I didn’t have enough context before to properly answer so I made a guess at what you’re asking :P)
Welp, would the best thing to do, is to argument for both possibilities ?
I’m honestly still not quite sure what the thing is you have to show
nor what “both possibilities” are
it would be best if you gave the whole problem, plus your definition of a binary tree
Well i was given that picture from above,
And this question: "The graph represents a binary tree" Explain why this is true or false.
We already confirmed its a tree.
A binary tree is a rooted tree in which every parent has at most two children. Each child in a binary tree is designated either a left child or a right child( but not both)m and every parent has at most one left child and one right child.
A rooted tree is a tree in which there is one vertex that is distinguished from the others and is called the root.
Since no vertex can be distinguished, this answer is true and false based on the vertex you choose.
Wait for it to be binary it must be a rooted tree
and definition of rooted tree is
where one vertex has been designated the root
AKA you can choose whatever vertex you wan
to make it a binary tree
I would argue that the answer is “no, because it does not have a distinguished root”
maybe with an added “however, if we chose a root, it would”
note that your definition says
A rooted tree is a tree in which there is one vertex that is distinguished from the others and is called the root.
and not
A rooted tree is a tree in which there is one vertex that can be distinguished from the others and is called the root.
so while, sure, you could choose a root, this didn’t happen, so it’s not a rooted tree, and thus in particular not a binary tree
If A ∩ B = A and C ⊆ A, then which of the following is equivalent to (A − B) ∪ (C ∪ B)?
How do I solve this
I said ( x is an element of A and x is not an element of B or x is an element of C or x is not an element of B)
is this correct
Which one?
I am confused with the subset
so the subset for example c subset of A defines
that they are equal?
How do I apply subset
C ⊆ A
Means that every element in C is also in A
Yeah
Essentially, A has all of C's elements, and perhaps more
Let's start with the other one, as that one is more important
ok
A ∩ B = A
That is, the elements common to both A and B
Are exactly the same as
The elements in A
using the laws?
If A ∩ B = A and C ⊆ A, then which of the following is equivalent to (A − B) ∪ (C ∪ B)?
Explain your solution.
a) B b) C c) {} d) A ∪ C
Anyway, you know that
A ⊆ B and C ⊆ A
Yeah
what is transitive
Like, let's say
A ~ B and B ~ C
If ~ is a "transitive" relation, then
A ~ C
If you can go from city A to city B, and if you can go from city B to city C, then ultimately you can go from city A to city C
Well, we know that A ⊆ B
What is A - B then
A - B is the set that contains the elements in A, unless they are also in B
What is A - B?
x is element of A and x is not an element of B
sorry if I am asking too many question
we know A ⊆ B so, what sort of x satisfy that?
I am confused
I'm having trouble with calculating the run time for this code
Node *head = new Node;
Node *curr = head;
head->data = 0;
head->next = nullptr;
for (int i = 1; i < n; i++)
{
curr->next = new Node;
curr = curr->next;
curr->data = i;
curr->next = nullptr;
}
for (int i = 1; i <= n; i++) {
curr = head;
while (curr != nullptr) {
if (curr->data % i == 0) {
for (int j = 0; j < n; j++) {
A[j] ++;
}
}
curr = curr->next;
}
}
I get that the first for loop is theta(n)
but for the second for loop, the most inner for loop has run time of n
for the while loop, is it also theta(n)?
@reef thistle yeah that's what I was thinking
but then the curr->data % i threw me off a bit
What I'm thinking is that it'll jsut traverse through the whole LL, so it's theta(n^2) run time?
n^3
ah, for that you should count how many times it is true. You should get 1/1+1/2+1/3+1/4+...+1/n
@mild flicker
The non-coders mustbe so confused if they'll assume this is soe kind of obscure maths notation.
Can anyone explain b to me
Ugh where's the cropped version
I don't understand how (i,j) is setup
Like [i,j,i,...]?
Or is it like x = i and y = j
it's like a 5x5 identity matrix
except the 1s and 0s aren't where you would normally put them
But how do I even know how to start
what's in the (1,1) entry
i?
Sorry I'll just Google
but you didn't
the entries are either 1 or 0 lad
apology accepted

@opal crescent so the answer is 1,1,1,1,1
00,1,00,
1,1,0,1,0
00010
10110?
I'm so lost
well 4 also
yeah so that's the j indexes on the second line where the entry should be 1
what does that give in the matrix
it just tells you where the 1s are on the second line
OH!!!!!
So there would be a 1 in the second spot
And the 4th spot
How did you know that
it's what they tell you to do idk
They never said mind multiples of 2 between 1 and 5 though
"5by5 matrix whose (i,j)th entry is 1 when j is a multiple of i__, otherwise 0"
😪
Yes hang in
On
Let me get my calculator
Ha ha!
1,2,3,4,5
So all row 1 will be 1!
yeah all 1s as you wrote before
And row 2 is 01010
yup
Row 3 is 00100
$$\begin{bmatrix}1&1&1&1&1 \ 0&1&0&1&0 \ 0&0&1&0&0 \ 0&0&0&1&0 \ 0&0&0&0&1\end{bmatrix}$$
emeric75:


it just means empty string i suppose
(and it's not an upside down y, it's a greek letter : lambda)
Does any one have some insight into this:
well there's only 16 possibilities
consider where an element can be
there's only 4 possibilities to consider
idk I didn't calculate
just simplify that
oh
Can you guide me
I have to hand this today
and I have been doing it for 2 days
A intersect B = A, so what's A-B?
AnB'
and when you use the condition A intersect B = A, can you simplify it?
well if A intersect B = A, what's A intersect B'?
what do you mean
(A intersect B) union (A intersect B') is?
okay what do you know?
what subset relations do you have?
oh
you have C and A, and something between A and B
can you show it?
I am so lost
where were you last?
wdym
what did you get?
you can simplify it further
Did you look at the sample solutions @scarlet anvil? You could also start by writing out what “a EQUIV 1 (mod p-1)” means by definition.
I have glanced at them @candid flicker. But I did want to see if I could get a little nudge in the right direction first. I didn't look at the sample solutions for this one in particular yet. I'm at work but I'll ping you later and see if you're around, perhaps you can join me in one of the #question channels.
Find the minimum number of elements that one needs to take from the set S = {1, 2, 3, . . . , 9} to be sure that two of the numbers add up to 10.
I dont understand how to approach this
problem
pigeonhole principle
1 and 9, 2 and 8, 3 and 7, 4 and 6, and 5 and 5 are pairs that add up to 10
I have no idea what to do with this info
well you need to guarantee that at least one of those pairs are in there (5&5 isn’t one btw because that’s the same number twice)
i dont get why there's even a minimum
I mean, you can pretty much pick 1 pair. doess that count as a minimum?
I dont think i understand the wording of the question
Well if I just grab 2 I could grab {5, 6} which is not 10.
oh shit, your right.
So how many more do I NEED to grab to make sure I have one of the pairs you mentioned
well i came up with 5 pairs
one of which is wrong
huh
I dont even know what is the pigeonhole and what is the pigeon (since someone pointed out this uses the pigeonhole principle)
@azure lichen Are you suggesting that we are thinking each pair as a set?
the pigeonhole principle is phrased as “if you put n+1 pigeons into n boxes, then one box will contain contain two pigeons”
but I don’t wanna go there tbh, I’ll explain the problem but then I’ll have to go back to my own homework
So the number of pigions will always be more than the number of containers?
no?
the statement is “if you have too many pigeons for the containers, then they’ll have to share”
so the point is this:
you pick some subset of {1,…9}. let’s say for example, you pick some subset with 8 elements. are there now two numbers in there which add to 10?
well, yes. you picked all but one of the numbers, so one of the pairs is in here for sure
does this also work with 7? 6?