#discrete-math
1 messages · Page 160 of 1
Let us look
Commander Vimes
@hardy quartz any ideas how to use definition of a_n here?
no not really tbh LOL
Well consider what happens when you factor 1/3 out
Commander Vimes
Hello. I want to compute distance matrix from adjacency matrix for a simple undirected graph. I know what each of these matrices are but how do I get a distance matrix from adjacency matrix? I want to know about the logic and why it will be true.
I found one method in which the powers of adjacency matrix is used to evaluate number of walks. I am not crystal about the approach though
the powers of the adjacency matrix count the number of i→j walks, not paths (a walk can repeat vertices, while a path cannot). So, to create a distance matrix you need to iterativerly power your adjacency matrix, and as soon as a ijth element is non-zero you have to assign the distance k in your distance matrix.
So if I get the number of walk between 2 vertices, so in general if no such walk of length less than k exists from vertex i to j , then the i-j th entry of our k-th power of adjacency matrix would be zero, if we get a value of 1, then that would be the minimum distance and hence the value in the distance matrix.
What I don't understand is, why will the powers of adjacency matrix will give number of walks?
What am I doing wrong on part C? I think I'm confused on the symbols. I'm reading it as "what is the least element of the set n^2+3 that is an element of the set of natural numbers. Any suggestions as to how I'm getting this wrong? Not looking for the answer, just some direction.
Oh, wait.. is it 3?
is 0 in N
no
n^2+3 is not a set
but the result would need to be in the natural number no?
anyways, this is the set that consists of elements of the form n^2 + 3, where n ranges through all natural numbers
Could someone check out if I did these sequences correctly
so wouldn't it just be 1 since 1 is the least natural number?
sorry, just trying to grasp it.
so you have {left side : right side}
@pale epoch but the outputs are correct right?
the left side tells you how the elements look in the set
i wasnt replying to you @autumn pebble
and the right side tells you what "rules must be obeyed"
so here your elements are of the form n^2 + 3 and the rule is n is in the natural numbers
so e.g. 28 is in the set because it can be written as 5^2 + 3
and 5 is a natural number
103 is in the set because 103 = 10^2 + 3
etc
So if I was looking for the smallest number, I'd find the smallest number in the set right? So, wouldn't that be 1? ie. 1^2+3= 4? Because 1 is a real number.
yes, but then 4 is the smallest number
are you sure that 0 is not a natural number?
I absolutely thought so.. but maybe not? I'll try three once I get the last one and see what it says.
Thank you for all the help. You are awesome.
It was 3. So she must be considering 0 a natural number. Thank you.
ew
0 is my favorite natural
Using A={7,8,9,10,11} B={9,10,11,12,13} and C={8,11,13}... then BuC={8,9,10,11,12,13}, meaning A ∩ (BuC)={8,9,10,11}. What am I doing wrong here?
overline probably means complement
Yes.
I'm now sure the formula is wrong
But I don't know how to fix it
@finite depot I'm trying to get rge number of surjective functions given two finite sets of power |A| and |B|
You made the formula?
How do you know
Because it counts for every case one time
For example, if we consider only one element as image of f it gives 1 and not m
When you calculate the number of non-surjective functions, that is
From my understanding m is the amount of elements in the set A
Yes
Why there are odd number of | in your formula?
@finite depot the central one is just "such that"
Ah
Inside the curly brackets
Are you trying to find the combinations?
No
Assuming m = {1,2,3} n = {1,2}
I need the amount of surjective functions from A to B
What is Dr mn
What’s rhe value
m^n
Can m > n?
Yes
m < n?
wtf
Hmm
What is so strange?
@spring temple how do you think I can change the formula to make it right?
Pinging you because you seemed interested
Uh.
Haven't really thought about it beyond trying to figure out what you were asking.
Uh...
Yes.
Otherwise it's simply impossible to be surjective.
I just thought of the definition of dispositions witg replacement
And there m can be >n
or equal to
Break it into cases.
1
Hmm
There are more than 1 if n=m
a0 -> b0, a0 -> b1, etc.
n!=m!
That sounds right.
Not 100% sure, as I haven't thought it all the way through, but it sounds right.
And then for n > m, you have some duplicates.
That would not be a function.
look at the circle equation
@finite depot but it's not a function
It is not a function.
It's just a relatiom
It's an expression defining a locus.
x = y^2
Is not a function in x.
It would be in y
isolate it
For x it's just a locus
For something to be a function, f(x) -> one value for all x in the domain.
It's a hard requirement.
@finite depot this is not a function for x
Please stop querying wolfram. This is not in question and we are not mistaken.
Well, let's return on our problem
For every element in A, the function will map to a single element in B.
More than one element in A can map to an element in B for it to be surjective.
It's the opposite that could be false
And -every- element in B must be mapped to.
2 output
Yes. That makes that not a function.
why?
Because a function requires that every input have a single output.
In mathematics, a function is a binary relation between two sets that associates every element of the first set to exactly one element of the second set
Literally every book will tell the same thing
k
Well let's return on our problem
Yes, because each element of B can have only a single counterimage
So the second element has n-1 choises
And so on
You have each element of B with at least one counter-image.
so n!
And then n-m extra.
Yep
To be distributed however you like.
I'm not sure how to work out the combinatorics of that.
The problem is the balls are numbered
Ok look, I'll show my reasoning
but why n! ?
For the first element of B, there are n possible mappings.
@finite depot for the case n=m, the function can't be but bijective
For the second, there are n-1.
For the third, n-2
etc.
n!
This only works for n=m
A = {1,2,3} B= {1,2,3}
1,1
1,2
1,3
2,1
2,2
2,3
3,1
3,2
3,3
This is not a function
they are set
Yes, but you have to follow the definition of function in order to find the right answer
That rule of function I broke?
For example (1 > 1, 2 > 1, 3>1) is not a surjective function.
As not all elements of B are mapped.
I'm not sure how to interpret the list you've made.
If all of those are one mapping, then it's not a function, because 1 is mapped to 3 different elements of B.
We're counting -mappings- not combinations of elements.
@finite depot what you found is just the amount of possible relations
And specifically, -surjective- mappings.
So for each function from A -> B, choose three of those relations.
One for x=1, 2, and 3.
And insure that every y is present.
So if we pick (1,1) then we could also pick (2,2) and (3,3) OR we could choose (2, 3) and (3, 2)
If we pick (1,2), then we can choose (2, 1) and (3,3) or (2, 3) and (3,1)
And if we pick (1,3) then we can choose either (2,2) and (3,1) or (2,1) and (3,3)
That's every possible surjective function from {1, 2, 3} to {1, 2, 3}
Anyway, for the n > m case, I'm probably not going to be much help. Combinatorics was never one of my better subjects.
@spring temple I'll show how I processed this
My method was to get the number of surjective functions from the total amount of possible functions removing the non-surjective ones
If you can find a general formula for case n>m
Then it does also apply for case m=n
That's what I'm doing
The total amount of functions is tge dispositions with replacement of |B| in |A|
So $|B|^{|A|}$
Italyball
Then I can remove all the non-surjective functions
Given $n<|B|$ elements, the amount of functions to remove is $n^{|A|}$
Italyball
@stable kettle right?
Nah
I found the mistake
Like I said, combinatorics was never my strong suit.
The number I said is valid only for those n elements
I can do it, but I have to put a lot more thought into it than I'm able to spare right now.
I see
Why are you doing this?
Because I had an exercise for this problem and wanted to find a general case
I think I fixed it
I have the belief I found the final formula
Yes
a way you can do it
but its a bit computational so cba
is consider it using inclusion exclusion by thinking of all functions that dont hit one of the values of B
then all of the functions that dont hit two of them and so on
them using inclusion/exclusion on that and subtracting from total functions
i dont think theres a nice way and will probably always result in a sum
This is my guess
Where D stands for simple dispositions and D^r for dispositions with replacement
@weary tiger I'm a first grader at uni so yeah
Take it with a grain of salt
The problem is that this answer tackles only low powers of A and B
The non important cases are eliminated by simple observations
Italyball
I had made a little mistake
I'm pretty confident this is a fulky right answer
Well, if |B|=1 it works
If |B|=2, |A|=2, it works
I think we are onto a winner
For any value of |B| it works
Now I have to look for what happens when I change |A|
Nope it doesn't work
The second member doesn't work anymore when |A|>2
@weary tiger since I don't know what inclusion exclusion is, I tried to do it myself
@spring temple welp, my try has failed lmao
At least it's an A for effort 

Did you learn anything?
Other than "This way doesn't work" that is. (not that that's a bad thing to learn)
Welp, I was applying in my mind how to work with combinatorics in this particular case
For some reasons, this formula actually got right the answer to the statement that sparked this whole thing @spring temple
And I was like "yes, this has to be right"
But nope
Wait
No nothing
I thought I found the mistake
But nope
If someone wants to tackle this
To modify my formula
For $n \geq 1$, let $S_{n}$ denote all bijections from an $n$ -element set to itself. Prove that $\left|S_{n}\right|=n !$
Moosey
What would be a good way to phrase this induction wise? I meant I feel like I can't just be like oh, {1} -> {1} only has one bijection, {1,2} -> {1,2} has two, so on
assume {1,2,3...k} works
I'm just strruggling to sound technical with it
haha
Use a simple combinatorial argument?
???
Since you'd like bijections, map an arbitrary element to any of the n elements, then map another element to any of the remaining (n-1), and so on. The number of unique bijections you get is n(n-1)(n-2)...1=n!
Yes. I understand that
because for each f(nth element) you'd want to preserve injectivity
Yes.
I'm just struggling to sound technical with that though haha, and I think our professor wants an injective arguement
If you want an argument by induction,Take S_(n+1) ,now map the first element to (n+1) available elements
Now you are left with having to map n elements to n elements bijectively
That is,we have the case of S_n
So, |S_{n+1}|=(n+1)|S_{n}|
so would I need to define a function for a bijection, and a set for the bijections to take place between for base cases
or
is there a way not to do that
like could I say "observe that there is only one possible bijection between set of one element" or like, "define a bijection B_n that goes from nth element set to another nth element set
Hmm...reading closer, we don't have to use induction, so I might just do the other case, since it seems much easier.
Without using induction, we can prove this. Let $f: A \rightarrow A$, where $A$ is a set containing $n$ elements, and f is a bijective function. Let us start off with an arbitrary element in $A$, and label it $x_{1}$. $f(x_{1})$ must map to one value out of a possible $n$ elements in $A$. Let us go to another arbitrary value in $A$, and label it $x_{2}$ We know the possible values $f(x_{2})$ must be $n-1$, as it cannot be $n$, otherwise there would be an overlap, and $f$ would violate injectivity. Let us pick a third arbitrary value in $A$, and label it $x_{3}$. To preserve injectivity, $f(x_3)$ can only be a possible $(n-2)$ values, as if it were $n-1$, then there would be an overlap of values, and it would violate injectivity. Continuing this process to until we reach the last element that hasn't been mapped, we label it $x_{n}$. $f(x_{n})$ can only be $1$ possible value, as if it were $2$, it would violate injectivity, and overlap with the possible values of $f(x_{n-1})$. Combining all these possiblities, we get the product $n(n-1)(n-2)...=n!$ It's clear to see this is equivalent to $|S_{n}|$.
Moosey
I always end up being too wordy
and being vague
If $f$ is a bijection from a set $A$ of cardinality $n$ to itself, then let $(a_{1}, ..., a_{n})$ bean ordering of the elements in $A$. The number of possible elements $f(a_{1})$ could be then to allow $f$ to remain injective is $n$. It’s then easy to see the number of possible elements $f(a_{2})$ can be is $n−1$ elements to remain injective. We willc ontinue this process until we get to $f(a_{n})$ This could only map to one more element in $A$, which would be the last element left in A, making $f$ bijective. Simply combining these possibilities into a product leads ton $(n−1)(n−2)...(2)(1)$ It’s clear to see this of the form $n$!, which is the number of possible bijections from $A to A$, i.e.$|S_{n}|$
Moosey
you are literally writing
First element can map to n things second to (n-1) and so on so there is n*(n-1)*..*1=n! bijections
seems a bit longwinded
thank you
I feel like I shouldn't just say that though
so I don't have to specify a set, or anything like that???
I do recognize that it is brief
I just struggle putting these proofs into words
haha
and scared I will miss a case or smth
or my professor will be like 'oh what if n is 1' so n-2 doesn't make sense
just like, something annoying like that
i do not understand the third row can someone please explain
this is a definition
but this is the so called principle of explosion
if you assume something that is false, you can deduce anything
ok so it just be like that?
kinda
the formal reasoning is, that if you assume $p$ to be both true and false, then you can consider $p \lor q$
Lochverstärker
now that is true, because p is true
but p is also false, so q must be true
therefore proving any q
this explains the last two rows
the way i was taught is, if p is false then whatever u say after it will be true, an example is if the sun is purple then the moon is green
since the first thing was false it doesnt matter what you say after, it will always be true
I am not sure what these questions are asking
In how many di↵erent ways with respect to their numbering (irrespective of colour)
can the 11 sphere wood pieces be arranged in a line of length 11
Justify your answer
How would I do this
Try to think of it this way: to get a spanning tree you must remove enough edges to get rid of cycles in the graph (on the other hand, once you get rid of the cycles, you can't remove more edges, since then it will no longer be a spanning tree).
so there must be 5 edges for all spanning trees, right?
only 5 edges, not more not less?
<@&286206848099549185>
Yes
@iron pine The question becomes: how many ways can you remove two edges to get a spanning tree?
how can i generalize the solution. is there an explanation that says remove those edges which has those features
First of all, did you solve this specific case? Generalising to any graph seems to be very non-trivial
Yes, it is an interesting question, we can try to discuss it and work something out, if you want
I mean, the goal would be to come up with an algorithm that counts the number of spanning trees, I guess
Well, for that I guess you just need a modification of breadth search though
Actually there is some formula called kirchoff . but if i want to think only this question i have detected the edges that I should remove one by one. If someone asked you forgot these 2 combination what should I say. Or if this graph were bigger what would I do
how can i generalize the 2 edges that i should remove
this is more spesific and logical question i guess
Well, there is one class of graph that is simple: if all the cycles in the graphs are edge-disjoint. Then you could remove any edge in each cycle, so the number of spanning trees is just the product of the sizes of the cycles
In the above graph the cycles intersect, because of the edge b-e
So that makes it a bit more complicated
i wonder something else, is it always n vertices and n-1 edges in spanning trees
and also the subgraph should include all vertices. i can remove edges but can not remove vertices?
Yes, this is true. Also, you can't remove edges that disconnects the graph - then the subgraph can never be a spanning tree
(It could still be a "spanning forest", but that's something different)
ok. thanks a lot. i am really really grateful
all of those information is really helpful for me
Np. When it comes to counting spanning trees, I think the thing that complicates it is overlapping cycles. So a graph with high connectivity (= many edges, so a complete graph has the highest connectivity), will have many overlapping cycles and the counting of cycles will be more complicated
is there someone who knows graph theory?
yes
no
I’m stuck at this part where I’m trying to show a relation between gcd(x,y) = gcd(x +ky, y) through z
How can I show a relationship between the two sides?
I know that if k is some multiplier of y, ky will be divisible by the same values as y
can someone explain to me what this means
a set S is countable if one can find a bijection between natural numbers and S
do you know what a bijection is?
or.... i guess you do since youve done some ring theory
It means you can define a function f : N to S such that f is injective and surjective
intuitively, it means you can use the natural numbers to enumerate the elements of S in a sequence
bijection is onto and 1-1
ohh, do you have example for that
ik N would be natural numbers but what is S ?
any set?
what do you mean by countable?
okay loll i came up with this example
will that be right?
is f injective?
hmm i was trying to show that it was bijective
Can someone explain to me why a conditional statement with a false hypothesis is true?
nevermind lol, it just clicked after 20 minutes of thinking about it.
I guess it's free here
I have an exercise where I'm asked to prove the following sentence
Leo X de' Medici
The first thing I did was to divide the problem in the two subparts
Determined by the two directions of the iff
But then... I don't know how to continue
Like I have to prove in the first case the whole equality on the right?
<@&286206848099549185>
Welp, I resolved the first step of the problem
Now I'm trying to resolve that, given that the intersection of the images is equal to the image of the intersection, f is injective
I tried going this way:
We set $x_A \in A$ and $x_B\in B$ such that $f(x_A)=f(x_B)=y$. This tells us that $y\in f(A)\cap f(B)$ and, by hypothesis, we get $y\in f(A\cap B)\iff x_A,x_B\in A\cap B$
Leo X de' Medici
But I don't know how to continue, since there is nothing that can help me say x_A=x_B
@pale epoch My problem continues over this one
It's a continuation of what I posted before
yes, i know
A and B are subsets of the domain
in this direction the idea is that you choose A and B
generally you want to show f(a) = y = f(b) => a = b
so now you should choose smart subsets A, B of X and use the hypothesis
Yep
That's what I tried
But I only get that a and b are in the intersection of A and B
I can't find a condition that makes them equal
again, what is A and B?
Subsets of the domain
that's not very specific
Proper subsets of the domain
Yes
and you want to use this to create a statement about sets A, B
Yes
you can freely choose those sets A and B
it makes sense to choose an A such that a \in A and B such that b \in B
do you know a specific subset that includes A?
It's what I did
Uh
The two sets can be any of the proper subsets
A and X
what's A
A is not given
X ok, but that won't work
what's the smallest set that includes a?
(the exercise doesn't even matter to answer this question)
{a}?
yes
and certainly b is in {b}
and both {a} and {b} are subsets of X (since a, b is in X)
try applying what you know about f with those sets
OH
I set A to be {a} and B to be {b}. I know that f(a)=f(b)=y that belongs to the intersection of the images of A and B. For supposition, y belongs to the image of the intersection, so a and b are part of the intersection, but we know A and B contain only a and b and we're looking for the intersection, so we get that A=B, so a=b?
@pale epoch
essentially
I think I haven't explained it really well
writing it down "correctly" is a bit iffy, but that is the idea
you can also assume that a != b then the intersection of {a} and {b} is empty and then ...
Actually, the fact y belongs to the intersection of the images is enough to say that the intersection isn't empty?
what intersection?
Of A and B
well, you get that $f({a}) = {y} = f({b})$, so $f({a} \cap{b}) = f({a}) \cap f({b}) = {y} \neq \varnothing$
Lochverstärker
Both because of the supposition and for the definition of image, I suppose
yes
and well, if a != b then the intersection of the sets is empty, but the image of the empty set is the empty set
I get the steps to do. This is more of a off-topic question, but during a demonstration, adding additional properties to generic objects (like subsets in this case) can be done every time?
As long as the object is generic obviously
what do you mean by additional properties?
Like for example the fact here that I took subsets that contained only the elements I was considering
in this case you had a statement like "for all such and such you know that this is true"
and if you want to deduce something from that, you kind of have to make specific choices
and since you wanted to show something about elements a and b, there weren't many choices
you were only given that some statement is true for all subsets and you were given a, b in X
so there are really only a few subsets you even know can exist
X, {a}, {b} and {a, b}
@pale epoch I see. I've never been good with mathematical demonstrations...
Hope I'll be able to get better with them
Thanks for the help! 
Can anyone help woth mathematical logic questions?

I know this looks kinda rough in terms of a proof because I haven’t really formed proper sentences but my idea was to use a 1 to 1 correspondence to prove that both sides are equal,
Which means I have to show LHS <= RHS and RHS <= to LHS for them both to be equal
Is this a good approach for the problem I am attempting? I’m sorta lost as to what I need to do to prove this.
where did this come from?
@mystic moss I deduced it. It is a generalization of a result that is found in Stanley's Enumerative Combinatorics.
@mystic moss Here is a more interesting one.
@obtuse lance
im having trouble trying to figure out which one of these are statements vs propositional functions
initially i thought these were all prop. functions
by "where did this come from?" we're not asking for a physical location, but a derivation or counting problem or something
otherwise it's just a random formula without useful context
@obtuse lance It is based on counting the number of ways to distribute objects of different types to different people.
So, you might be distributing n objects of t types to p people in some fashion.
I see, and you derived this with generating functions I guess which is why you want a combinatorial argument?
I did not use generating functions. I used a combinatorial argument.
@lyric pumice what do the double parentheses mean?
@mystic moss Multi-choose.
what does the upside down A mean?
ok what about the rounded E
"element of"
o ok thx
if a relation R exists between elements of the set A X B, is the domain of R A, and the codomain B?
or would it be x for (x,y) in R for domain and y for (x,y) in R?
Can someone confirm that I did this negation right? I’m new to discrete apologies
wouldn't it be x ≥ n instead of x < n
Ah I see thank you
It would likely be a map from AxB to itself, i.e., (x,y)R(p,q) for (x,y),(p,q) in AxB.
@gritty crescent i see so in terms of like python it'd be like
C = D = {-3,-2,-1,1,2,3}
R = {(x,y) for x,y in itertools.product(C,D) if ((1/x)-(1/y)).is_integer()}
Rdomain = {x for x,y in R}
Rcodomain = {y for x,y in R}
just trying to see if i have it right
I'm not entirely familiar with programming, but it looks good to me.
At least the math bit seems legible.
alright cool so like
the domain of R is exclusive to the elements that fulfill it (excluding those that don't fit the relation that defines the set)
and the codomain is exclusive to the result of the method applied excluding those that don't fit the "rule"
ok
i see, makes sense. the first one was nice
but i haven't gotten the second yet
Sorry to bother you, but in this case the domain would then be {-1,0,1} and codomain would be {u,w}? @gritty crescent
Hi, I am doing a formal proof (well, formal enough anyway) which involves a set n and I am currently at the step |n|=2+a (a is a natural number {0, 1, 2, ...}). Essentially, I have proven that n has at least two elements. I need to instantiate two elements of this set n. This is my best guess as to how I can get there, is my logic correct? Any suggestions? I am not the most experienced with formal proofs. (note that I didn't really get to step 1 by assumption, but the previous work should be irrelevant). Any help would be greatly appreciated! Thanks! 🙂
P.S. I would appreciate a mention if I get an answer bc I have the server muted. Thanks again!
You're right about the domain, but the codomain would be defined as the entire set B, i.e., {t,u,v,w}.
@mystic moss Oh, good.
Hmm. I think I need to retract the second one.
@mystic moss
Yeah, I’m not seeing where you got the rt from on the RHS.
I think that this might be the right place! Sorry in advanced if not. I'm trying to understand this set, to me it seems like it's a set of 1 unit, a singleton (1,1),but I'm not entirely sure. Would appreciate if anyone can confirm
Did you get x.y=0?
I thought x,y could only be equal to 1
Or does your defn of N not include 0?
Yeah 1 and up
Yea, It's a singleton if so
Thank you!
The first of the 2 statements(linked by or) will always be false
Yea, It's just the singleton (1,1)(because 2nd statement)
I understand
Thank you
so from the previous identity, each of the factors on the LHS should reduce to $\left(t\choose{x_l - rt}\right)$, but the first term in the alternating sum is already that. is that intentional? do the rest of the terms happen to cancel out?
Madeleine
@mystic moss That looks right. It is somewhat awkward, but the setup will prove to be important in a later example.
i know there is an even amount
in graph G
is it asking for the complement of G? not sure
yes the complement graph
doesn't it not work for r=1, t=3, and x_l=4?
Wait to make sure I’m thinking this right, Φ = {Φ} and Φ < {Φ} is not true but Φ ⊆ {Φ} is true right?
in set theory its correct that {} is an element and () is like an array, but I can't recall is array the right word?
e.g. say you had
{(1, 3), (1, 4), (2, 3), (2, 4)}
actually wait
this is confusing, help
what are the two differences in brackets here basically regarding set theory
is this right?
- () = ordered pair, collection of 2 elements```
pls @ me when responding
wdym?
Consider the following 2-player pebble game. We start with n pebbles and the players take turns removing1,2,3,4, or5 pebbles. Whoever takes the last pebble loses.For which n does the second player win?
i really am not sure how to start answering this
i also need to prove it w induction
For a sentence to be a proposition it needs be declarative. Consider $x + 1 = 2$ it is not a proposition. Could we turn it to be a proposition if we add $x in {1,2,3}$?
Noby707
can someone help me with a proof
so since p/q is a root that means $a_n(p/q)^n+{n-1}(p/q)^{n-1}+...+a_1(p/q)+a_0=0$
ScapeProf
if you then multiply by $q^n$ on both sides of the equation and do some simplifying and isolate $-a_0q^n$ you can then deduce that p divides $a_0$
ScapeProf
and use the same trick for showing q divides $a_n$
ScapeProf
@noble wasp
yes
can someone help with the part of this question where I use the inequality to prove the interval thing im not sure how to go about it
Just going to say I spent an hour trying to do a logic puzzle problem and didn’t get it right
it’s a tough life out here for the logically challenged
Hello, how would I convert a given pi digit at a certain position from hexadecimal to decimal?
My program is outputting the following in hexadecimal, but I can't manage to convert it to decimal after searching on Internet several times 3.243F6A8885A308D313198A2E037073
Any ideas?
i think you just want to convert it to decimal first, since the digits before it will also affect it
just the whole thing
The number would be way too long
This seems to work before the 300th digit : ```lua
local dec = string.format("%x", hex) / math.pow(16, position) * math.pow(10, position)
dec = dec + overflow
local whole = math.floor(dec)
overflow = (dec % 1) * 10
return whole```
You could do some bit hacking for that but I dunno seems like that would be overkill. Something similar like converting the binary to BCD and that way get your position but I think double dabble would overflow aswell defeating the whole purpose.
I am trying to think of a better solution using Boolean algebra and modular arithmetic. The thing I proposed would be overengineering
Well, as long as it is reliable. Computing power doesn't really matter in my case @warm isle
I'm not looking to compute millions of digits
yo
this is number theory
could someone tell me what that symbol of the circle with the dot in the centre means
multiplication operator?
so it could be anything ?
yup
can someone explain this to me, given no n and k, now we split n into k numbers, like if n=6, and k=4, then 6=1+1+1+3, or 6=1+1+2+2, ...
so whichever combination i choose it cannot have the maximum no smaller than 2,
now how do i find that number??
the ans is floor((n+k-1)/k) but how??? (for n=6, k=4, this gives floor(9/4)=2)
?
In this video we discuss how to get from the secret private key number (a.k.a. exponent) to the WIF and how to get from the public key to address formats. He's the code: https://gist.github.com/Nikolaj-K/d548a12a45599070ea89ff376803758b
Hi, I'm new to Discrete Math and I have trouble figuring out this problem.
Consider these relations on the set of integers (Z):R1 = {(a,b) | a ≤ b},R2 = {(a,b) | a > b},R3= {(a,b) | a = b or a = −b},R4= {(a,b) | a = b},R5= {(a,b) | a = b + 1},R6= {(a,b) | a + b ≤ 3}.Which of these relations contain each of the pairs(1,1),(1,2),(2,1),(1,−1),and(2,2)?
anyone know how to go about making a truth table for this problem. I know how to for P but the variable 't' in the Q= expression is throwing me off
the goal is to find if P is logically equivalent to Q
Are the statements all do not and none do logically equivallent?
are those even statements
If the statement was "None of the cats liked the fish" and "All the cats did not like the fish"
Like so
For all, not this and not this, and not this
see this way it's a lot less confusing
yes those are equivalent
Ah okay just checking
Am I allowed to write three quantifiers in a row like this
there is a student in your class who has this animal as
a pet.```
So I assume saying E!x etc. and etc. and etc. means there is one unique student who owns all 3
but the question is asking one singular student owns one animal each
Ann [omw out]
anyway i would replace those commas with ands
$(\exists x: C(x)) \land (\exists x: D(x)) \land (\exists x: F(x))$
Ann [omw out]
Oh I'm really stupid I read the question as there is one student not there is a student
that makes sense ty
Why is the following inequality correct? (metric graph theory)
$diam(G) \leq 2 rad(G)$
271828
can you remind me of the definitions of diam(G) and rad(G)
i'm guessing diam(G) is the max distance between any two vertices
but i don't remember what the radius is
radius is the min of all eccentrities
and the eccentrity of a vertex v is the maximum distance between v and any other vertex
uh huh
well
ok
let r be the radius and let c be a vertex of eccentricity r
(c for center, etc.)
then i claim the distance between any two vertices is at most 2r
because to go from a to b you can go through c
d(a,b) ≤ d(a,c) + d(c,b) ≤ r + r = 2r
d(a,b) ≤ 2r for all a, b ∈ V
triangle inequality is very very important
Is in a graph theory hw
how do I even setup this problem to try and use graph theory lol
something something colorings
Is there a way to find the number of possible graphs, where each edge has length L and each node has valence w, that can be fitted inside a given shape like a square of length b for example?
I think it'll be generally an infinite number since you can place vertices arbitrarily close together. You might be restricted based on trying to get the valency to match up though.
for instance in the valency w=2 case we can make every possible even cycle in a square as long as L is less than the b*sqrt(2)
oh how did you get that
maybe I'm wrong I didn't work it out so there could be some issue in the details
Heya, I just wanted to verify if a proof I did was "enough" sound proof
ok, show your proof
assuming a is an element of Z+, and a = (b**2)c, where c must be square free and c must not have a prime factor of the form (4x+3), I have to prove that a is the sum of two squares
The way I interpreted "Having a prime factor of the form 4x+3" was that basically it had to be something that ISN'T logically equivalent to 3mod4
b**2?
b^2
right hold on
(sorry, am a programmer)
pythonist, huh.
so you're given that $a = b^2 c$ where $c$ is squarefree and has no prime factors that are 3 mod 4... and you need to prove $a$ is a sum of two squares
Ann
right
okay, how are you going about doing that?
So basically, I did a proof beforehand that basically said
no "basically" if possible, please.
do you have the proof written out on paper or something?
chicken scratch 😅
i for one would prefer to have it in a form where i could look over it as a whole
oh.
but, I was able to deduce by cases, that a number $n = j^2 + i^2$ can only be equal to 0mod4, 1mod4, or 2mod4
Bread
simply by plugging in cases such as i = even, j = odd, etc...
There was no case where n had the form 3mod4
okay, so no sum of two squares is ever 3 mod 4
Yeah
yeah, so what
would that be something I can basically carry over as a proof?
you haven't presented any proof yet
you proved "sum of two squares => not 3 mod 4"
notably, this doesn't imply "not 3 mod 4 => sum of two squares"
i'm still waiting for you to present your proof of the result you posted originally:
that if a = b^2 c, where c is squarefree without prime factors that are 3 mod 4, then a is a sum of two squares
Ahh alright, I might have to think about the semantics a little more then
so do you have a proof or not
im serious you havent given me anything i could check yet
OH WAIT I think I know where I'm making the wrong step
I thought I could use the proof I made earlier but I forgot that m is square free
Hold on, I will try to answer this myself and get back to you when I am done, sorry to take up your time
m?
I mean c
b^2c is also the sum of two squares if c is a sum of 2 squares
but I didn't catch the fact that c must be square free
that's where I tripped up
proving that c is a sum of two squares implies b^2c is a sum of two squares is relatively trivial
yeah
ngl, i looked back through my 1st year notes and it sounds like what youve set out to prove is a pretty tall order
xD I mean, I am 2nd year haha
hi guys
discrete maths make me want to jump of a bridge
ive just started decrete maths this semester
Hey guys i hope u all doing well 😊 . So guys i need sm help in the part ''b'' of this question. Im really confused and i don't know what to do exactly 😅
Let R be defined as a relation over ℕ ✕ ℕ as follows.
((n,m),(k, l)) ∈ R ⇔ n + l = m + k
a) Prove that R is an equivalence relation. ✔️
b) Characterize the equivalence classes and Quotient set generated by this relation.
Hey guys, got a few questions, and just wanted to make sure if I did this problem correctly.
@weary tiger Let us express (A) to help find an expression for (B).
It reads in my interpretation as this:
There exists an object y st. y is a real number and for all objects x, if x is a real number then y is greater than x.
And before seeking to symbolically translate (B),
Ask yourself if (A) is sensibly true.
From intuition, is there a real number larger than every other?
Obviously not, right.
And how might you convince others this?
||Suppose there were. Call it inf. What about inf + 1?||
@noble wasp you've got infinum and supremum the wrong way around
and why would sin(1/7) be the smallest when you can have sin(1/8) (and then sin(1/9) and so on)
why randomly stop at 7 tho
hm yeah but would it be infinity?
hmm im lost lol
and you mixed up supremum and infimum in your screenshot
you got it right that the sup is sin(1), because sin(1) is actually an element of your set & is greater than all the other elements
do you understand that much
y/n
yes what you told me yes
okay
now to deal with the infimum
do you agree or disagree that 0 is a lower bound for your set?
oh, i got confused with that
0 <= (any element in your set)
agree or disagree?
agree
okay
now, can we make this bound tighter? that is, can we put a number bigger than 0 on the left, such that the inequality is still true?
the answer is no bc sin(1/n) gets arbitrarily close to zero for large enough n
ohh, question can we plug in 0 into sin (1/0) and it will make it undefined?
and why, pray tell, would you want NaN in your set
what is nested union of sets?
Commander Vimes
@ember solstice
in the context of finitary closure operators
@lyric pumice you still here?
i need some help interpreting (b) in this exercise, i don't quite understand the relation here
what is the meaning of x + 1 and why is it not used on the right hand side?
if x = 1 and y = 3 what would P(x,y) be and why?
can someone explain how to find the subgroups of a group?
in general it is not easy
can you help?
are you looking at a specific group?
well, in this case the group has small order (namely 6)
so there aren't too many possibilities due to lagrange's theorem
Is order the amount of elements in the set?
yes
so would the possibilities be like {0,1},{0,2}....
have you covered lagrange's theorem?
ok, so what orders can the subgroups have then?
3?
yes, but that's not the only possibility
and 2
yes, and also 1
and one is the identity ?
does each of the subgroup contain the identity?
ok
now is there anything you know about groups of order 2 or 3?
did you cover cyclic groups?
yes
then check your notes (or try to prove) that groups of prime order are cyclic
then conclude that all proper subgroups of your group must be cyclic
and this should tell you what to look for
eh, not necessarily
- is defined in a weird way
but that doesn't matter, because proper subgroups must be cyclic
(at least in this case)
how do i list the possibilities?
what is a cyclic group?
a group that is generated by a single element
yes, so you have to look at those subgroups
as they must be cyclic, they are generated by a single element of the group
what is the generator
thats long 😫
i don't think there is much else you can do
what are you trying to compute? the number of possible permutations or just the functional ones?
i am certain there are different ways to look at this
the way i would look at this is the following:
you have n possible spots
and a configuration is uniquely determined by where you place the defective antennas
so out of the n spots, you have to choose m spots on which the defective ones would be placed
well, is there a difference between placing defective antennas at spot 1 and 2 and placing them at spot 2 and 1?
indeed
i have an idea, but it's not fully fleshed out
ok, so imagine you place the defective ones first, all in a row
then you have m-1 spots (ignoring the edges) between them
and into each of those inbetween ones you have to put at least one functional antenna
so it's like placing n-m identical balls into m-1 boxes
such that each box contains at least 1 ball
i think this is stars and bars?
hm, actually you have to consider the edges as well
so this is not quite correct
but there might be a simpler way
For (b), it would be 6 ways right?
and would (c) be null?
it probably is just 1 way though.
c is 1,b will be 4!/2!=12
Yes
When everything is distinct you have 4! Cases
Let's take A,B,C,D,E to denote the 5 distinct shrubs
Now suppose A and B are of the same type, note that
ABCDE and BACDE would have been distinct if A and B weren't the same,but assuming they are same makes them identical copies of each other
For each ordering,you can find 2 identical copies in the original arrangement
2!(distinct arrangements)=4!
And that will apply the same even if its arranged in a circle?
Okay thank you I think I understand
mirzathecutiepie
mirzathecutiepie
mirzathecutiepie
mirzathecutiepie
mirzathecutiepie
mirzathecutiepie
@mystic moss Hello.
@lyric pumice so did this counterexample work?
Yes, it is a counterexample.
ah wait, so is there a way to tweak the expression to make it true?
ah do tell!
I'm working on a challenge problem.
i guess i'll see it when you put it up then 
Im confused why there is no 2 R 3 for this example
@rustic stratus there is
is it just not listed?
ye
its just using examples
1 is related to 2, 2 is related to 3 and 3 is related to 1
okay ty
i did (a) of this exercise, but i am realizing that i don't quite understand what a corresponding relation means, e.g. in (b) and (e). can someone point me in the right direction?
is U = P(N) the universe of all sets of natural numbers?
the class i am taking haven't covered sets or relations yet, we just jumped straigth to chapter 12, which i find very strange
can someone help me with this problem
@empty lintel what do you need help with
what's the truth value of the statement if p,q are True?
@weary tiger here what I did
thats the whole problem
so you have your answer
the statment is T when P is T and Q is F
I don't know how to write it down in those squares
write T or F for the truth value of p,q
so you write T in the first square and F in the second
is that what u meant lol
lgtm
ye
@noble wasp what is your definition of a set being countable?
This is just using the Binomial Coefficient Formula right?
Where n = 8 and k = 3 for a and k = 2 for b
ok so do you see why (a) implies countable
hmm no 😦
so you have a map that looks something like this lets call it f
can you change this function so that it is a function between S and a subset of N (what is f(S))
How do I prove this?
i mean, sure(?) but whats the context
I was told to solve for n=3 through induction of the given variables a and b. The computation should equal n=1, 2.7+ n=2, -0.7+ n=3, -2.1 = -2.1
That’s all the “context” I was given for the problem induction where n=3 and k=1 for (ak+b) if a =-3.4 and b = 6.1
The final solution would be -2.1 correct since you add up the sum of each n until the third
Right?
@errant bear
Can anyone help me with some logic?
is this book making a mistake? What it’s asking me to prove is... false? They make it seem true by cubing the second 2. why do they cube it?
@weary tiger That’s a proof by contradiction problem. Try starting there.
I'm having trouble even setting up a negation, would that statement use XOR?
i just gave you the contradiction, if x isnt an integer or irrational, then x is in Q \ Z = {p/q | q is not 1, and p and q minimal}
and yeah, not sure whats going on but there are definitely typos or smth levi
If n is a perfect square then sqrt(n) is a an integer and therefore rational, so it suffices to prove that if n is not a perfect square, then sqrt(n) is irrational.
We prove by contradiction. That is, we suppose that the square root of any non-square number is rational.
thank you @errant bear Just making sure i’m not crazy😂
what book is that from
Discrete Mathematics and it’s Applications by Kenneth Rosen
it’s not the latest edition so that’s probably why
Can I DM either one of you what I have written down?
mk makes sense
I think he expects a mixture of both, but I need to atleast set up the negation using quantifiers and predicates.
ok i mean, unless he specifically said to structure your proofs like this... i would stay away from using strictly symbols/predicates
most of the time its only necessary when learning it/the basics
ok i mean, i know its just the negation/statement
so its fine i guess
So you said start with sqrt(n) = a/b as a starting point
yes
Alright I'll try to see what I can come up with thanks