#discrete-math
1 messages · Page 94 of 1
the given relation is not reflexive
yeah in that case it doesn't work
Sally goes into a candy store and selects 12 pieces of taffy. The candy store offers 75 varieties of taffy. How many ways are there for Sally to select her 12 pieces of taffy?
is it 75 choose 12
or is it12+75-1 choose 12-1
Hey can anyone explain to me what (and how) the regular expression (\d+(,\d*\d)*) is expressing?
Diemia:
if someone could help me out here.
ok as is these are out of order, except step 1 which is in its right place
this is late but 5 would be 2nd ? for the induction hypothesis ?
no, this is not an inductive proof
What is the coefficient of x^4y^3 when the expression (x+y+2)^9 is expanded?
can someone help me with this
what have you tried so far?
honestly, from what ive seen of these type of questions so far the the powers of the x and y add to give the power of the equation
so i dont really know what to do
sorry my explanation reads so bad
@stray reef is the answer 5040
uhh lemme do that myself and see if my answer matches yours
ok thank you
thanks
you chose 4 x among 9 factors, and then 3 y among the 5 left, and then multiply by 2^2=4
Or smth like that
Darkrifts:
the adjacency matrix to the power of whatever gives the number of paths of length whatever, right?
So, if you have the adjacency matrix A, it gives whether or not an edge exists, yes?
when you multiply it with itself
$\begin{bmatrix} a & b \ c & d\end{bmatrix}^2 = \begin{bmatrix} bc+a & ab+bd \ ca+cd & bc+d\end{bmatrix}$ since the squares don't matter
Darkrifts:
does it just turn out, that multiplying them gives you path length or osmething
p much
since the term only increases in the top left (for example) iff there exists a connection from a to a and bc, which would give you a path of length 2 i believe
of course it's not from a to a, it's like if it connects with itself and if they connect with each other, but whatever
adjacency matrix is weird to do without indices but I'm not typing out that full thing for time reasons
and im assuming when you multiply them together, you just count the number of values that are greater than 0 then
damn i ned another example, these slides only give one example
fk
The specific position of the value is important since the number is the number of paths of length n from point a to b
based on the indices, ofc
I can't write one down since lmao latex is inefficient
o
Just draw a graph yourself
and make the matrix
then see how it works
preferably a more asymmetrical one
The adjacency one here relies on undirected, but i bet it'd work for directed even
oh
shoots
ok brb
wait question though
when do i give it a 0 and when do i give it a 1
damn
the directed one would be much less symmetrical, so not all numbers would be equal
1 when a c onnection exists
0 when no such connection exists
ok lets say i have from a to b
if there's more than one connection, who cares
would i put one in a,b or one in b,a
pick vertices and label them with the integers
im so confused as how a connection is established
number the vertices
I forget if it's rows or columns first, but it's probably listed on the slides
Then if vertex 1 connects to vertex 2, $a_{1,2}$ should be 1
Darkrifts:
nope its not on slides
shit
Obviously no paths exist, but for directed, decide if it starts on rows or columns (which I don't remember)
and if it goes from a point to another point, put it on the first's row, the second's column (or the other way around, idk)
but the matrix will clearly be asymmetrical
GImme a sec
Alright so, assume that $a_{a,b}=1$ means there is a connection $a\to b$
Darkrifts:
ok
so, using that, draw a more complex graph and fill the matrix
i just looked it up, the key detail is that it's asymmetric, so swapping rows and columns first will just be the transpose which won't change much
as long as ur consistent right
ye
I looked it up as well, the number should represent the number of connections as well
so if there are two edges, it should be 2
ye
ok so lets say
want to find the amount of paths of length 3 that exist
wait no how about length 2
from some vertex tos ome vertex
ok esoooo lets say from a to c
of length 2
multiply them, and then what am i searching for again?
if you did rows then columns, find the number in (a,c) of A^2
hmmmm ok
which should be 1, I believe
ok i foudn 1
o
o boi
o foudn 2 paths from a to d of length 2
whoa dude this works wonders
ye
Because they only add together if there exists a connection from the first to the second and from the second to the third etc in that chain
(or from one to itself, but they can just be considered possible distinct positions in the chain)
now all you have to do is prove it
n o
shit
You could just treat them as conditions of whether or not connections exist
yeaaaaaa im gonna pass on that
same
im gonna yeet outta here
how could i represent this using symbology ?
because i get lost with the part 'if ab is even, then a is even and b is even'
maybe that part is an implication ?
the example is this one, but i don't know how to get that negation
because if i negate this 'Then E(ab) implies (E(a) and E(b))' i don't get that
Liquid:
$\neg \forall a \forall b( E(ab) \implies (E(a) \wedge E(b)))$
Liquid:
~(E(ab)) v E(a) ^ E(b) ?
$\exists a \neg \forall b( E(ab) \implies (E(a) \wedge E(b)))$
Liquid:
$\exists a \exists b\neg ( E(ab) \implies (E(a) \wedge E(b)))$
Liquid:
And then just deal with the inside
but ~E(ab) wouldn't be 'ab is odd' ?
because the negation of an implication is ~E(ab) v (E(a) ^ E(b))
Basically this is because $\neg \forall a (s(a)) \equiv \exists a ( \neg s(a))$
Liquid:
okay so it's or E(a) and E(b) so 'or a is even and b is even' ?
what
it shouldn't be 'E(a) and E(b) implies E(ab)' or something ?
So let's first write E(ab) implies ( E(a) and E(b)) as not E(ab) or ( E(a) and E(b))
So the negation of that is E(ab) and not ( E(a) and E(b))
Which is equivalent to E(ab) and (not E(a) or not E(b))
omg i'm sorry
now i get it hahah
i was thinking that the negation of an implication was ~P or Q and that's just an equivalence for the implication not for the negation of an implication
yes you're right then

and thanks for teaching me that it is possible to use the universal quantifier along with implications
i have another question, isn't it necessary to state that a and b belongs to some set ?
So the logical formulas are separate from the set (structure) you're working in
They are then interpreted by the structure
no, it is not
in this entry http://jdh.hamkins.org/the-connect-infinity-game/ jdh analyzes connect-infinity
on the board w x n, n finite, there are strategy stealing arguments that both players cannot have winning strategies, and even though he doesnt describe a concrete drawing strategy, i've already constructed one
in the entry jdh uses the rule that you win if you form a connected w-sequence in a single row
now suppose we change the rule to, "you win if you form a connected w-sequence which may connect diagonally"
do the players have winning strategies? strategy stealing arguments still apply so the answer is no. but do they have concrete drawing strategies?
When you say w, do you mean $\omega$?
Liquid:
yes
also, if it helps, the concrete strategy for the single row rule is here https://math.stackexchange.com/questions/3208923/the-connect-infinity-game
How can a diagonal $\omega$ sequence exist?
Liquid:
Or maybe I'm missing something
like in the original game, say i plan on winning on the bottom row
you can block me anytime, just place a coin on the right of mine on an empty column
Sure
but say i connect mine all the way to yours, then afterwards ill just place a coin on top of yours
and that counts as diagonally connected
harder to block yeah
It's possible that there's no obvious drawing strategy
it seems at first that both players have winning strategies (it seems they cannot block each other)
every position except for bottom and top have 3 "degrees of freedom"
in the MSE answer, you place isolated towers (assuming you are trying to draw). that way, you can force that they attempt to win on the top row
except in that case, if they try to fill the gaps i.e. build k-towers where k=max height, you can stop them the moment they build a k-1-tower
now with the modified rule, the top row has 2 degrees of freedom: they can connect through k-1 or k, so you can't block them both
is there a way to show that a certain degree sequence for a tree exists?
does this mean that a characterization is an another way in which i could identify some concept? instead of only using its definition?
yes
yup
ye
for hasse diagram, you just get rid of reflexive + transitive right?
and change all directed to undirected
pre-requisites to learning discrete mathematics?
like, none
just gotta find material that starts easy
which should readily exist, it’s often an intro class of sorts
thanks. I've been researching on this subject
most answers are sporadic
any book recommendations for discrete math?
for beginner level
I use Books of Proof (3rd edition) Richard Hammack and Epp's Discrete math. Books of proof pdf version is free
can someone remidn what does congruence mean when used with a mod?
i.e: a congruent 1 mod b
Congruence is a relationship, so it must be "a is congruent to b mod n"
i know i wanted to know what it means but I found out now
it is b divide 1-a in this case
It is called congruent modulo and, i am not sure, I think it is not the same as saying a congruent to b
I am pretty sure it's the same as saying "a is congruent to 1 mod b"
alright then
anyone familiar with RSA encryption
I have a question about a small proof involving it
@sharp ravine thanks
if $y_A = a^{x_A }modq$
how is $a^{x_Ax_B} mod q = y_A^{x_B} mod q$
but $y_A = a^{x_A} mod q$ where is the mod q part?
moar55:
what
$$y_A \equiv a^{x_A} \pmod{q}$$
$$y_A^{x_B} \equiv \br{a^{x_A}}^{x_B} \equiv a^{x_A x_B} \pmod{q}$$
the equations i wrote where equality relations not congruence, or does it not matter in this context?
moar55:
anyone from Hunter college here that has taken discrete math
or am I truly alone in this world?
im not in college yet but i am taking discrete math rn
its easy but its so forgettable
its something u have to review over like every 2 weeks if u wanna master what you were taught
You're also delusional, @rich trail. There is no world. You have been in a coma for 5 years!
lol
lol
@weary tiger do the exercise
a sequence of edges that bring you from A to A without repetitions. like, literally… a cycle
a circle in the edges
(when I say without repetitions I jist mean that you can’t just go back an forth over the same edge)
What are you unsure about?
how to write the answer..
my teacher said I could explain it considering i missed the classes we learned this
but still unsure if my explanations fits the format
so i wanted to know how id denote this properly
@faint narwhal
Well what's your explanation
well based on my current understanding, whether correct or incorrect:
a string of 0, 11, 11 followed by some amount of 0s, 11 followed by some amount of 0s ands 1s, 1 followed by some amount of 0s followed by some amount of 1s, some amount of 0s followed by some amount of 1s, some amount of 0s followed by some amount of 1s and 0s
maybe I'm missing something but I'm assuming this isn't how I'm supposed to write this..
also, probably not understanding this properly
@faint narwhal sorry if you dont want pings
Yeah this isn't correct. There's a very simple way of describing this
For example, would the string 00 be accepted?
im assuming yes cause the loop?
or is it that when u get to the final state it ends, so only 0 would be accepted
@prisma junco They likely want it as a regular expression
@ivory badge they said i could do it written out considering time constraints and that I missed this section.
Ah
Yes it would be accepted
The only thing that matters is where you end up. So it's accepted it you end at s_0, rejected otherwise
$0^*(1(0)^*1)^0^$ certainly is recognized, but i'm not sure if that's the best way to write it
Darkrifts:
(i'm horrible at formatting and optimizing)
Clearly it requires an even number of ones and that's really all you need to be accepted by this one, right?
@prisma junco Since they gave you the ||nword|| not-regular expression pass, you could say something about how it requires an even number of ones and the 0s do not affect acceptability
Nice job just giving him the answer
But uh, regular expressions like $0^(11)^$ mean the thing with the * is repeated any arbitrary number of times (including 0 times as a possible valid representation)
Darkrifts:
so anything like 011, 0001111, etc would be members of that expression
but it could be 0101 tho
Nope, since the 0 comes before the 11
0 and 11 are valid, as is the empty string though
but the loop on s1
Oh, for that automata yes, but not for 0*(11)*
sorry
what about #1 on this one
if uc an read it
am i allowed to add a a production or whatever its called
like A -> A0
or does that not work
I think they want you to use only those productions given
like S -> 1s0 -> 11s00 etc
which, btw, is sufficient to generate that string
But yeah, regular expressions are nice and there's a nice little thing you either have already seen or will see about how for every regular expression there's a FSA which accepts it
Also on your second step, you went from 1s0 to 11s0, you didn't add another 0
oh snap
thank u lol
last question is about the turing machine..
my issue si the blank between the 1 and 0 kinda confuses me
Sorry, had to c o n su me, but i have no idea what T is lmao
t the machine
its alright i turned in waht i had, probably failed but fudge i prolly got a c- in thec alss
,rotate
what kind of stuff should you try to skip using a recurrence relation and go to finding an explicit function? For example I had a question like Find an expression for the number of bit strings of length n that contain the string 01 which i was supposed to just look at it with a explicit function but how would I know to do that instead of a r.r.?
well in this case you can try to count the strings that don't contain 01
which is relatively straightforward as any such string is composed of a run of 1s followed by a run of 0s, either one potentially being of zero length
I don't know what your course is but in general I'd say it's always better to find a "closed form" (i.e., not a recurrence relation)
and most recurrence relations that model basic combinatorial problems (it might take some time to recognize when less basic things like derangements or partitions are hiding) can be expressed in a closed form
@west crater in a bit string of length n, you have (n-1) choices of where the substring '01' may be. then each of the other (n-2) bits may be zero or one. so solution is (n-1)*2^(n-2)
@mossy palm that overcounts - you're specially distinguishing the instance of the 01 that you place
Using your procedure I can choose "01" to be in the first spot, and then arbitrarily set the 3rd and 4th to be 0, 1 and everything else to be 0
I can also choose "01" to be in the third spot, and then arbitrarily set the 1st and 2nd to be 0, 1 and everything else to be 0
This is the same sequence but your procedure counts it twice (actually way more than twice)
i know the actual answer
but i just dont know when to give up on trying to friend a r.r.
@peak crag oh that is true. let's use ann's method instead. any string not containing '01' is determined by an initial segment of 1s, of which there are (n+1) many, so solution is 2^n-(n+1)
@west crater why do you want to find a recurrence instead of a closed form?
well i just learned about recurrence relations and there was a very similar question basically the same thing but instead its a string of 00
So i tried to apply the same logic
butit doesnt work, I guess now i figured out why
I'd say you should basically always start by looking for a closed form unless you recognize some extremely obvious recursive structure or you realize the problem might have no closed form
Even if the problem is obviously recursive, a closed form is preferable to an open form
If it's no 00 then you have the recurrence f(n) = f(n-1) + f(n-2)
That problem seems to be a special case with no closed form... not a combinatorial closed form anyway, but you could write it in terms of the golden ratio
A topographical ordering has no repeated vertex right?
A topographical ordering is a directed, acyclic graph (DAG)
An acyclic graph has no repeated vertex? Meaning a topgraphicial ordering also has no repeated vertex?
I'm basically trying to justify that a topographical graph, with the function f(v_i) = i is injective (one-to-one).
Where v_i is a vertex of index i.
My original argument was that there can't be two vertexes with the same index i. But this seems too simple.
@stray reef @peak crag @mossy palm the way to address these in general is to build a DFA and then compute the number of possible paths in it by exponentiting the transition matrix
or by solving a linear recurrence
which is the same
here's the knuth-morris-pratt DFA for 01:
mniip:
mniip:
the answer hence is
$$\begin{pmatrix}1 & 0 & 0\end{pmatrix}\begin{pmatrix}1&1&0\0&1&1\0&0&2\end{pmatrix}^n \begin{pmatrix}0\0\1\end{pmatrix}$$
now of course to get a closed form answer you could turn this matrix into jordan normal form et cetera
mniip:
the answer seems to be 2^n-n-1
wow you really nuked this
I don't think he was looking for generality on specifically problems where there's a forbidden substring lol
so, im supposed to find out the solution to a set of congruences via generalized chinese remainder theorem
i know the answer already, i understand "normal" chinese remainder theorem, but i dont understand how come that solving both differs so much
given the set of x = 6 (mod 12); x = 2 (mod 14); x = 3 (mod 15); x = 9 (mod 21)
clearly they are not coprime, so must use the generalized version somehow
first i begin with the LCM of the modulos, that is 420
i know what im supposed to reach is x = 198
(thanks to the very few online calculators that solve generalized chinese remainder theorem, they r all for normal one only, however they still dont goddamn show steps)
there are supposed to be two more steps there, but i dont know what they are
all i figured out is that there is one set of integers (imma call it "D") for each of the congruences and altogether if all the D's are multiplied together, they also are equal to the LCM somehow
and through them i can calculate another set of integers (imma call it "C") for each congruence that each C is congruent to 1 (mod of its respective D)
i spent trying to figure this out for 3 days now 
@weary tiger this would probably be better in #elementary-number-theory
@mossy palm to solve it with 00 it basically looking at each case. So If it ended in a 10, 1 or 00, then adding all those combinations where it would have a 00 in it
does anybody know of any relationship between bridges in a graph and edge coloring
Consider distributing 28 identical balls into 8 distinct boxes numbered 1, . . . , 8
What is the number of such distributions in which for every i ∈ {1, 2, 3, 4}, box i receives
at least i balls?
is the answer C (25,7)?
No, it's C (27, 7)
Give i balls to box i, now you have 28 - 1 - 2 - 3 - 4 = 28 - 10 = 20 balls left, so using stars & bars it's C (20 + 8 - 1, 8 - 1)
@quiet kraken
@peak crag i think you made a mistake 28 - 10 = 18
but continuing from there it seems my answers the same
Hey everyone! Can anyone help out with the image and preimage of floor and characteristic functions?
ask your questions
^
First, the floor function as f:R->R and f(x)=(floor)x
(there’s multiple definitions of “floor”)
Can I send a picture?
Sending the two questions I've been working on
And here is my work for 4, not understanding what it's asking for preimage and would like my work on (a) and (b) to be checked
what’s happening in the graph there
did you just mess up and make the distance from 0 to 1 twice as long?
on the x axis
aight. the circle at ½ is also confusing, might wanna go over that with some whiteout :P
Will do, supposed to be the 0
well, there should be a solid circle at 0
anyway, the graph is correct if you defined floor as “round down”
That's how it's to be defined
(the usual definition in math)
And did I describe the image correctly?
(in programming it’s often round to 0)
you say “ranges”, that kinda implies that the image is an interval
like “ranges from 0 to 1” reads to me like the interval [0,1]
it’s imprecise
you should be more specific
I assume you got the right idea, but you didn’t describe it clearly
So how would I make that image describe more precisely? The only values should be -1, 0, 1, 2
If I'm correct that is
you are
how about… {-1, 0, 1, 2}
they did say you could just do that
if you wanna describe it in words: “the integers from -1 to 2, inclusive”
or sth along those lines
Will do, and can you describe how to find the preimage?
consider first just the preimage of 1
can you describe that?
that’s all the points which map to 1
All the points which map to 1? So like -infinity to 1 or (0,1)
what makes you think -infinity to 1 could be plausible?
what’s you thought process
like… floor(-5) isn’t 1, is it
No, it's not. I was thinking on a broad term of "all points mapping to 1", sorry.
So if the preimage of 0 is all the points mapping to 1 then it would be 1.01 to 1.99 correct?
the preimage of 0 is all the points mapping to 0
but I assume that was a typo
also, 1.0001 also maps to 1
as does, in fact, 1
and 1.9999 too
True just meant shortened it for typing sake
(1,2) then?
what about 1?
Preimage of 1 so all the points mapping to 1?
yes
exactaly those, no more, no less
which, just to have the correct answer written somewhere, is [1,2)
now
what about the preimage of 1.5
That would map to 1
Nothing, in a floor function
indeed
so the preimage of {1.5} is the empty set
now. what’s the preimage of [1,2)
so that’s all the points which get mapped to something inside [1,2)
Does that mean the preimage of [1,2) is [1,2)? As the only things being mapped to something inside that are those numbers
So expanding that, it's asking from (0,4) so it would be {x|0 (less than or equal to) x <4}
In builder form
so [0, 4)
what’s floor(0)?
Floor of 0 is 0
that doesn’t invalidate ann’s point however
you just did
[1,4) is shorthand notation for {x ∈ ℝ | 1 ≤ x < 4}
putting {} around it would make it a set of sets, which is not what you want
Just about to type that out. Sorry for the mistake.
Onto the characteristic function, my teacher never showed an example of what the graph looks like.
try to work it out yourself
good practice
okay actually that example is gonna be a bit ugly
to draw
let’s take something easier like, say, the characteristic function of [0,1]
can you give me a definition of that function?
maybe write it down and see if you can graph it
Give me just a second to check my teachers video resource and try to graph it
I encourage you to try and work it out yourself
look up the definition of a characteristic function if you don0t remember
Wasn't going to copy the graph, just an outline of how to create it.
but try to figure out how the graph should look
it’s better to think on your own, I didn’t want to accuse you of cheating
but rather
I think it’s more valuable to think hard for a minute or two and figure it out on your own
than to find a “guide” / a too similar example
which will spoil the challenge
challenge is good
I'm just not sure where to start, is the thing. I think the graph would be points at in a line?
start with definitions
what is the characteristic function of a set?
use [0,1] as a concrete example
So, that means it's graphed to 0 when it's not when it's not 1 correct?
F(x) is 0 when x-€A and 1 when x€A, where € is "an element of" and -€ is "not an element of"
Where A would be within the domain
good
so, if f is the characteristic function of [0,1], then f(x) = 1 when x∈[0,1], and otherwise it’s 0
draw that
that’s a bit imprecise… what about to the left? and what’s the vertical line?
On the left it would drop down to 0 and the vertical line would be the function after it leaves [0,1] or would you draw that as two line?
Would this be more correct than the vertical drop?
yes, though as with the floor function before you should indicate what happens at the endpoints
What would be the proper indication?
a solid circle where the value is, an empty where it isn’t
yes
now, the exercise has the characteristic function of the naturals
which is a bit uglier, but perfectly drawable
If it's only for the naturals, how is the function from -2 <= x <= 2
As Z+ should be from just 0 to infinity right?
if you wanna do it rigorously, then the function is from [-2, 2] to {0,1}, taking on 1 at the intersection of ℤ⁺ and [-2,2]
that is, at the points {x ∈ [-2,2] | x ∈ ℤ⁺}
actually, no, nevermind
you just misread the excercise
the function is from ℝ
you’re just only supposed to draw that part of it
Sorry for being a little lost, so I'm only to be drawing the positive integers?
you’re gonna draw the function f(x), which itself is defined on the entirety of ℝ (and takes on values either 0 or 1… mostly 0), but you only have to draw a snippet of it, namely for x between -2 and 2
that’s the characteristic function of [-2,2]
that’s not f
f is the characteristic function of ℤ⁺ = {1,2,3…}
So the graph would just be individual points?
you should draw a function which goes
f(-2) = 0
f(-1.99) = 0
…
f(0.99) = 0
f(1) = 1
f(1.001) = 0
…
f(2) = 1
yes, it is a function which is mostly 0
So that would be the correct graph, onto the imaging of a characteristic function
yea, I‘ll leave you to that now, though
and just remember the two magic steps to solving math problems:
- read very carefully
- recall definitions
don't forget 3
3) expand everything (off to the side, of course) that isn't "fundamental" with respect to the problem so that you can more visually see what you have available
Will do, if imaging is just the values then it should be the set {0,1} as those are the only possible values
@azure lichen was that right? The image being that while the preimage is again {0,1}.
alrighty
(Whenever you feel like answering) (or anyone else) was the image right?
And Im not sure what's wrong with the preimage,
@spring helm what
Trying to find the image and preimage of these problems
Or this problem, #5
Here's the graph,
@spring helm so b asks what the image of the function is for f((-1,3))
Yes,
Pretty sure the image is just {0,1} as those are the only possible solutions
I'm really just stumped on the preimage
yep
ofc the image is {0,1}
So, the preimage
if i remember correctly, it's f^-1({0,1})
wait sorry misread
You're partially right, it's just asking for a different set
So, the preimage question wants to know
$f^{-1}({x,,| 0< x < 4})$
Darkrifts:
so, what would be the preimage of 3?
Well it has to be 1 or 2 to be plotted
would there not be a preimage for 3 as I can't get 3?
Yeah, 3 isn't in the codomain
and the only thing that is, within those conditions, would be 1
Yes, I suppose so if you map all things without a preimage to the empty set
So all you need now is the preimage of 1
only 1? that looked a lot more difficult on paper 😅 i guess i just thought about it too hard
thank you!
That is of course unless your course adopts some convention like the preimage of an object not in the range of the function being undefined
I'd think you should map to empty tho
Like f^-1(2) would be the empty set because there are no objects which map to 2 through f
You have to find the preimage of 1 btw
the answer isn't 1
you need the set of objects such that f(x) = 1
oh yeah! so it would be {1,2,∅}
as the preimage of 1 can be 1 or 2
and then the empty set
You don't need the empty set
so just {1,2} would be proper notation?
No, it's not just 1, 2
since the function is over the full real number line
you just only drew a section with 1, 2 on it for a
Yeah, i'd believe so
but what about the problem saying 𝑓
−1
({𝑥|0 < 𝑥 < 4})?
is that just limiting the answer to 1,2,3
and the only answer is 1?
and every positive integer can be one
Yeah, but you only have a non-empty preimage of 1, so your preimage consists of all naturals
@ivory badge explained good? And thank you so much!
Don't forget about how the preimage of all other x =/= 1 in that set must necessarily be the empty set
You don't need {Z}
you could just say Z+
I mean you don't need the brackets
The reason Z+ is a subset of the preimage is because 1 is inside the set you're finding f-1 of
the reason R isn't the preimage is because 0 isn't in there as well
got it
Thank you so much Darkrifts!
I know that an edge-weighted graph can be defined as a 3-tuple G=(V,E,w), where w is the weight function. Let's say I also want to add a weight to the vertices, how would I model that formally?
a weighting of the edges is really just a function E→ℝ (or whereever else your weights live), so a weighting of the vertices would just be a function V→ℝ
the rest is just notation
Can anyone tell me if this proof is correct?
\textbf{Show that the additive inverse, or negative, of an even number is an even number using a direct proof.}
We assume that $a$ is an even number. By the definition of an even number, it follows that there is an integer $k$ such that $a = 2k$. We want to proof that $a + b = 0$, where $b$ is the additive inverse, or negative of $a$. Because $a$ is $2k$ away from zero in the line of real numbers, we need to add the number which is $2k$ away from $0$ in the opposite direction in the line of real numbers. For this reason, $b = -a$. We know that $a = 2k$, so we have $b = -2k = 2\left( - k\right)$. By the definition of an even number, it follows that $b = 2\left( - k\right)$ is an even number.
╱∞╲ UncaughtException ╱∞╲:
unnecessarily verbose??? you can go from a + b = 0 to a = -b directly, just by using the definition of additive inverse. cut that "line of real numbers" talk, it really doesn't belong
We assume that $a$ is an even number. By the definition of an even number, $a = 2k$ for some integer $k$. We want to proof that the additive inverse of $a$, $b$, is an even number. By the definition of the additive inverse, $a + b =0$. Solving for $b$, we get $b = - a$. Substituting $a = 2k$ into $b = - a$, gives $b = - 2k = 2( - k)$. By the definition of an even number, it follows that $b$ is an even number.
╱∞╲ UncaughtException ╱∞╲:
How about now? Is it better? @stray reef
Could you give me a recommendation to make my proofs more "acceptable"?
Here is what I would call an "ideal" proof:
Let (a) be an even number. That is, (a = 2k) for some integer (k). Hence, the additive inverse of (2k) is (-2k = 2 \times (-k)). This is also an even number, as (-k) is also an integer.
Tony Wang:
So here is the problem:
Find the number of different decompositions of the number "n" using only numbers 4, 6, and 10.
For example for n = 18 there are only three ways (the order doesn't matter):
4+4+4+6
4+4+10
6+6+6
The following generating function was deduced:
1 / ((1 - z^4) * (1 - z^6) * (1 - z^10))
So my question is. How can I deduce a recurrent relation using this generating function?
you can use the generating function to obtain the explicit formula
the recurrence relation can be obtained without it
without generating function?
yes
let P(n) be the number of {4,6,10}-decompositions of n (which is definitely not a term i just made up on the spot)
P(n) = P(n-4) + P(n-6) + P(n-10) - P(n-10) - P(n-14) - P(n-16) + P(n-20)
are you using the rules that are applied to the operations with sets?
like Inclusion–exclusion principle
well essentially i'm relating the set of {4,6,10}-decompositions of n to those of n-4, n-6 and so on
incl-excl is exactly what i'm using
I was going to try this method actually. But is it possible to deduce the same formula using this particular generating function? Im currently watching the lecture on this subject, and the lecturer said that it can be done quite easily. But I have no idea how
yes, I know. This is why I am asking
I usually deduced GF from a recurrence, and than deduced the explicit formula from GF
btw, it looks kinda hard to deduce the explicit formula in this particular case
or maybe I don't know something
but still, thanks for the help
btw perhaps I misunderstood what the lecturer said. He said that you can easily deduce this recurrent relation if you know this generating function
P(n) = p(n-4) +p(n-6) + p(n-10) I think?
No this isn't true you double count a lot
yes
i know the answer
it is given in the lecture
i just thought, that there is a way to deduce it USING this generating function somehow. But it seems to me I was wrong
this is the answer from the lecture
so it is just the formula for the union of three sets
|A V B V C| = |A| + |B| + |C| - |AB| - |AC| - |BC| + |AB*C|
well, i messed it up a bit, but I think the idea is clear
A collection of Linear Recurrences for Fibonacci numbers, Lucas numbers and
the golden section, the G series (General Fibonacci), summations and binomial coefficients, Pythagorean Triangles,
Continued Fractions.
This link has some tables about general cases I think
wow, thanks, I was actually looking for something like this
can i jump to discrete math if i only have a math background up to algebra II?
Like highschool algebra? @dapper hound
You should probably know calculus 2 before learning discrete mathematics
Hi all, in my 2nd week of discrete math and am trying to discern which type of proof to use against the following statement.
"Let x and y be real numbers. Prove that if x <= y + e for every positive real number e, then x <= y".
We're going over indirect proofs now (existence, contrapositive, case, contradiction). I believe since it's impossible to check for every number, I'm not going to use contradiction or contrapositive. If I use case, then does that mean I only need to provide a few examples, which would conclude the statement is true?
Do you think that your last sentence is true?
Why can't you use contradiction or contrapositive?
What I meant in my last sentence was, if I was using cases then if p1 or p2 or... pn were true, I can conclude the statement was true as well. I didn't think I could use contradiction or contrapositive in this question, but let me go back and see if i could plug that in
Explain what you mean by you'd have to check every number?
"Prove that if x <= y + e for every positive real number e".. I meant that I need to find a way to prove* the statement is true without proving it's true for every positive real number 'e'
But you're not proving this statement is true
You're trying to prove that x<= y, and you can use the fact that x <= y + e for every positive real number e
Good point
I understand reflexivoty symmetry and transivity with graphs and zeroone matrices. But when functions are added i lose it. Can someone please explain the concept to do these exercises?
,rotate 90
@summer dragon do you understand what the reflexivity, symmetry, and transitivity mean with respect to these?
for the first one ANY two functions f: Z -> Z and g : Z-> Z are related if f(1) = g(1)
now what you need to show for it to be an equivalence relation is that
Ref) (f,f) is in the relation
Sym) If (f,g) is in the relation, then so is (g,f)
Tran) If (f,g),(g,h) is in the relation, then so is (f,h)
for the first, this is pretty easy because it is just based on things being equal.
So is this a right way to prove it?
Are there better ways?
sorta
i didnt check the details but yeah
you should use more words
also for the ones that arent equivalence relations, try to think of a counterexample for the propertie(s) that dont hold
like 1, 2 or 3 specific functions where either ref, sym, or transitivity doesnt hold
Hello! I was wondering if anyone was on that could help with propositional logic formulas and their truth tables

(p|p)|(q|q) where | is the NAND operator is the table im trying to create
I can create the truth table for (p|p) and (q|q), im just not sure about the complete thing
Ok, give me a bit to work on that table
@smoky needle are these tables correct?
,w (p NAND p) NAND (q NAND q)
yes
Sweet thank you! Are you going to be around for a bit in case I have any other questions?
"state the negation of the following sentence (Do not state “It is not the case that Jan is young and happy.”) Jan is young and happy."
Is the better answer to this "Jan is not young and happy"
or
"Jan is young, but not happy"?
yes, it does want the response in an english statement though
$\neg(Y \land H)$ becomes $\neg Y \lor \neg H$
Darkrifts:
if i remember correctly
So wouldnt that be "Jan is not young and not happy"?
Oh I understand that, thank you. I was applying the neg as if it only stated one thing
yeah can't ignore that and
perfectly find to change it to "Jan is not young or unhappy" right?
yeah
or maybe Jan is either not young or unhappy or some other such translatipon
it's not too important
thanks again!
“I stay indoors whenever the weather is bad.”
Would the negation be, "I stay indoors whenever the weather is good"
Bad $\to$ indoors
i forget exactly how the $\to$ thing is negated, but you'd just have to say you go outside when the weather is bad if I'm reading it right
Darkrifts:
Original: If the weather is bad I stay indoors.
Contrapositive: If I go outdoors then the weather is good.
I forget how to negate ->, but all you'd have to do is state there's a time when you are outdoors and the weather is bad
can anyone tell how he got this answer
My answer?
R o S is function composition, so since it's a matrix you end up applying the outer R matrix to the inner S matrix
same
anyone else here that can?
Nope, all it says is use logical equivalences to prove its a tautology or a contradiction
state the laws you used
$P \to Q$ is false iff P is false and Q is true, right?
Darkrifts:
$((p\land r) \land (p \to q))\to q$
Darkrifts:
i mixed them up lmao it's P true and Q false but whatever
thats the correct formula and the implication law is (p -> q) <=> (¬p v q
I still don't really get why r is there
@spring helm I think you can continue
laws you'll need
- de Morgan
- double negation
andd a few more whose names I have forgotten!
me and another student steve have worked and talked about it, id like if you could check the work though?
Sure
itll be a few minutes for a picture
@scarlet otter
Which part are you confused about?
one after = [ ]
The ordered pairs are just describing which entries of M_{RoS} have ones in them
By (row, column)
ok
Can someone explain what a partition is, intuitively? I’m looking at the definition and it’s quite verbose and hard to grasp for me
WAIT
Is it literally just like if you have a bag of marbles, and then you separated them into three different bags?
The three bags together would be the partition of the original bag?
Yo, I get it now
Thanks, guys 😂
And Wikipedia
Hey, here’s a question. If you have a set of size n, how many different partitions does it have?
partitions into nonempty sets, I assume, otherwise infinitely many (since you can add as many empty sets into it as you want)
“no closed form is known”
so basically there’s no nice formula
but it can still be computed exactly using recurrance relations (ie recursive algorithms)
Oh wowsers
That’s cool
Ye, I believe the text I was reading said a partition cannot contain the empty set
I think partitions of integers might be a separate thing tho.
partitions of integers are just all the ways you can partition an n-element set into non-empty subsets
Cuz I just read that the total number of partitions of n element set is a “Bell number”
but spelled out as a sum
oh wait
right
I see the difference
in a set there’s of course distinct elements :P
Yup yup
the triangle thingie?
Yeah
Wow
This is actually an astoundingly complex topic
Just this one question
This is why I love discrete math
turns out easy questions can have hard answers
Very true
I like that
hm, it's very nice and clean
http://prntscr.com/nvnwu8 can anyone help me out
R as in real numbers?
i am assuming so
I'd also assume so given the thing on the right
i have no idea what r-{1} means
Set minus
R except without 1
They probably want you to see that it creates a surjection even without 1, with a similar argument for R-{2}
all i know is that the function has to be one-one and onto
Which is injective and surjective (respectively) btw
You just have to show that the f(x) they give (and possibly one for x-2 if you want to do a middle man with the normal reals R) is surjective and injective
so whts the point of r-{1} and r-{2}
To show that removing one element from the set doesn't change the cardinality (especially should be obvious when you compare it to another set which removes only 1 element as well)
Also you really probably should know what set minus stuff is
would e^x be considered one to one but not onto
whts an example of a function that is onto but not one to one on R
Can you prove your first statement?
@wintry hawk as for surjective but not injective, consider the function
$$f(x)=\begin{cases} x+1 & x<1 \ x & x \geq 1\end{cases}$$
Darkrifts:
He also meant the injective part but uh
It's not injective because consider f(0) and f(1)
which are equal
ah i see
You also have to prove that the function is injective
e^x1 = e^x2
What you said only shows it's not onto
x1 = x2
That's not an argument at all lmao
"proof every function is injective:
f(x1)=f(x2)
x1=x2"
f(x1) = f(x2) = e^x1 = e^2x where x1 = x2

e^x2*
Well, that doesn't exclude the possibility that f(x1)=f(x2) but x1=/=x2
Can anybody help provide me the formula for working this one out?
Only need for b) rather x
have you done (a) already
okay so let A = that
think about what A^2 might represent.
it's not the answer to your problem but if you give it some thought it should push you in the right direction
hint: the (i,j)'th entry of A is equal to the number of paths of length 1 from i to j
Hmm
Are you able to walk me through it? This isn't course work, this is last years exam. I am just doing extra study for my exam on Wednesday haha
I'm a bit lost with this one right now, sorry.
alright so i hope you're familiar with how matrix multiplication works
can't voice chat rn i'm afraid
No problem!
so suppose we have a graph with adjacency matrix $A$. my claim is that, for any positive integer $n$, the number of paths of length $n$ from vertex $i$ to vertex $j$ is exactly $(A^n)_{ij}$
Ann:
i'm going to prove this by induction
the case n=1 is true definitionally, as an edge is the same as a path of length 1
suppose now that we know the claim is true for $n-1$ and want to prove it for $n$
Ann:
do you follow so far
So far so good!
so let's count the paths of length n from i to j
they can be classified by their penultimate vertex (i.e. which vertex the path goes through right before ending at j)
so uhh... let's say the graph has $N$ vertices. bc i'm going to need that now
Ann:
accordingly, $A$ is an $N \times N$ matrix
Ann:
so the number of paths of length $n$ from $i$ to $j$ whose penultimate vertex is $k$ is $(A^{n-1}){ik} \cdot A{kj}$
Ann:
basically, if A_kj = 0, then there is no edge from k to j, and we can't get from k to j in one step
but if A_kj = 1, then there is an edge from k to j, and we can get from k to j. and this gives us as many total paths of length n as there were paths of length n-1 from i to k
does that make sense
Just going to re-read now slowly and try compile it in my brain!
I'm with you all the way until that final step
It's right at the end that gets me
How do I negate the statement "The processor is fast or else the printer is slow." ?
something like "there exists a time in the set of times during which the processor is not fast and the printer is not slow"
@tacit garden the actual negation is "Either the processor is not fast and the printer is not slow or the printer is slow and the processor is fast"
assuming your "or else" is an exclusive or
Thank you. I thought it would be something like that but wasn't sure if the phrasing was correct.
I’m having trouble understanding what an equivalence class is by reading the definition
Can someone restate or explain it in a simpler way?
hm, given an entire set, you can break it into subsets based off of some arbitrary measure of equivalence
that's a rather poor explanation 
lets say you have the set of integers
you can use the modulus function as the defining feature of equivalence
for example, all integers x for which x mod 3 = 1 are in an equivalence class
and so hold true for x mod 3 = 2 and x mod 3 = 0
or perhaps
for the set of all triangles, you can use similarity as what you state to be equivalent
so each group of similar triangles would be an equivalence class
Ok
I just noticed something about the definition of an equivalence relation that I hadn’t before
It’s a subset of X x X
Not X x Y
So then an equivalence relation maps elements of a set to other elements in the same set?
And also based on your example I can see how the collection of all equivalence classes from a relation on X form a partition
Don't really think of it as a map, since a single value can be related to many different values
Ok
An equivalence relation isn't a map in the sense you think of it
It's more of an identification of the elements of the set X with elements of a set (of which those elements partition X)
You don't map things to other things in the same set, instead you simply (more or less) say "this is the same thing" and bundle together those things which are equivalent to each other
@indigo cedar An equivalence relation is a relation that's reflexive (a = a), transitive (a=b and b=c means a=c), and symmetric (a=b iff b=a).
if you want to keep your function/map definition, it induces a mapping from the set X to the partitions, sending $x \mapsto [x]$ where $[x]$ is the equivalence class of $x\in X$, but the equivalence relation itself should not be thought of as a function
Darkrifts:
Okay, gotcha
Thanks for the explanation
Ye I guess I was thinking more in terms of functions
it's like putting the elements of your set into buckets
they don't exist because functions really (but they do implicitly induce one)
in such a way that two elements are in the same bucket iff they're equivalent under the relation
then the buckets are the equivalence classes
I forget most people on this server, but I remember rmoney knowing what a partition was
Yep that made me happy
To get what a partition was
We covered all this stuff in a discrete math course I took in the fall
But I’m going back now that school is over and trying to fill the gaps in my understanding
Some of this stuff I never really grasped
But now I’m getting it! Thanks to you guys as well 👌
Hey all, Im looking to right the domain "all non zero real numbers". What would be the correct way to write this? I know it involves of course R
thank you!
I am given the following premises in a problem, "I am hallucinating or I am having bad dreams", "I am not having bad dreams", and "If I am having bad dreams, I see elephants running down the road"
I attributed P= I am hallucinating, Q= I am having a bad dream, R= I see elephants running down the road
i formed the premises with symbols as, "P v Q", (negate)Q, and "q -> r"
Im asked to determine if "I am hallucinating" and "I do not see elephants running down the road" are valid, false, or cant be determined
I am hallucinating can't be determined correct? As we do not know if this person sees elephants running down the road
