#discrete-math
1 messages Β· Page 122 of 1
so if g o f is injective then g(f(x))= g(f(y)) right, so that means both the output are the same for f as well, well x = y I mean
so if g o f is injective then g(f(x))= g(f(y)) right
no
the definition of $g \circ f$ being injective is as follows:
Ann:
$(\forall a_1, a_2 \in A)[(g \circ f)(a_1) = (g \circ f)(a_2) \to a_1 = a_2]$
Ann:
A here is, of course, the domain of g . f
Mhm
don't "mhm" me. i'm trying to point out that you left out crucial details
anyway w/e
you need to show that f is injective
that is, for any two points a_1, a_2 β A, if f(a_1) = f(a_2), then a_1 = a_2.
you know how to prove if-then statements, right?
there's almost like a template. a standard opening line to write at the beginning of the proof of a statement of this form
or rather, you'd first write the standard opening line for the proof of a "for all" statement
Yea I think
@fossil pewter Hi. Is the condition for an ith box applied to all boxes or a single box?
All boxes like first box should have atleast 1 ball
And 5th box should have atleast 5 balls
Alright.
Let a[k] = 3k+2. Find the sum a[1] + a[2] + ... + a[200]. is the answer to this 60700? im not sure if im getting it correct
@uneven mirage yes
@weary tiger ty what site is that?
i just searched for a summation calculator
Math explained in easy language, plus puzzles, games, quizzes, worksheets and a forum. For K-12 kids, teachers and parents.
awesome tysm
@weary tiger if letters can be repeated then yea
if it cant be repeated then i'd just use the permutation formula?
@near prawn
is this right?
2 * 7 * 7 * 7 * 7 * 5
since there are 2 vowels, and 5 consonants?
if repetition is allowed then yea
thanks!
actually idek if they can be repeating
i might have read the directions wrong lmao
@uneven mirage There is a nice way to determine the general formula for that sum:
$\sum_{k=1}^{n} (3k+2) = \sum_{k=1}^{n} 3k + \sum_{k=1}^{n} 2 = 3 \sum_{k=1}^{n} k + 2n = \frac{3n(n+1)}{2}+2n$
Abhijeet Vats:
Don't memorize it, of course. Just understand the general principles.
@weary tiger From what I can see, your string should make use of all 7 letters listed in the set. Furthermore, it should begin with a vowel and end with a consonant. The set of vowels in that given set is just {a,e}. Repetition is not allowed because you have to use all 7 letters.
you aren't. these terms really do grow that massive
Oh okay, Tyvm
In how many ways is it possible to partition a set of 2n elements, into n sets of 2 elements?
hey i'm a psych grad so my knowledge reg. math doesn't go much further than stats, but i have a friend who sent me an equation with no context and i've worked out that it's discrete math and now i'm here. Anyone mind pointing me in the right direction as to how i should go about learning how to solve this? β€οΈ
that's all i've got to work with
plz show me how i can use logical reasoning to solve that
^sry just seen your next msg
right
right
i'm here btw just writing this down as you explain β€οΈ
so far yes just re-reading and organising my notes
{} not []
\ not /
also the elements in a set need not be numbers (even if in this particular problem they are)
anyway
A \ B can be informally described as "everything that's in A but not in B"
which i think is a better description than "like a list minus"
thankyou
@outer perch did u figure it out
not yet but i think i'm omw
what do you have atm
||(2n)!/(2^n n!), no?||
yea
Yeah no idea, care to explain what is each term?
theres several ways of doing this
first we can arrange all 2n items in a row
how many ways can we do that in?
yea
now imagine theres imaginary lines separating the 2n items into groups of 2
those are your subsets
but since the order of each of the 2 items within a subset dont matter we have to divide that out
and the position of each subset in the row also doesnt matter so we also divide that out
2^n is each subset ?
no
ok i got it
i can't get this and it's the second week of the semester i'm gonna cry
thanks btw
you could also pick a random element and pick its partner in 2n-1 wyas
pick another element and pick its partner in 2n-3 ways.... so on
so its (2n-1)(2n-3)(2n-5).....5 * 3 *1
which is the same
@outer perchwait so did u get it or na
Yes
@fossil pewter Hello. There is no simple formula for the problem whose answer you seek.
The oracle has spoken.
The result involves counting ordered sets by summing products of binomial coefficients over integer compositions where the size of each part is restricted depending upon its position.
@fossil pewter
Indeed I realized the answer would be really nasty because for a simple case like R different balls in N boxes without empty boxes already gives us a hefty series.
Thank you for trying @lyric pumice
cant you use inclusion exclusion?
@near prawn I'm not sure.
@fossil pewter @fossil pewter It appears that there may be a general formula using the principle of inclusion-exclusion, but then it must be very complex.
I can attempt a derivation.
I would not recommend lol
It would be a worthwhile pursuit.
A recursive sequence is given by the following rules:
a0 = 1, a1 = 2, an = an-1 + 2an-2 + 1 for n>1
Evaluate a2, a3 and a4.
can someone check my answer i believe it is
a2 = 5
a3= 10
a4= 21
$a_n = a_{n-1} + 2a_{n-2}+1$?
Ann:
or is it a2=3, a3=6, a4=11 ?
no, you had it right the first time around, assuming my transcription of your recursive thing was correct
@stray reef ty
I want to show that $2^{n+1} is O(2^{n}).$. I started with $2^{n+1} \leq{2^{n} + 2^{n}}$
presmo:
how can i continue from here
what's your definition of O(2^n)
Its the big O notation
Algorithmic complexity in other words
I have to show that |f(x)| <= C|g(x)| forall x > k
where g(x) is 2^n and f(x) = 2^n+1
Can i do $2^{n+1} \leq{2^{n} + 2^{n}}\leq{2^{n}(1+1)}\leq{2^{n}*2}$
presmo:
yes, all of those can also be = signs
oh right, tyvm
they just collected like terms?
pog ty
if im using warshall's algorithm to compute all the paths between towns, i.e. town a b c d e f, and i want to find all the distinct pairs that have a path containing 3 distinct streets is that matrix 3 of warshall's algorithm i.e. 3 possible intermediates?
in this case that matrix seems to match the transitive closure im not sure if thats right considering the path (a, b) is in the relation so it doesnt have intermediates
also how do i do warshall's algo by hand
itβs a pretty tedious algorithm to do by hand (yay O(nΒ³))
but uh, you give each node a number (or letter I guess, as you did)
then you make a table with a row and a column for each node
put a 0 on the main diagonal, a 1 between any neighbors and β anywhere else
then you make a new table, which now allows βaβ as an intermediate node
for each cell (x,y), check which of these is smaller: the entry in the same cell on the previous table, or the entry (x,a) plus the entry (a,y)
repeat that until you run out of things to add
obviously you can shortcut things (e.g. 0s, 1s and 2s will never be improved so you only have to check things with a 3 or higher)
but itβs tedious af anyway
dam
and what about that first part of my question, how do i determine from matrix 3 of warshall the ones that have 3 distinct towns in their path
Hey guys! I've been trying to wrap my head around a problem involving 7 digit numbers, as I'm preparing for my discrete math final exam
The problem asks: how many 8-digit arrangements can you have, with each digit ranging from 0-9, such that the sum of all digits in each arrangement equals to 16οΌ
Any help would be greatly appreciated!
you can turn this into an equation maybe
@neon thorn so in a way, manipulate it using inclusion exclusion?
@near prawn the concept described by disc?
erm no
I dont think inclusion exclusion is the way to go, sounds tedious
what I meant was writing the digits as
x1+x2+x3+.....x8=16 where 0<=xi<=9
and then finding the number of sols of that

hm
Would that not take a while to solve, given the sheer amount of params?
finding the number of integer solutions to that equation is straightforward
Oh sorry, was directing that at Lemon
it's the same as the number of eays of distributing 16 identical objects into 8 distinct boxes
with those conditions applied
How come would they be identical?
Yeah, 16 has multiple ways it can be broken down no?
its identical cuz u can just imagine the 16 as 16 identical 1s and group them into boxes
where each box is a variable
Oh this is stars and bars, isn't it?
Oh wait, no it doesn't since no number can be 10 or higher
You can always just get rid of those cases, I suppose
yea I said with conditions 0<=xi<=9
The number of ways to write n as an ordered sum of r numbers is:
(n+r-1)Cr
That's a common form we use a lot, it's worth remembering. That being said, I just had to look it up. I'm feeling very slow today.
Actually, you can't use 10 or higher, can you?
no cuz it says 8 digit arrangements
So it's just 23C8 right?
I'm having a slow brain day D:
Wait no you can't have a 0 as the leading digit, can you?
Oh cool so yeah that's the answer in my "expert" opinion. @near prawn Am I doing a dumb?
0 as a leading digit is included
erm
pretty sure inclusion exclusion is involved here
cuz of the upper bounds
that answer over counts
but it's fine cuz a max if 1 digit can be >9
So we have to somehow eliminate digits larger than 9?
Oh fk yes you can have those. We have to count the cases with a 10, ect
Oof, how would that work? Because I haven't worked much with something of the sort rip
Luckily we can do that pretty easy. Let's say there's a 10 in the number. The other 7 digits then must sum to 6
How many ways can 7 digits sum to 6?
A heck ton
Hmm, lemme see
Or am I wrong?
Wait big dumb
My brain's not working xD
Yeah everybody has a day off today it seems lol
The number of ways to write n as an ordered sum of r numbers is:
(n+r-1)Cr
Oh right
In this case, to use 7 numbers to sum to 6:
(6 + 7 - 1)C7
12C7
So 792 ways
But I'm leaving something out. There's 8 different places that 10 could have appeared. So it's actually 8 times that many.
These steps make sense?
Ohhhh
Right right
Right, so we subtract 8*792 from 23C8 to get the total amount of combinations excluding ones with 10
Exactly, you've got the idea!
And we repeat this with every number greater than 9 that is smaller or equal to 16
Yeah it's a bit of work at this point, but I don't see an easier way
It's worth knowing the stars and bars method in general. It handles combinations with repetition
Mhm
So, just to be clear
I'm looking at my textbook
And the principle is described as
The formula in the box
Is that the specific formula we're using?
Because (n+r-1)C(r) doesn't follow that format
The number of ways to put n similar balls into r distinct bins is (n+r-1)Cr
So it's a different concept?
Your book says
(k + n - 1)Ck
Same formula
So think of it this way:
You have 16 balls and 8 bins. How many ways to put them in?
(16+8-1)C8
The bins end up being the digits of your number, and the balls ensure they sum to 16
Ahhh
Which is why this also describes the number of ways to take r numbers that sum to n
Cool cool, glad it makes sense. I was having trouble with it like 10 minutes ago lol
Yeah, I'm in a long car ride and my head can only take so much as well hahaha
how can i use a transitive closure to determine this: "show all pairs of distinct towns that have a path containing three distinct streets"
also how am i supposed to draw big hesse diagrams? i have a relation with like 30 relations and the set upon which the relation is is a powerset containing 16 elements i cant draw it neatly what kind of shape do i draw
also also (sorry for all the questions just answer any of them) how do i show the equivalence class for this relation {(x, y) | xy >= 0, x and y are integers} currently I have something like {a element of integers | a >= 0}
is this right
7 choose 4
yes
Hello
If I suppose 3 | (n^3 - n)
Does 3 divide n^3 - n + 3n^2 + 3n
Nvm, just typing it out I realized that every term is a factor of 3
nice
Alrihgt I have a question about Regular expressions
I have to create a regular expression with those three conditions
i forgot the mathy/CSy notation for regexs, but in practical applications, this regex works:
[Aa-z](\-?[a-zA-Z]+)*
how do i show the equivalence class for this relation {(x, y) | xy >= 0, x and y are integers} currently I have something like {a element of integers | a >= 0}
x is related to y only if xy is positive. That only happens if x and y are both positive OR if x and y are both negative.
@weary tiger
Those are your two classes. All positives are related to eachother, and all negatives are related to eachother.
how do i write that im confused about notation
Depends on what your teacher wants. I just wrote it above in English
he wants like a set builder thingy probably
"algebraic"
english definitely wont be right
Oh fk I missed something. Everything is related to 0, and so this is not transitive and not an equivalence relation.
Not if y = 0
Exactly, that. If the question said > and not β₯ that would fix it
ok let me hit you with the real hard one though
im like 99% sure this one is an equivalence relation
{(a, b) | a and b were born in the same year, a and b are students in the US}
how are the equivalence classes written
Is that an "and" or an "or"
such that?
which thing
(a, b) such that a and b were in the same year and a and b are students in the US
its an and
gotchaa
yeah its an and
so then the classes
how's that written
like [a] = {x | x was born in the same year as a AND is a student in US}?
@weary tiger
Wait, what's the set that this relation is on? Is it the set of all students? Then this is not an equivalence relation, because non-us students aren't related to themselves
thats all i was given
'{(a, b) | a and b were born in the same year, a and b are students in the US}'
my teacher rushes through shit so fast
maybe the second part is the set
so the set of all US students?
and then they're related via birthyear i suppose
this homework is so poorly written
If it is the set of all US students, then it is an equivalence relation. But yeah you'd need to know the set that this relation is on
Well, two students are in the same class if they were born in the same year
but how is that written im just not getting the
notation
equivalence classes are sets right?
so how would that be written in set builder notation
would i just copy the condition
[a] = {x is a student in the US | x ~ a}
[b] = {x is a student in the US | x ~ b}?
alrighty
im just gonna put that down and move on
my teacher is absolutely trash
thanks for your help sorry if i sound stupid
Lol no, you clearly get the ideas
i like to think so
some of this stuff is pretty interesting if i were actually learning it correctly
can you help me with another question while you're here?
its about transitive closure/warshall algorithm
Yes, all of the best structure stuff uses equivalence relations. Get this down and you'll be doing some cool quotient stuff
basically im given this set {A, B, C, D, E, F} and im asked to find the pairs of distinct towns that have a path containing three distinct streets
so im assuming one of the matrices of warshall tells me that information
since there'd be 6 and each one is another intermediate step or something
like no intermediates, 1 intermediate,....
but i dont get how to read it because matrix 3 has a path that is a direct path so clearly does not have 3 nodes in between
because its uh
cumulative or whatever
it builds from the last matrix
let me just tell you the relation maybe we can bullshit this and just let it directly
{(A, B), (A, C), (B, D), (C, B), (D, C), (D, F), (E, C), (E, F)}
my answer is that only (A, F) has a path containing three distinct streets
once i drew out the directed graph of that relation and traced my finger along each thing that seemed to be the only one
A->C->B->D->F
(A, C), (C, B), (B, D), (D, F)
What on earth is the question? Lol
ikr
jesus man this homework
and he has this one question where im expected to draw a hesse diagram with 16 elements and like 40 fucking relations
and i am "absolutely not allowed to have any extra space besides the designated area" which is microscopic
yep
so if you take streets to mean edges
then i think (A, F) is the only one with three distinct streets between A and F
well i guess thats 4 actually...
ugh
so then A->B->D->F
thats three streets (A, B), (B, D), (D, F)
isnt there a way to use warshalls algo to figure this out?
i mean that's what its doing right its building all of the paths with no intermediates, then all of the paths with 1, ....?
to reiterate, am i on the right path? this seems long
Hello, I'm new here. I was just working through a problem and I think I have the answer but I'm looking for another opinion
I have worked it out to 1/(n-k+1)!-(n-k+1)!
what's the original problem
The picture
Um sorry I'll delete the other one, I just didn't know which channel to ask in
anyway
uh
all the picture contains is an expression
what are you asked to do with it
The textbook says to "compute each expression"
can you take a pic of the textbook where it lists the problem
so that we don't have to keep playing broken telephone
So the form is says to use for these types of problems is n!/n!(n-r)!
i can tell you for sure that this doesn't equal $\frac{1}{(n-k+1)!} - (n-k+1)!$ though
Ann:
yeah, and that is why i think it is 1/0
this particular problem is not in the answer key, sorry.
it's weird how you're asked to ""compute"" this and not, say, "simplify" or "rewrite w/o factorials"
Yeah, let me show you another snip, you don't mind do you?
This is how I came up with n! / (n-k+1)!(n!-(n-k+1)!), with that wouldn't the n! in the numerator and denominator cancel, since we are technically multiplying these expressions?
n! / (n-k+1)!(n!-(n-k+1)!),
bad
What do you mean "bad"? Isn't that the form it should be in to continue working it?
it's just bullshit, is what i'm saying
Hey anyone active in here I think I have a fairly simple question

Okay its about pascal encoding,
would the length part of the string be the number of bytes or characters?
oh wrong place maybe
Hello @weary tiger
seems so?
how could i remove the transitive relations from a binary matrix?

ok i think i figured it out
you use the square of the binary matrix and if there's a corresponding non-zero value you set the value to 0
im tasked with drawing the hesse diagram for {(a, b) | a subset of b and a and b are subsets of {1, 2, 3, 4}}
so then i calculated the binary matrix relation from the powerset given that a is a subset of b, then i remove all of the reflexive relations (just zero out the diagonal), and finally i remove the transitive relations by finding the square of the matrix and if the i-th row and j-th column are non-zero in both the square of the matrix and the matrix itself then the value is set to 0
and now FINALLY i can draw the stupid diagram which is going to be a disgusting web of 16 nodes
and im a horrible artist
so now my question to all of you is how do i draw a 16 node directed graph? i dont get how to organize these graphs so they're clean
do i use some sort of 16-gon shape or something?
i realize now that there's a pattern here where the relation will always be to all sets with exactly 1 more element :/
all that work
Why is n^(1/10) big O of (log2(n))
if I plot both, the log function is an upper bound on the exponent function
nah n^1/10 gets bigger eventually
here 
to convince yourself n^c always beats log, try to think about how they increase at really big numbers
like from 2^100 to 2^101, log increases by 1
but n^1/10 gets multiplied by (2^100)^(1/10)=1024 nvm it gets multiplied by 2^1/10, close enough
Ahh I see, thank you
Hey guys, I'm having a hard time following the explanation given by this practice test
The following questions involve preparing lunches for your 4 kids using 6 different types of fruit (apples, oranges, bananas, kiwis, pears and mangoes).
Why is it that we have 5 * 4 permutations when we pick 3 apples?
oh wait
Now that I think about it, I just figured it out hahaha
big brain
np
would anyone mind helping me with this
i dont understand the reccurance relation a_n found
where does 2^(n-2) come from
$(n \geq 1) $
presmo:
Compile Error! Click the
reaction for details. (You may edit your message)
can someone help me proving by contradiction that there is no largest rational number
What have you tried?
@charred cargo
I assume that there is
that would mean that if T is the largest rational number then it would be greater than x/y and x and y can be any number
$y \neq 0$ and $T \geq \frac{x}{y}$ for all rationals $\frac{x}{y}$
Abhijeet Vats:
Go on
yes?
And is T+1 > T?
Yes. So, by your hypothesis, $T \geq T+1$. That's a contradiction.
Abhijeet Vats:
Understand?
The idea is that T+1 is rational, so $T \geq T+1$, which is exactly your assumption. But that's a contradiction, since T < T+1
Abhijeet Vats:
Ffs
Then, it remains to be proven that T+1 is actually rational. This is a relatively simple thing to do and I'll let you do that on your own.
@charred cargo Sure, ask away. I'll answer if I have time lol
one sec
alright
so since im only just now getting past the first one
ill post the question
then try to solve it then when i get stuck you can pitch in
thank you
"Using the method of proof by contradiction, prove that if a
product of two positive real numbers is greater than 1,000,000, then at least
one of the numbers is greater than 1000."
Okay.
Actually, let me give you a bit more to deal with.
Consider the product of two positive real numbers $r_1 r_2$. Let that product be greater than a number $m$. Then, prove that at least one of the numbers is greater than $\sqrt{m}$.
^Prove this instead.
It's the same problem
but i can atleast learn
Abhijeet Vats:
But alright, explain what you have
ok so the statement is if (a+b > 1000000) then one of the numbers is greater than 1000
product of two positive real numbers
the contradiction would be that if (a+b > 1000000) then none or both of the numbers is greater than 1000
right?
No! You're being asked to show that $ab > 1000000 \implies a > 1000 \lor b > 1000$
Abhijeet Vats:
product of two positive real numbers
You used a+b
oh
the contradiction would be that if (a*b > 1000000) then none or both of the numbers is greater than 1000

You're asserting that at least one of the numbers is greater than 1000. That's the assertion being made by the question. So, you begin by assuming that neither is greater than 1000
That's the start of your proof by contradiction
if (a*b > 1000000) then (a < 1000 and b < 1000)
?
Okay. I'm going to spell this out for you. Make sure you tell me if you're not understanding anything:
Let $a,b \in \bR$. $a \cdot b > 1000000 \implies [a > 1000 \lor b > 1000]$.
So, you assume that $a<1000$ and $b < 1000$.
Abhijeet Vats:
What do you do from there?
What? Is this proof by contradiction or?
if (a*b > 1000000) then (a < 1000 and b < 1000)
This is what you wrote. It changes the entire assertion being made. Typically, we don't change the implication when we use proofs by contradiction.
Yes, this is a proof by contradiction.
Anyways, kozzmic, continue.
Where is the problem btw?
Scroll up.
\sqrt{m}?
"Using the method of proof by contradiction, prove that if a
product of two positive real numbers is greater than 1,000,000, then at least
one of the numbers is greater than 1000."
Are you looking for a solution?
Kozzmic is attempting the question.
How do I delete the bot's input?
Click the red bin icon
Umm okay, so you were not looking for a solution?
Kozzmic is the one who's showing their proof to me. So, we're waiting for them to show it.
Kozzmic, that doesn't prove it generally.
okay, lol.
Sure, if you try all of them, then that would definitely prove it. But there's a faster way to do it that doesn't involve trying all of them.
you tutoring him?
No. Just assisting with the problem.
Generally, we don't give out answers in this server. For me, I write full proofs only as an illustration for someone getting into proofs.
You've assumed that a<1000 and b<1000
What can you say about the products of those two numbers?
i could show that 1000 * 1000
is 1000000
so any a or b less than that cant get that high
i think i said that wrong
In other words
do you get what im trying to say
yes
Do you see why that's a problem?
Do you see why ab<1000000 is a contradiction?
Good
So you've proven the result
And what I was trying to get at earlier is that there's a more general result here:
$ab > m \implies [a > \sqrt{m} \lor b > \sqrt{m}]$
Abhijeet Vats:
ive got another question
just give me a sec to write
i'll ping you if you are willing
Sure.
@sleek swallow
u there
what does this mean
f : R+ οΏ½β RR>2
nooo
where did you goo
That's just a function that maps the elements of one set to the other set. Both sets, in this case, have been specified.
$\bR_{R > 2} = {x \in \bR: x > 2}$
Abhijeet Vats:
I mean, I assume that that's what it means. It seems like a reasonable assumption. I've not seen that notation being used in the books that I use.
I dont understand how that would relate to the equation though
i can prove that the equation is one to one using a horizontal line test on the graph
Well, note that $\sqrt{x}$ is only defined when $x \geq 0$. Furthermore:
$\sqrt{x} > 0$
$2+\sqrt{x} >2$
Abhijeet Vats:
Now, keep in mind, you're considering only the positive real numbers. 0 is not a positive real number, which is why $\sqrt{x} > 0$.
Abhijeet Vats:
Since domain is positive real numbers, the corresponding range is unique for given FE, and for range= codomain.
so, bijective.
so basically i just have to prove that the function is bijective
Lmao that is precisely the question.
You're being asked to show that it is injective and surjective. In doing so, you can show that it's bijective.
That 'R stuff' is important.
or is there a more discrete math way to do this?
? Discrete math way?
Wait, which level problem is this?
There's an analytical way to do this, certainly
i feel like horizontal line test is not the way im supposed to do it
could you give me a hint as to what the analytical way is?
You're not wrong. It's the geometric way of seeing why it might be true but it does not constitute a proof
Well, what're the definitions of injectivity and surjectivity?
I truly wish I had teacher like @sleek swallow .
Let $f:A \to B$ be a function between two sets $A$ and $B$. Then, it is injective iff:
$f(x) = f(y) \implies x = y$
Of course, $x,y \in A$. Then, it is surjective iff:
$f(A) = B$.
Abhijeet Vats:
Lol why
one sec
Sure.
@sleek swallow thank you for all your help
i'll continue tomorrow
now i must rest
You're welcome. Rest well.
@weary tiger I figured out your problem
It's actually kinda not hard
But it took me going to sleep to figure it out
Wait hmm
Nevermind I did a silly
Clearly need to wake up more :?
It works for some cases but
Maybe other cases are possible
Ok there are definitely at least some other cases
Wait nvm
No they aren't
Ok
It does work
I didn't do a silly
Hint 1: ||for which number of vertices can such a graph exist?||
Hint 2: ||Apply an arbitrary starting point and direction to the hamiltonian cycle||
Could someone help why is this O(9n) ?
I tried to put "f(n) = 9n" in my calculator to see if they ever meet but didn't find anything
you mean O(9**^**n)?
Ah jeez I misread the textbook
Yea O(9^n)
why do we drop the 2n and 3n for just n ?
same thing as 3n is O(n) right ?
for all sufficiently large values ofΒ x, the absolute value ofΒ f(x) is at most a positive constant multiple ofΒ g(x). That is,Β f(x)Β =Β O(g(x)) if and only if there exists a positive real numberΒ MΒ and a real numberΒ x_0Β such that
|f(x)|β€Mg(x) ,βxβ₯x_0
so 3n is O(n) because with M=4, 5 n is greater than 3n
why is log(n^2) big O of log(n)
I can't put a M infront of log(n) that would make it greater than n^2 ?
log(nΒ²) = 2log(n)
dont multipost
wouldnt this just be Natrual Numbers?
the first one
Isn't "binary numbers" the same set as natural numbers*? If so, then "rationals", "reals", "integers" should contain binary numbers, while natural number is the only (non-strictly) subset of it.
*assuming "natural numbers" is meant to include zero, but even if it doesn't the answers above wouldn't change
wtf is a "binary number" in this context
Maybe it's just 0 and 1
What would be an example of an element of $\bQ^{3} set?$
Can I just say itβs a 3D point with each of its coords in Q?
bad tex
PiqueKirill:
still bad tex
:/
but yes Q^3 is just the set of all ordered triples of rational numbers
for example, (1/2, 1/3, 1/4)
So there is no trick behind such a question? It seemed odd and out of place among all the other questions in the hw
what's the exact wording of the question
State an example of a Q3 element
that's it?
all you were asked for was an element of Q^3? no other requirements?
do you have a pic of the question
Π° ΠΊΠ°ΠΊΠΈΠ΅ Π΅ΡΠ΅ ΡΠ°ΠΌ ΠΏΡΠ½ΠΊΡΡ, ΡΠ°Π΄ΠΈ ΠΈΠ½ΡΠ΅ΡΠ΅ΡΠ°?
ΡΠ°ΠΊ-ΡΠΎ Π΄Π°, Q^3 - ΡΡΠΎ ΠΌΠ½ΠΎΠΆΠ΅ΡΡΠ²ΠΎ ΡΠΎΡΠ΅ΠΊ Π² ΡΡΠ΅Ρ ΠΌΠ΅ΡΠ½ΠΎΠΌ ΠΏΡΠΎΡΡΡΠ°Π½ΡΡΠ²Π΅ Ρ ΡΠ°ΡΠΈΠΎΠ½Π°Π»ΡΠ½ΡΠΌΠΈ ΠΊΠΎΠΎΡΠ΄ΠΈΠ½Π°ΡΠ°ΠΌΠΈ, ΡΡΡ Π½ΠΈΠΊΠ°ΠΊΠΈΡ ΡΡΡΠ°Π½Π½ΠΎΡΡΠ΅ΠΉ Π½Π΅Ρ
Π°Π³Π°, Π²ΠΈΠΆΡ
ΠΡΠΎΡΡΠΎ Π±ΡΠ» Π½Π΅Π±ΠΎΠ»ΡΡΠΎΠΉ Π·Π°Π²Π°Π» Ρ Π΄ΡΡΠ³ΠΈΠΌΠΈ ΠΏΡΠ΅Π΄ΠΌΠ΅ΡΠ°ΠΌΠΈ ΠΈ Π½Π΅ΠΌΠ½ΠΎΠ³ΠΎ Π²ΡΠΏΠ°Π» ΠΈΠ· Π΄ΠΈΡΠΊΡΡ
ΠΡΡΠ°ΡΡΡ ΡΠ°Π·ΠΎΠ±ΡΠ°ΡΡΡΡ
Hello, I was wondering if someone could assist me in completing this practice problem? I have a test friday and im trying to cover some problems in my textbook for assistance. I'm kind of behind in my class because of personal issues.
show how much you can do on your own
not much, I had surgery recently so ive been behind in my classes, and with the coronavirus outbreak, I can't exactly go see my professor or even go to my campus library. I just want to understand but because my resources are limited I can't. That's why I came here, so I could understand. I'm not asking anyone to be like "Gimme the answers" just a small explanation is what I want. I've tried looking at the textbook's explanations too, I just don't get it.
@steel parcel Can you identify a subset?
I got it, i had to ask my friend. thanks. And yeah.
Abhijeet Vats:
Abhijeet Vats:
So, your function is mapping an integer to each ordered pair in $\bZ \cross \bZ$
Abhijeet Vats:
Do you understand me so far?
@weary tiger
Okay
Now, you want to try and show that the function is not injective
So what do you have to do?
No. That's not a counterexample.
The given function is injective iff:
$f(x_1,y_1) = f(x_2,y_2) \implies (x_1,y_1) = (x_2,y_2)$
Abhijeet Vats:
Now, consider $x_1 = y_1 = 2$ and $x_2 = y_2 = 3$
Abhijeet Vats:
Can you see why this is a counterexample?
Yeap. At the very least, it was an alternate name for injectivity in the text I used. Hence, I'm following that.
Well, if it wasn't a counterexample, then the assertion would be that (2,2) = (3,3). By a theorem on ordered pairs, that would imply that 2 = 3
Yes
Understand?
You can generate any number of counterexamples.
Well, the ordered pairs (1,1) and (2,2) would certainly form counterexamples.
It would be a counterexample. So, (1,1) and (3,3) are counterexamples.
Yes. You're trying to find two ordered pairs $A$ and $B$ such that:
$f(A) = f(B) \implies A = B$
Is false. So, you need two ordered pairs to be able to do that.
Abhijeet Vats:
do you know what onto means?
What does it mean
hint: xΒ²>=0 for all x in Z
State the definition
No
A negative integer will be a counterexample since there are no integers x and y such that x^2+y^2 = negative integer
No! Suppose that we have a function between two sets $f:A \to B$. Then, $f$ is onto or surjective iff for all $b \in B$, there exists an $a \in A$ such that f(a) = b.
Abhijeet Vats:
So, in this case, you need to find an integer z for which there does not exist any integer values of x & y so that f(x,y) = z
You need to find an integer. Not ordered pairs.
No.
I'm starting to think that you do not understand what surjectivity is or what the question i asking of you.
So, go and read up on that first before attempting the question.
No!
First of all, it's:
$f(1,-2) = 1^2+(-2)^2 = 5$
Abhijeet Vats:
Secondly, that's not a counterexample because 5 is an integer
I'm going to reiterate this slowly.
Let $A$ and $B$ be sets. Then, let $f:A \to B$ be a function. Now, f is said to be onto or surjective iff for all $b \in B$, there exists an $a \in A$ such that $f(a) = b$.
Abhijeet Vats:
Now, translate that to your problem.
$f:\bZ \cross \bZ \to \bZ$ is surjective iff for all $c \in Z$, there exists an $(a,b) \in \bZ \cross \bZ$ such that $f(a,b) = c$.
Abhijeet Vats:
Now, $f(x,y) = x^2+y^2$. So, let $c = -1$. Then, we can see that $x^2+y^2 = -1$ has no solutions in the integers.
Abhijeet Vats:
a counterexample to surjectivity is in the codomain not on the domain, so in this case its not an ordered pair but an integer..
What does it mean for the relation to be reflexive?
a relation is not a function (in general)
no that is wrong
xRy doesn't have to be true for all x and y in T
No.
do you know what a relation is?
that's not a proper definition tho
That's not a definition at all
@weary tiger Go and review what a relation is first. Then, come back with questions.
Giving a 10 minute lecture on what it is is going to be useless.
Hey guys! Does anyone know how to program truth tables in c++?
Could you elaborate?
I need to program a truth table based off of how many propositions and premises I'm given.
So like for $P\implies Q$ you have to enumerate all the possible truth values?
N/π:
Yeah, so.. Say I'm given an argument that says..
p and q, therefore p. I need to print a table that checks if it's valid.
So I'm moreso proving if a logical inference is valid.
Would sound like a recursive algorithm to me
So in FOL you have 3 elementary connectives
My professor gave me a hint saying that I would have to convert to binary.
Does he mean encode true or false in binary?
So 1 for true and 0 for false
Yes
Say I have 2 propositions, the amount of columns I would have for my truth table is 2^2, which is 4, right?
Dunno, in C++ you have true and false as bool types so idt that's needed
Right
All combinations
Yeah, I need to print out all combinations and all I know is that I need a dynamic 2D array
and that I need to convert numbers to binary.
Binary is not a hint but rather a requirement?
I did ask if I should use bools but she said that binary is more efficient?
Wtf they are literally the same
The compiler optimizes for bools
Uses the least space
And there is even special types for bools like vectors
That are optimised
Anyways, where are you stuck on your assignment?
Yeah, idk. We all asked if we should use bools but she said that binary would be easier for us.
We're all not advanced, btw.
Ah alright I suppose uint8_t would also suffice
I just don't know how to print out all the variations for each of the propositions. She gave us a code snippet if you'd like to see?
Sure
How do I do the little code box again?
`
This is the code that converts something to binary, I believe:
while(c > 0) { b[i] = c%2; i--; c = c/2; }
Wait why would you turn a number into binary if you are talking about propositions?
Are you using gΓΆdel's method?
For example, c would be 101 which equals 5.
and it would decrease depending on how many rows I need to print out
if that makes sense
But this code turns a number into its binary representation
c is a number and then its binary representation is stored in b
I think I remember her saying that it's the remainder that we need
so if c is 5 then my first element in the array would be 1
In what contex would this be used in a truth table?
Where would you have numbers greater than 1?
To print out combinations.
There wouldn't be numbers greater than one since we're only taking the remainders I believe
Right but you are turning something into a binary number
So do you want to store a collumn of a truth table as one number and then turn it upon use into a binary number to save space?
Yes!
Ahh
So this optimisation would probably come in later in the game
First you'd need to build the other things around that truth table I suppose
no
no you're both missing elements that should be there and including ones that shouldn't
Equivalence classes are distinct sets
disjoint
Yeah
What I meant π
If that is a correct equivalence class, do you think this is the answer to the question?
no, this is still missing a ton of relations
well for one, do you really need to do that
Is that really what the question asks of you?
It just asks you to list distinct equivalence classes
There is a shorthand notation, no?
No those are numbers not equivalence classes
Did you mean representatives of equivalence classes?
Correct me if I'm wrong, but isn't $a \equiv b$ (mod $n$) the same thing as $b \equiv a$ (mod $n$), as in the two are interchangeable?
That guy:
That's what I thought
just wasn't sure because I couldn't find a theorem supporting it
@weary tiger let me ask you this way: how did your course define equivalence classes?
@fresh flame that's typically shown when the question comes up if the divisibility relation is an equivalence relation
Right so do equivalence classes contain pairs?
In your case
Did you not say it consists of elements related to 0?
Say you have a set $A$ with an equivalence relation $\sim$ on it and an element $a$ then the equivalence class is defined as $[a]_{\sim} := { b\in A | a \sim b }$
N/π:
N/π:
Why do you believe that it is 6?
Do you mean by 16,14,.. the equivalence classes, so $[16]_{\sim}$?
N/π:
16-12 = 4 which is divisible by 4 therefore 4|(16-12) and 16~12 which means these two are not in disjoint equivalence classes
?
That should be it, though quite complicated written
So what you are looking at is the numbers mod 4
There is a simple way of finding the solution
$\bZ /(m) = {[0]\sim, [1]\sim, \dots , [m-1]_\sim}$
N/π:
Where m is your modulo which is 4 in this case
So since your numbers exclude 0 you can exclude [0] from there
So you have [1] and [2]
As your solution
You could validate this yourself by looking at the remainder and how it works for values less than 4
And then how it works for values greater than 4
Those are the same
The same equivalence classes can be written with different reprisentatives
Uh oh I think I missed something
0 would obviously be equivalent to 4
So [1],[2],[3], [4]
Right we start counting from 0 to m-1=3 so there must be 4 equivalence classes
Sorry I did a mental oopsie there
Those are the properties of a equivalence relation so yes
It does look correct even though the abuse of notation
Can you formulate an inverse function?
So let $f(x)=(y_1,y_2) = (x, 2x)$ then $f^{-1} (f(x)) = x \implies f^{-1} ((y_1, y_2)) = x$ and how can we reach that? $2x-x=x$ therefore $f^{-1} ((y_1,y_2))=y_2-y_1$. Meaning $f^{-1} (f(x)) = 2x-x = x$ for all $x\in \bR$
N/π:
@fallen tinsel
This is always a unique solution for any x so this function is injective and surjective
thank you
Hi, I am trying to prove that if G is a Hamiltonian graph, then L(G) is also Hamiltonian, and need a bit of help with how to go about it
if you need to make 4 teams of 15 people out of 60, then what is the number of combinations possible?
I figured I'd go about it like 60C15x45C15x30C15x15C15
which adds up to 60!/(15!)β΄
but the key provided says 60!/4!(15!)β΄
why the 4! in the denominator?
what does 4! usually represent?
the only thing i could think of is if it were perms and the 4 teams were undiscernable, then I'd divide the factorial answer by 4!
are the four teams undiscernable?
What do you mean by that?
what do i mean by which part?
okay, chances are idk what i am talking about
yeah, that's what i am not understanding either
repetitions
but doesn't it represent repetitions in permutations only?
sure
but like you said, the four terms are undiscernable here
if we pick the 15 people for the first team
its the same as if we had picked the same 15 people for the last team
@weary tiger see your framework of choosing the teams
it's inherently counting the same kind of teams multiple times
i didn't know that you'd have to divide the answer by a factorial even in the cases of permutations
okay, let me think about it
dump the idea of "doing this when that"
and take a logical approach instead
do whatever is needed wherever it's required, as long as you can back it up
yeah, that's what i am gonna do and re evaluate the problem
imma get back when i am done doing that
alright
just think about how your "algorithm" to choose the teams works
you'll see the problem
okay, let me present a dummed down version of the problem. if i have 6 things and i need to make 3 teams of 2 things. then first imma pick any 2 things with 6C2. then 4 left. 2 more, 4C2. 2 left. 2C2. And then multiply em. and shouldn't that be the end of it?
why shouldn't it be the end of it?
disc, i am not sure i follow you, friend
Okay, let's call them ABCDEF, the six things
For our first team, let's choose AB, second team will be CD, last team will be EF
Okay that's one way to choose the teams
okay
Now, let's do another way
let's choose CD for the first team, then choose AB for teh second team, then choose EF again for the last team
well they're both the same teams
The way you've counted it, you've counted these two as different ways to choose
well, have i? let me think
ah yes!
i have
oh yeah, it's all coming together now
thanks, people
This should say that exactly 3 of the digits are 1's
but you have to choose which 3 of the digits to forcibly make into 1's
So I'm looking at my teachers slides for a topic I missed one day but I'm having trouble understanding why this is true
This was the sample problem
How does the answer in the induction step solve the problem as to whether the relation and the closed form solution are the same?
To me it's just spitting out the the original formula but with a 'K' substituted for n?
Oh wait I see now. The recurrence formula was tacked on to the closed form
Looks like it
Will a 4 variable truth table always have 16 rows or will it be less if it can be split into two separate truth tables before bringing together?
why split ?
Live if it's ( P v Q) v (R ^ S)
I haven't seen truth tables being split, not sure what you'd gain from it
Would it be logical to do left and right halves separate like that? Or just go for the 16 row table?
you're probably going to mix yourself up
if you simplify to just 2 variables and try to split that
for example p -> 0 and 1
q would have to be 1 and 0
like you'd have to maintain an order that covers all possibilities over 2 seperate tables
For what it's worth (I've only taken 1 discrete math class) I'd go for 16
Hi, can someone tell me how i should continue this?
Four subsets of E*
I have never seen something so annoying as this course
I mean the logic is there but the way to express it in terms
Its limiting
This course limits my logic
you're trying to show that E x F is empty if and only if E is empty or F is empty?
Yea
What do u mean?
you need to prove (1) if E is empty or F is empty, then E x F is empty and (2) if E x F is empty, then E is empty or F is empty
are you stuck on a particular one of these, or both?
Theres two steps for these?
well, the double arrow you wrote means P -> Q and Q -> P
This is the example of thr dr gave us in class
But the one i am trying to prove has an = in it which changes a few things
let's just take it easy and prove one direction at a time
it looks like you started to prove that if E x F is empty, then E is empty or F is empty so let's prove this
do you have an idea of how to show this?
No
ok, well I think it will be easier to think about if you consider the contrapositive
are you familiar with that?
The bar part?
contrapositive as in, not Q -> not P instead of the equivalent statement P -> Q
Yea
the contrapositive of if E x F is empty, then E is empty or F is empty is if E and F are both non-empty, then E x F is non-empty
do you agree?
Yes
ok, and you know that these are equivalent right?
Ye
ok good
the second one is easier to work with
can you try proving it?
So we dont add xy to prove it
Just like that?
The exercise is about cartesian product
I think maybe we need to use xy in it like the example
Or is it not necessary?
yes, you should consider elements of the sets in question
you need to find one pair (x,y) in E x F
in order to show that E x F is non-empty

