#discrete-math
1 messages · Page 91 of 1
basics
^
hmmmmm
wait just one question
publication date, number of pages.
(a) What is a likely primary key for this relation?
(b) Under what conditions would (title, publication date) be a composite key?
(c) Under what conditions would (title, number of pages) be a composite key?```
what is a composite key
google says its something that requires 2 fields to identify a particular element
I assume it would mean that if you have that info it uniquely specifies the book?
but no guarantee that was right
i.e. given just the key there's one and only one entry to be found under that key
so accordingly, what you don't want is for the same key to match two different items
could have same titles on the same date
(title, date) would be a composite key unless you had two different books with the same title published in the same year which were nonetheless different
as long as there isn't two books with the same exact titles on the same exact date
then that would be perfectly fine
and then they have to do (author, year, index), where the index says the how-many-eth book of that author in that year it was
like idk, Dixon 2005b

hmmm i c i c
at which point, honesly, the title would be easier :P
the projection $P_{2,3,5}$ keeps the 2nd, 3rd and 5th coordinates and discards the rest
Ann:
by defn
and I think the table doesn’t have anything to do with it
o
wait rly
sooooo it would be like (b, c, e)
oh also question, can a set be both symmetric and antisymmetric?
or can a set be NOT symmetric and NOT antisymmetric?
or is symmetric/antisymmetric one of those things, where its one or the other
can a relation be sym and antisym at the same time? yes
can a relation be neither sym nor antisym? hell yes
o
, the inverse of the relation R, be found from the matrix
representing R, when R is a relation on a finite set A?```
do we just hold all the i=j values
and then swap i and j
so for exaple a matrix of like
5 7 8
3 1 3
5 2 5
becomes
5 3 5
7 1 2
8 3 5
sym & antisym:
the relation = on any set is both
neither sym nor antisym:
just about any relation witout much structure
gotcha, that makes sense
@modest zealot the matrices that represent relations can only have 0 and 1 as entries
now, what’s the inverse relation?
||but yes the matrix for R^-1 can be found from that of R by taking the transpose||
that’s noth the answer to my question
hol on
lets say u have a relation
then an inverse
is backwards
IDK THE REAL DEIFNITION
try to write one, then
try to formalize your gut feeling
like, aR⁻¹b if and only if………
Assume you have a relation in set A, then an inverse is
for all relations, where some element a maps to b (a->b), then an inverse relation is when the element b maps to a (b->a)
o
idk that form
thats weird form above
do you know what aRb means
which means, in your notation?
I guess yes = but like
INVERSE
good keyboard
neo-layout.org, it’s optimized for German though
has a qwertz-mode
but not qwerty-mode
it’s like, really good though
correct
correct
you don’t have to do all of them but honestly after doing 2-3 the rest will be easy
it's 8 smaller exercises in a trenchcoat
I mean it actually is
oh god
lmao trenchcoat
in what context
there’s like five different kinds of closures at least
…I mean I know two but still
kek
okay, closure wrt …something basically means you make it bigger so it fulfills that property
but only as big as you have to
like, the closure of the natural numbers for - would be the integers
o like barely making the pass mark in schoooooool
aye
well, it also has to continue fulfilling what was there before
…how do you even get that idea

it’s about as wrong as it could get cause that’s neither reflexive nor does it extend the given relation
like, what you need is:
oh shit
i was thinking about symmetry
mb
so ur telling me
it has to map to itself
if a≠b, then aRb
and additionally, aRa for all a
but cant be equal to each other
bro
thats like looking left and right at the same time
i can do that
no, you’re misunderstanding
so the thing is
a relation is just a set of tuples, right?
ye]
like, aRb here just means that the tuple (a,b) is in the set R
yup
now, you want to just add more to R
so you keep all the ones in there
and then add whatever is necessary to make it reflexive
a=b
o
:P
so, what is R now?
yea but find a nice description of the relation
like, nicer than just “this or that”
wait was i not nice neugh
that’s what you have right now
that’s what you can make nicer though
by simplifying it
well think about what it is
what are the possible choices for b?
and what is the universe here
well… almost
olmost
aww FUCK
getting there
haha yes
there we go!
ok.
bro u guys make math fun as hell
successes are fun
yeah but we lied
the real way you make it 'nicer' is by drawing flowers around it
you might as well just write
lol
boom done
those are leaves
clover
I can accept clovers
might as well write "a R b no matter what a and b are"
or "everything is related to everything"
ZxZ
3 letters > however the fuck many letters is in "Everything is related to everything
lol
🌻 ZxZ🌻
🥀 ℤ×ℤ 🥀 seems more like what they wrote tho
lol
🍀ZxZ🍀 BOOM
well, you should now know what the symmetric closure is
so you’re given a directed graph showing some relation
like the ones above
and you wanna make it symmetric
ya
that’s it
or shits gonn ablow up
lol
(btw, while i’m sure they want the smallest one that has the property when they say closure, in one particular context, namely the algebraic closure, I don’t usually see that restriction)
yea, but again, I think usually that restriction is a thing and then it’s usually unique too
but I think with algebraic closures you don’t have uniqueness so you might as well not bother with the “smallest”
ahhhhh gotcha
ok just for clarification
i answered all of them already
what happens if you have a a a
will that be true?
like if its reflexive, is it only true for two iterations?
(for reference, the algebraic closure is basically all the numbers so that every polynomial has a root)
x^2 + 1 = 0 hue hue
so for reflexive shit, u cna have as many iterations to itsefl and it'll be true?
because x² + 1 has to have a root
icic
and yea I mean there’s no reason for you not to
oops discord bug
it's not a bug just anti spam ig
wat
surprising
ur busted
yea that's what i thought
definitely
for the first part part a
a->c and c->a
do i leave those laone?
bRd and dRb
and it also seems like i cant do shit for part a
cuz it technically is transitive
what’s that algorithm you learned?
lmao idk, i was sleeping in class i think
lemme check
but no (e,b)
apparently its something like
first see if there r any of the transitive relations
like aRb and bRc
and then connect those first
aka first repeat
and then u generate new relations
and then using the original + new relations
draw more transitive shit
aka second repeat
okay, on infinite sets you might have to do that infinitely often :P
but on finite sets it’ll eventually terminate at least
ya I think that’s it
without spending too much time thinking
actually, (b,e) too, right?
or?
not sure
would have to think
don’t feel like doing so
ye you right
damn this is annoying
this shit feels like ur trying to fix a bug in ur program
fix one, twenty pop up
lol
i=0 {(a,b) | a+1=b}
i=1 {(a,b) | a>b}
i=2 {(a,b) | a+b=1}
i=3 {(a,b) | a*b=1}
i=4 {(a,b) | ???}
i=5 {(a,b) | a>=b}
i=6 {(a,b) | ???}
i=7 {(a,b) | a=b}
this is the best i can do
yaas
1 is correct
yaaaaaaas
7 is correct
aight but 3 was one I gave you initially so
that one is hard
and 5 is ez
lemme do 5 first
just take the reflexive closure of one you already have
yes
well, some numbers may
just not all
but yes
probably easiest to just make no number relate to itself
FUUUUUCK
sym, trans, not refl has a “one symbol” one too
a*b = 1????
wait wtf thats actually correct?
but it’s not wrong
jesus fuck
I would’ve gone with a≠b though
but not necessarily tho right?
a=/= b and b=/= c doesnt imply a =/=c
not always tru tho
good thing to keep in mind too, that ≠ isn’t transitive
yea the best one I can think of there is stupid af
ok im leaving 4 alone for now
wanna hear mine?
so you take all the (a,a)
to make it reflexive
and then just add like (1,2) to it
and nothing else
that breaks the symmetry
oh and it also has to be intransitive
that works oh my
so also add like, (2,3)
but its odd LOL
and there, done
its like u have everything that obeys a lot of rules
and then add one lemenet
that breaks everything
yea
icic
well, two elements
how about #6
reflexive, symmetric, but not transitive
a=b or a=-b ?
a = |b|
lol
idfk
-b is not in ℕ
well fok
ok i quit
too much brainpower
welp thanks a BUNCH for the help on discretem athematics
learned more in this session than i did in a week of class
appreciate the help
well not all of it
we just told you what to think
you don’t need 100% original ideas
getting guided is fine as long as you do the vital steps yourself
and learn from it how to get to them
ye ye agreed
(3/𝑛)+11 is O(𝑛)
how do i do this?
"Determine whether or not the following are true"
@copper ore definition of function being O(another function)
Could someone guide me to resources on this type of propositional logic? Not sure if I'm googling the right thing as all I get are the basics of doing up truth tables etc.
how would i go about soving this using the contradiction method?
if a is an integer even number and b is an odd integer number, then their product, ab is even
"7 is a prime number if and only if all dogs are black"
T⇔F = T right?
wait is this the real table? i think our prof taught wrong
@weary tiger well let a=2n and b=2n+1
Multiply them
And you should get a product of 2n therefore the number is even
T <=> F = T
![]()
![]()
what do you do when you have a system of congruences and the gcd between 2 of them is not 1?

Just use the lcm
I have a test coming up and I can not find any practice problems to help me study. Does anyone know where I can find similar problems like this?
so i have to show if n^3 is big omega(n^3) or not
use the definition
omega sorry
lol
yeah
but
am i allowed to add terms in f(x)?
f(x) = n^3 btw
so like can i do n^3 + x >= x^3
@weary tiger
what
you are trying to find a number n_0 and a constant k > 0 such that for all n > n_0,
n³ >= k * n³
so what do you want to choose for k, first of all
yeah that works
no
just because you chose the wrong constant doesn't mean there is no constant that will satisfy the inequality
How many ternary sequences of digits chosen from {0, 1, 2} of length twelve have exactly three 1's and two 0's?
I can't seem to figure it out.
I thought it would be 12 choose 3 * 10 choose 2, but it wasn't, apparently.
any ideas?
(12 choose 3) * (9 choose 2).
wait, why?
...okay wait what was your reasoning behind your answer?
so you have
length 12, right?
so 12 things to pick
bc its ternary
u have 3 things to pick from
so 12 choose 3 for 3 ones, then from the remaining
OH
OHHHHH.
thanks fam
yeah, there's nine symbols left to pick from rather than ten 😛
how do i buy someone cake
over the internet
🍰 i'll give you this emoji
digital marie antoinette
thank you a million
i was having so much trouble with that problem im sleepy its late
Hey friends! Quick question about Theoretical CS:
if L := {a, b, c}
is L^2 then {(ab),(ac),(ba),(bc),(ca),(ac),(aa),(bb),(cc)}?
as in, words with length 2 that you can make with that language?
you forgot (cc)
i mean it's not an infinite set
and also that
abbreviating one element into an ellipsis 
ouh
I didnt check
damn it was only one element missing
HOWEVER
lemme fix i
there u go
is that right though?
Then L^3 would just be words with 3 letters with that language
and is the empty word in those ?
well, does the empty word have length 2? or length 3?
I don't know, since it could be whitespace 3 times but then whitespace probably would have to be in the language?
I'm in my first week so it all is very new to me
no, the empty word definitionally has length zero
okay, so the empty word would only be in
L^0?
it is a special object unto itself
if you want to define L^0 as consisting of just the empty word, go ahead
nobody is stopping you
oh okay!
So L^n (n€N) would be what if I had to write down the words?
Does that mean any length or infinitly long?
I think it's the first one, makes more sense
that means the set of all strings of length n
so it would be {(a), (ab), (aba), (ababa) ... (cacacacbabac) ... } ?
literally everything that is any combination of the letters in the language?
of any length
of length n
nah I get it, my brain went poof for a second there, thanks D:
:D
What is L*?
I know Sigma* is all words of any length but I don't really know what the * means and google isnt much help
try kleene star
oh nice thanks!
How many words can I build from a language?
I've done some testing and saw that with L={a,b}
you can build 2^n words for L^n
But it doesn't seem to check out if L = {a,b,c}
ye I did that
oh
either I totally miscalculated the words in L^3 for L= {a,b,c}
what did you get
21
3³ is 27
L {(aaa),(aab)(aba)(baa)(abb)(bab)(bba)(bbb)(aac)(aca)(caa)(acc)(cac)(cca)(ccc)(bbc)(bcb)(cbb)(bcc)(cbc)(ccb)}
those are 21
ew ew ur listing them out
baby don't hurt me
dont hurt me
cs
english
both are actually correct
lmao
as planned
I studied english / math before this
why did you quit math
I cant do math
D:

:
idk, being shown a trivial counterexample to your claims can be fun
I enjoy math, I don't enjoy having 20 new pages of material every week
hahahahaha
and despite putting like 3 hours of work into math every day having the backlog getting bigger n bigger
no fun
those are rookie numbers
remember I had english as well
so that was 5 hours of work I put in every day + 5 hours of university / day (average)
that is a 55 hour work week + I had a part time job to keep my appartment
which adds up to a 70 hour work week
no fun
mmmm
So L* means all words that can be formed with the alphabet of the language, including the empty word?
which means that if
L0 = {a,b} and L1 = {11, 22}
then the intersection of L0* and L1* would be the empty word and not { } ?
yes, the intersection of L0* and L1* is { "" }
nice, thanks
any help with this question?
P(n) is a simplified version of the pattern from S(n). I notice that for increment of n+1 , the two values from the multiplication in the denominator is increased by 2
looks like partial fractions
then you get telescoping series?
What are you even supposed to find

like does it want you to simplify or something
^
or find the value for specific N
or find a partial sums expression using telescoping series
Do you see a generarl pattern for the simplified value of S(n) ? Write your guess to complete the proposition P(n) below.
Then do partial fractions and it becomes a telescoping series
i have the value set {0,1,2} and P(X=0) = P(X=1) = P(Y=0) = P(Y=1) = 1/4
and = P(X=2) = P(Y=2) = 1/2
and have to find P(X=0 or Y=2)
do i just add 1/4 + 1/2?
are X and Y known to be independent?
Yes
then no
Wat do i do
i mean there's at least two ways you could do this
one would be to write P(A or B) as 1 - P(not A)P(not B)
the other would be to make a table of all possible outcomes
im in highschool calc and im having trouble understanding how 3 coplanar normals relate to 3 planes intersecting at a line, the lesson was the intersection of 3 planes
(sorry if this is the wrong channel)
whadup.
Say i had a row with 13 slots and and i had 4 objects that can be assigned to slots.
2 of them can be in slots 1 - 6 and 2 of them can be in slots 7 - 13.
I already calculated the number of possible ways the left side can be arranged as well as the right side. to get the total ways these 4 objects can be arranged,
do i multiply or add their number of possibilities.
I feel like multiply would make more sense because for each position on the left side, the right side can be in one of its many positions

show that the formula Q V (P∧¬Q)V(¬P∧¬Q) is tatutology
can anybody tell how to solve this problem
what tools do you have available?
@stray reef do you mean by tools
did you accidentally a "what"?
anyway, i'm asking for some context. what class is this for?
what methods do you have?
What rules have you learned (ie De Morgan's)
like, depending on the class, a simple application of a bunch of Boolean algebra laws may or may not be appropriate
So you have equivalence and inference laws
I am using p ---> q equivalent to ¬P V Q
If you can slim it down to conditional sets you can use conditional proof and reductio ad absurdum to find your answer
can you explain what he has done here
he = who?
that's an application of the distributive law.
$Q \lor [(P \land \neg Q) \lor (\neg P \land \neg Q)] \ = Q \lor [(P \lor \neg P) \land Q]$
Ann:
@stray reef thanks
question, how am i supposed to show transitivity of matrices
partial orders = antisymmetric, transitive, and reflexive
or i should reword, how tf do i figure out if a matrix is transitive
@modest zealot look at the first matrix, u can see is 3x3
ye
oh
wait
i get it now
its the thing
where its like
(1,2) and (2,3) implies (1,3) is in there
GOTCHA
idk wat u mean
but look'
row 1, column 1 in the first matrix
what number is there
or another of saying, what number is at 1 - 1
k
whats the difference between a circuit and eularean circuit
It has to do with edges. Do you use multiple times the same edges? Do you use all edges?
obtain PDNF of P-->Q
=(¬P∧T) V(T∧Q)
=(¬P∧(QV¬Q)) V((PV¬P)∧Q)
=((¬P∧Q)V(¬P∧¬Q)) V((PV∧Q)V(¬P∧Q))
=((¬P∧Q)V(¬P∧¬Q)) V(PV∧Q)```
can any one tell how they got the last line
principal disjunctive normal form, probably
sorry
the correct one is
=(¬P∧T) V(T∧Q)
=(¬P∧(QV¬Q)) V((PV¬P)∧Q)
=((¬P∧Q)V(¬P∧¬Q)) V((P∧Q)V(¬P∧Q))
=((¬P∧Q)V(¬P∧¬Q)) V(P∧Q)```
how they got the last line
idempotence
Hi!
“The relation R ⊆ Z x Z given by (a,b) ∈ R ↔ 3|b-a is symmetric, transitive and reflexive”
Basically have to prove all three separate
and what's holding you up?
i don’t know how to start it period
my textbook doesn’t have examples with a divisibility for it
do you know the definitions of "symmetric", "transitive" and "reflexive"?
and of "divides"?
yeah i have them
you can't not know how to start if you know the definitions
have you ever proved any of those three properties for a relation before
no, only wrote the definition lol
okay, so like
let's do reflexivity. its definition is the simplest.
we want to show that R is reflexive
this means that we want to show that for every a ∈ Z, we have (a, a) ∈ R.
do you follow so far?
yeah
according to the definition of R, (a,a) ∈ R means 3 | a-a.
i.e. (a,a) ∈ R iff 3 | 0.
and 3 does divide 0, since 0 = 3 * 0 and so 0 is a multiple of 3.
yes, that is it
now for symmetric and transitive, how does it go?
cause for transitive there’s a a, b and c
it's all a matter of unpacking the definitions, really...
so how would you wrap it up after the i.e, if 3 | (a-b), then 3 | (b-a)
first you prove that 3 | (a-b) implies 3 | (b-a)
then you have basically proved that (a,b) in R => (b,a) in R
so you are done
hate to ask so much, but how do you prove that 3|a-b implies 3|b-a
b - a = -(a-b)
if a-b is a multiple of 3, then by definition there exists an integer k such that a-b = 3k
now you are trying to prove 3 | (a-b) and 3 | (b-c) => 3 | (a-c)
the trick is to use the fact:
if k | m and k | n, then k | (mx + ny) for integers m,n
how would you apply those integers to it
well
you are trying to go from (a-b) and (b-c) to (a-c)
the most natural choice for m and n would be 1 for both
what would k be? 3?
yes
would I write out that fact first and then apply it?
cause if I’m using 1 for both integers, it would be written out as 3|1 and 3|1
oh sorry
i meant
if k | m and k | n, then k | (mx + ny) for integers x,y
and the most natural choice for x and y would be 1 for both
so in this case, it would result in:
3 | (a-b) and 3 | (b-c) => 3 | ( (a-b) + (b-c) )
now simplify the parentheses
1 + 1 + 1 + 1 + 2 = 6
i count 5
Isn't the nod on b considered as two because it's not oriented
Like taking it both ways
?
@modest zealot
So it's 6
this logic feels weird ngl
I mean yeh you can consider too the arrow from b to c and from c to b
This will count as two
But it may also count as one because you are interested in one way only
Idk
oHHH
For which values of n are these graphs bipartite?
(a) Kn
(b) Cn
(c) Wn
(d) Qn
Also is the 8th question, and is worth 20 points.
"bipartite" means you can colour the nodes two different colors, such that no two nodes of the same color are neighbors
oooohhhhh ic ic
wut is Kn, Cn, Wn, and Qn, are those special types of graphs or something?
Uh huh.
Kn is the graph with n nodes, such that every single edge is between them
"The complete graph"
I can already see that K3 isn't bipartite and it gets worse from there
so Kn is the graph where every single node is connected with every single node
is there anywhere where i can search wtf these graphs r? its so annoying none of the notes or lectures explain this
:/
ok yea im doing that
but i can do it for other things like C and W and Q
ok found C
ok just to make sure
wheel graphs can NEVER be bipartitie
nvm
last question, is there a trick to draw a 2-tuple hasse diagram
part c
line 2 to line 3?
yes
basic algebra manipulation
yeah im kinda of missing what's happening
oh line 3 to line 4
what they did was factor out the (k+1)^2 term
thats about it
ohh i see it now
that brings the k^2 on the left side to the right inside the parentheses
that was what was confusing me
u okay now?
and then factor ye ye u got the idea
ye
why did they make the common dom 4 instead of 2
so you can combine the fractions
why not 2 tho
ye ye
yeah u right thanks im tired hahaha
happens to all of us, np
Nop. That's strong induction
ahh damn
i got wrong
@sour arrow does this seem right?
for proving the basecase
Hey guys
this is a big question, but this one questions has 6+ subquestions which is why it might look a little big
please, if i could get some help with this, im unsure if this is a function
Muncipality lillestrand has eight locations. Four of them lays on the islands "Storøy" and "lilleøy". The islands has none bridgeconnectons but there is ferryroutes from Oddeneset-Lillegrend-Storøyhavn-oddeneset.
Map over the municipality.
http://prntscr.com/n8n86i
We can consider the road network as a relation between locations. that means road⊆location×location where
location= {Lillegrend, Yttervika, Berg, Storøyhavn, Oddeneset, Skipperhavn, Solvik, Dal}
Specifically we let the relation be represented like this:
Road = {(Skipperhavn, Dal), (Skipperhavn, Solvik), (Skipperhavn, Oddeneset), (Dal, Solvik), (Yttervika, Berg), (Yttervika, Storøyhavn)}
Moreover, the ferry route gives rise to a similar relationship Ferry⊆location×location. Specifically:
Ferry = {(Oddeneset, Lillegrend), (Lillegrend, Storøyhavn), (Storøyhavn, Oddeneset)
What is Road◦Ferry
if anyone can explain before giving answers so i understand it would be very nice :)
check the definition of a function
hey guys I have a little question regarding product notation in the context of Cartesian products
as shown here
it relates to the Cartesian product paragraph on this wiki page
could somebody please explain said notation to me because I'm not quite sure I understand it properly
is this just building a set from every possible combinations of X and Y ?
@weary tiger
Still looking for it?
yup!
@weary tiger
First one has to talk about relations in general. Let's say we have two sets
A = {a, b, c}
B = {1, 2, 3}
And a relation between them:
R = {(a, 3), (b, 1)}
That set encodes the arrows of the relation. "There's an arrow from a to 3, and an arrow from b to 1"
yup, I'm familiar with relations
Perfect! Notice that R is a subset of A×B and will always have to be
So we define a relation that way
yup!
A function is just a special type of relation, so all functions from A to B will also be subsets of A×B
OH you're just not sure of A×B, is that it?
A×B is indeed just every combination of A paired with B
what do you mean by "both x and y"
the objects being compared here are ordered pairs
not individual real numbers
i have P(A) =0.3 , P(B) = 0.4, P(notA) = 0.7, P(AB) = 0.1
how do i find P(notA and B)
So how would I compare ordered pairs; because for reflexivity isn’t < for anything already not reflexive
what is "rule P" and what is "rule T"
even I do not know
rules of inference
Since P is true, P->Q implies Q is true by modus ponens, and since Q is true, Q->R implies R is true from modus ponens again
Rule P is just your starting premises which are given
thanks
@stray reef senpai pls
well what are you having trouble with ig
i have to determine whether the structures build semigroups, monoids, groups

,$ (\bbQ, o) x\ o\ y = x + 2y
yami:
@stray reef ok i got this but im in actual trouble now XD
except i dont know about this one
let A be a set. $ X = A^A = {f : A \rightarrow A} $ the set of all functions of $ f : A \rightarrow A $ with the opration $ f \ o \ g $ (sequential execution of functions)
yami:

