#help-23
1 messages · Page 361 of 1
Yes but its the same concept
Make 2 playlists from 100 songs (where each song is distinct) is the same as making 1 playlist with 15 songs and 1 playlist with 85 songs
in the playlist analogy you dont even care abour the remaining songs but here you care abour the remaining kids
By breaking the first playlist into 15 songs, you've already created the second one
in this question our sample space is to assign into 2 teams of 5
Yes i agree but like, you still want to see the possible outcomes of that arrangement
@lean otter
yea
The outcomes of the 2nd arrangement dont matter?
they do
so when u assign 5 kids for the team A the rest will be assigned for team B u understand?
yeah i get that but we want the combinations for how possibly both groups can look like
so i count both
look
if u assign group A, B will be grouped itself
like
think we have ten kids
if we put five of them in team A
where the other 5 go? to team B
so we dont need to count them
u understand?
yea
now count all the possibilities for those outcomes
its C(10,5)
second question?
Think about it, i dont see how this could be right because say they told you to put the kids into 1 group of 5 you’d literally do what you just did
and i dont imagine them saying to put them in 2 groups now would be the same
the same answer you know
look brother after reading 5 months about combinatorics analysis dont say im wrong ik what im saying
look
u choose
we can prove it with a small example
put 4 kids into 2 teams of 2
you will get C(4, 2)
i didnt say you are wrong im telling you what im thinking
ik bro its just that if u have 2 groups when u choose for one u dont need to count the other rest it would be overcounting because we already assigned 5
leon look
u choose 5 out of ten people for team A ok?
C(10,5)
the rest 5 for the team B which is C(5,5) = 1
now u get it?
@lean otter bro
i hope so
i think this is exactly what nCr is designed to do in the first place
bro let us not confuse leon
lemme see what he says'
so its like
10 kids
{1,2,3,4,5} , {6,7,8,9,10}-> one possibly
where (6,7,8,9,10) was already implied?
bro why u ordered them
look
the teams are sets
Ok
leon i believe in u
first team can have 1,3,5,7,9
u got this
thanks bro
3,4,5,6,7
yea
so there are C(10,5) you know what C() is?
we are choosing 5 random people from 10 people
It takes a permutation and maps it’s elements to a single set for each duplicated one
now that we chose for team A we want to choose for team B
we already chose 5 people
for team A
5 rest and we want to choose 5 for team B
yes
out of 5 people that remained choosing 5 is C(5,5) = 1
So the answer is C(10,5)*C(5,5) = C(10,5)
i don’t think the C(5,5) is really part of this
its just like you said picking 5 kids already leaves another 5
the thing is I misunderstood what they wanted me to count
turns out they want you to count like both arrangements as 1
exactly im just saying it for u to understand
so you split the kids into the 2 groups thats 1 outcome
you split them again that’s another outcomes
the 2 groups next to one another is 1 whole outcome
yes thank you bro
ofc bro
@hidden parcel @queen ingot thank you guys
can we do part b
so theyre asking what are the chances alex and jose are in the same team
for part b think we fix alex in one group
ye that's why the other person was talking about ordered pairs ({}, {}) two groups next to each other
oooh yeah that makes sense lol
i mean now i see it I ignored that earlier
because even when i did {(),()} I knowledged 2 groups (although i did it wrong) but i didnt count them properly i shouldve counted them once
but anyway
why
I thought of fixing both
or something
no
look bro
think of it this way
alex is in some group
either A or B
we want to see the possibility that jose be with alex
okay
the whole sample space is that we put jose in one of the 10 places
the event E is we put jose with alex
so if we fix alex in one group, the group that has alex in it have 4 possibilities for jose to be there
think of 10 boxes
we group 5 box together and other five together
we put alex in one of the boxes
the group that contains Alex in it we want it to contain jose too
i dont get why were fixing him
we have 4 boxes left to put jose in
because alex is already in somewhere u agree?
theyre both somewhere
but we wanna narrow it down to where they are in one group
right
they both can be anywhere thats the whole possibility
yes
Why
i see
whats up with the fixing way tho
i dont get it
What i do is i treat them both as one slot
vijan you'll need 10! in the denominator right?
i mean u can fix both too
hm no, why?
10 * 4 * 8! / 10!
the answer is 4/9
think about it
we assigned alex somewhere, 4 remain that we choose jose, the whole places where jose can go is 9
again i dont get why we assign alex somewhere
explain a bit more bro
like i dont get it
if alex is the first one to be picked it doesnt matter which teams he picks
all that matters is that jose is on the same team
this is what i meant w/my law of total probability approach earlier
P(Alex & Jose are on the same team) = P(Alex is on Team b)P(alex&jose | jose is on team b) + P(alex is on team a)P(alex&jose|jose is on team a)
but idk if youve learned conditional
prob
bro u making it hard for them with conditioning😭 i mean thats literally what we doing but ye
im just giving a diff approach it might make sense
if it doesnt leon js ignore it
I don’t understand
I thought thats what you’re supposed to do
yes
i think so too because of part A, the denominator should be C(10, 5)
because you literally want them on the same team
is ur confusion that you think the answer should be (10 * 9)/(5 * 4)?
who are you asking?
leon
if u do that approach it'd be C(8,3)/C(10,5)
you need a factor of 2 but yeah
which is same as 4/9
i just want to know what he thinks it might be so we can correct that instead of just trying to replace his understanding
im just asking about the arrangement
.
thats what I thought initially
but also that * 2
its not necessarily that youre fixing a person, but in order for them both to be on the same team you need one of them to be on a team to begin with
you need both on the team tho
leon think u fixed both ok?
yes
{jose, alex, ?, ?, ?} {? ? ? ? ?} count these possibilities
then multiply by 2
why multiply by 2
we already chose for second team
C(8,3)
calculate it
alex and jose can also be on the second team
this counts for them just being on the first team
nooooo
bro
thats overcounting
i don’t understand
its a set of 5 kids
two sets of five kids
{ jose, alex } x { 8 kids } x {7} x {6} x {5}
= ( 2 · 8 · 7 · 6 · 5 ) * 2
right or wrong
why are we doing 5-tuples?
the teams are unordered
i don't think you meant a cartesian product
but idk what you're trying to say
because it duplicates
can u think this way for a sec
u fix 2 people why because u need them to be in 1 team right?
yes
thats what I did
{ alex, jose }
fixed
so when u fix u should assign the 3 remaining ppl
for team that they are fixed in
for example think alex and jose are in team A
we should assign the 3 people for that team from the 8 people
the rest will be choosen themselves for team B
so its C(8,3)
@fickle yoke
rookie mistake
I accidentally added an extra guy
is that right
u added 2! randomly
their order on the team doesn't matter
no brooo its not permutation
the teams are unordered
its a team order doesnt matter
yeah over C(10,5) bc we already know the sample space
im done bro i got tired
2 C(8,3) / C(10,5)
yesssssssirrrrrr
thanks yall
@fickle yoke @queen ingot @hidden parcel I appreciate the help alot
should i take this opportunity to do the last part 🤣
allahu akbar
idk do you feel like you need a break?
i have a final soon …
Final one then ill go 😴 inshaAllah
always
inshallah brotha
so
here
u want to assign 5 girls
Yeah
so fix all 5 there is only 1 way
wait
i dont wanna say here
ok
but probably younger than you
im 16 anyway
oh
but yeah
reading for olympiads
thats humbling ngl
dw bro u good just practice a lot
idk any good book for that
ahhhh now i see
Yea
did u understand the question?
just assign 5 girls
Theres 1 way for each team
1+1 i meant
did you mean to count for 2 teams
ye
we did count for 2 teams lol
the 2 here doesnt come from counting for both teams though
it comes from the product rule
look its different
i forgot the 2 on part C 😭
u assign 5 girls on team A
okay
5 boys go to team B so one way
1
now u assign 5 girls on team B
5 boys go to team A
1 again
1 + 1 = 2
we only counted their arrangement in 1 team
we did, alex and jose can either be on team A or on team B
that's where i got the factor of 2
alright
yes but did we count for that is what im asking
because we only arranged them in 1 team
i did, but i didn't understand your notation so i don't know if you got the factor of 2 the same way
i still don't know what that means
me too
idk why u doing it with cartesian its just that u think of it in a hardway u would get in trouble solving harder questions like this
Wait
why are there always so many different ways to count the same thing 😭
No
that should be
im gonna crash out bro
what is this
Why i hate combis bro
It doesnt
{ jose , alex } x { 8 } x { 7 } x { 6 }
= 2 · (8 · 7 · 6 )/3!
= 2 C (8,3)
now thats 1 team
and the other team
there's no 2
why not 2 · ( 2 · (8 · 7 · 6) /3!)
Oh no u counted for both team rn literally
to count for team B like we did with the girls
how
i put them in a group of 5 only
They’re together in one team only
i have to go to bed
goodnight bro thanks for the help
?
Because thats how it is defined
how did we not count for the second team 😭😴
im so done
ah man
BRPOO
<@&286206848099549185> help please
Hello
Still on this question?
@low echo
is that right for part b
I don't know what this is
what
No it cant be
This is getting frustrating
im ngl
reposting for reference
part b
{ (jose , alex) } x { 8 } x { 7 } x { 6 }
= 1 · (8 · 7 · 6 )/3!
= C (8,3)
= 2 C(8,3) / (10,5)
now can someone tell me whats going on here
because either i did something wrong or we didn’t account for the second team
4 situations
Alex: g1, Jose: g1
Alex: g1, Jose: g2
Alex: g2, Jose: g1
Alex: g2, Jose: g2
2 situations in which they are in same group and 4 total
2÷4 = 0.5
When one person has gone into the group, the chances of whichever group the other guy goes in is still the same no?
oh wait i was wrong what the hell
bro i put them together may times
nonno no
To cancel that I gotta do
i give up
With what
i have no idea man
part b
This a simple question
bruh 😂
why is it “when a guy goes ina group”
i dont get the thought process
WWouldn't It be 4/9..?
So you think when Alex goes in a group. The chances of that group go down to 4/9 and the other to 5/9 ?
Was about to ask him that
That is irrelevant, I think, because the amount of space in the group doesn't matter.
i have 0 clue whats going on man
You're overthinking it
Ignore that
.
!!!
What
i cant 😂
erm consider alex got into team A
Why
consconsider team B then
why not both
WWHAT
why not both alex and jose together
thts the probability we're trynna find
Look at my thought process
{ (jose , alex) } x { 8 } x { 7 } x { 6 }
= 1 · (8 · 7 · 6 )/3!
= C (8,3)
Look
then to count for both teams
2 C(8,3)
then 2 C(8,2)/C(10,5)
would u word it?
= 4/9
I wish i can just tele communicate
whats it called telekeniesis
whatever that is
okay so
wait whats in the answer key
its 4/9
okayy
@limpid lodge both alex and Jose being in the same team is a ⊆ of the sample space
so think of creating that proper subset
and I mean it makes sense cause youre talking about both of them being in them same team
i can’t continue im tired
@low echo thoughts?
does thth acc simplify to 4/9?
Hmmmmmmmm
yep
think of all scenarios where both are on the same team
So
thats literally just
{ (jose , alex) } x { 8 } x { 7 } x { 6 }
wait a sec whats the doubt
it cant be half because were talking about 2 kids being in a team together, not 5
i mean intuitively it cant be half because its just 2 kids it can take alot of times for them to end up together
correct me if im wrong
omg leon u didnt understand it yet?
..?😭
not anymore i guess
wtaf is happening here?
chillin
Person 1 goes to G1
(0.5 chance)
G1: 4 spots left
G2: 5 spots left
Chance for other guy to go into-
G1: 4/9 (together)
G2: 5/9 (not together)
It's the same thing if person 1 goes to G2 that is: 4/9 chance of being together, and 5/9 of not.
so:
Four situations:
(1/2)(4/9)
(1/2)(5/9)
(1/2)(4/9)
(1/2)(5/9)
So chance of being together
(1/2)(4/9) + (1/2)(4/9)
so 4/9
So
u dont wanna know cherry
it is 4/9 if the chance changes
Yeah that makes sense
are u using graph or smth to explain?
vihan is such a genz name
sorry i don’t understand this language i speak cartesian product
G mean group
What's cartesian product
DO U HV A DOUBT???😭
not so far
it's an ancient name wdym and pls dont talk in here let them solve the question
why is this help channel open then🥀
huh its like shanaya🥀 yep ill shutup lawl
Life theory
im telling brotha to not think about it using cartesian product idk why he keep using it
sorry i can’t
Which class are you in?
my brain just adapted to it
u cool mate 
discrete math
Number?
because you need it
in combis use cartesian
permutations and combinations literally come from cartesian product
and this problem used combination
bro the way u think is like solving (1 + 5)^2 = (1+5)(1+5) = 1 + 2 * 5 + 25 instead of just saying 6^2
LOL
But this is different though
there is no number but it’s an undergraduate class
Alright
WhWhere did cartesian product come frm
you never get more humbled than when kids teach you math
look when u solve with cartesian its like u doing an ordered problem because cartesian is like permutation but this problems are combis
definition
yes combination comes from permutation
eh but u could js do it directly?
idk how I raged mid studying the other day and didn’t pick up on the short cuts
see u trying to solve a question from cartesian -> permutation -> combination when u can do combis straight
i think thats what happened
what r we trynna do here....solve it using Cartesian product..?
exactly im telling him this
thats a really good question
he just wants to solve it but he only knows cartesian
he cant analys it using combis
but u domt even need combinations
you do
just throw alex in one grp
u can say alex in one group then jose go to the same group so 4/9
4 favourable seats for jose and total 9 seats
yeah but he doesnt understand why we should fix alex only so i told him try to fix both its the same thing
idk what yall are saying
ffix jose then (what)
fixing both will cause C(8,3) ways to put other kids
it can be done in two ways bc of two groups so 2 * C(8,3)
now the whole ways we calculated is C(10,5)
but he doesnt understand why
why does fixing one even make sense
okay do u have any other method to begin with?
because its the same thing u want to fix one and see in how many ways jose can sit with alex or whatever his name was
and it comes out to have 4 places to be with alex
from 9 remaining place
it is jose. Its pronounced fancy tho.
josè so french
yes group tjem both
then u would proceed liek this
what exactly doesn't make sense to u?
i just told u the method
how do you do this
lemme cry lemme cry
sorry bro
bro if this server had vc
im trying to be inclusive here and open minded and maybe step out of my cartesian product comfort zone
i would have told u easier
u could do private vc
do you wanna be my tutor
depends on ur educational levels rather than age
so?
idk discrete math i just know some about graphs and combis and sets theorems
whats discrete math
a class I hate
discrete numbers and stuff like that
discrete prob
graph theorem
sets theorem
OOhhhhhhhhh
number theory
“Discrete mathematics is the study of mathematical structures that are fundamentally separate and distinct, such as integers and graphs. It provides the mathematical foundation for computer science and is used to solve problems in programming, algorithms, and cryptography. Key topics include logic, set theory, number theory, graph theory, and combinatorics”
logic
thanks
youre welome
not that i want to
just dont think a lot brother stay shallow, yk u can be a good mathematician only if u be lazy
find simple ways
dont go to deep
ohohhh thts discrete math
what grade are u in?
11
same
cools
UUhhh they teach it in 11th here
ah
i mean some of it
no we have pre-calculus and probability and statistics and
hmm
geometry here
they teach logic a bit in probability
and set theory
but you need to understand also right
understand it the easy way not the hard way, think intuitivily rather than deep-math shit
eh close this channchannel when ur done
ofc bro inshallah
God bless you
u will be successful
inshaAllah
say amin
ameen
i sent you a friend request
accepted brother u can close this chat
if had any question
just ask
may Allah reward you
alright i have nothing for now
talk to you insaAllah
thanks again,
assalamu alaykum
.close
Closed by @wintry depot
Use .reopen if this was a mistake.
Send your question here to claim the channel.
Remember:
• Ask your math question in a clear, concise manner.
• Show your work, and if possible, explain where you are stuck.
• Do not immediately ping people or roles. After 15 minutes, feel free to ping <@&286206848099549185> once.
• Type the command .close to free the channel when you're done.
• Be polite and have a nice day!
Read #❓how-to-get-help for further information on how to ask a good question, and about conduct in the question channels.
3 lines show that a+b+c=0 for htem to intercept at exactly 1 point
Please don't occupy multiple help channels.
make a coefficient matrix
for all lines to meet in a single point det(A) where A is the coeff matrix should be zero
but i cant do that
the matrix is 3x2
det isnt defined
it will be 3x3 wdym
the variables are x,y
a,b,c are constants
so in reality its
a b
b c
c a
Ax= b where
b=
-c
-b
-a
A = a b c ; b c a ; c a b and v = [x, y, 1] Av = 0
x,y,1 though
1 isnt a variable
$\begin{pmatrix}a&b&c\
b&c&a\
c&a&b\end{pmatrix}$
Annie Maqionde
something like this
doesnt matter
the last column isnt coefficients of variables
how does it not
there are 3 equations
we want det(A) = 0 to v exist
and 2 variables
bc v should be in null space of A
you can hae infinite solutions
yk what det(A) = 0 means?
The three lines will be concurrent if and only if $\begin{pmatrix}a&b&c\
b&c&a\
c&a&b\end{pmatrix} = 0$
Annie Maqionde
look if det(A) = 0 it means columns are dependent
and dependence means all lines go through the same point
so if u compute det(A) and its equals to zero it means they go through same point and life is good but if it was not equal to zero means we have independent columns which means there is no two vector to go through same line
and it will span the whole space
idk if u understand or not
@stark ether
u understand? life is good?
sorry i had to respond to some message i got
but i dont understand how we can use a scalar inside the variable vector
like the det(A)=0
is for equations where each row of A is coefficients of a variable
ahhh
look
we are in R^3
yes
if we only said v = (x,y) then the constants c a and b cannot be included in the matrix multiplication
this 1 here acts as a place holder for constants
have u read about augmented matrcies?
here we made an augmented variable vector
which means we added a 1 as a placeholder during multiplication
u will see of these a lot in linear algebra
cant i just check by 2
nah
but cant i check first 2 lines then second 2
you could do tha but that'll be a much more cumbersome method
@stark ether Has your question been resolved?
but i dont get how you can have x,y,1
and consider it as a R^3 variable
@stark ether Has your question been resolved?
Closed by @stark ether
Use .reopen if this was a mistake.
Send your question here to claim the channel.
Remember:
• Ask your math question in a clear, concise manner.
• Show your work, and if possible, explain where you are stuck.
• Do not immediately ping people or roles. After 15 minutes, feel free to ping <@&286206848099549185> once.
• Type the command .close to free the channel when you're done.
• Be polite and have a nice day!
Read #❓how-to-get-help for further information on how to ask a good question, and about conduct in the question channels.
guys
this chatgpt groupchat is with my friends
please raid it and send random messages about brainrots
Please don't promote that stuff in this server.
@north orbit Has your question been resolved?
@north orbit Has your question been resolved?
Closed by @north orbit
Use .reopen if this was a mistake.
Send your question here to claim the channel.
Remember:
• Ask your math question in a clear, concise manner.
• Show your work, and if possible, explain where you are stuck.
• Do not immediately ping people or roles. After 15 minutes, feel free to ping <@&286206848099549185> once.
• Type the command .close to free the channel when you're done.
• Be polite and have a nice day!
Read #❓how-to-get-help for further information on how to ask a good question, and about conduct in the question channels.
How would I get the integral of 1/(2 + 3x)?
I dont want to know the exact steps, just what method would I use?
use u-sub
So the denom would be the u?
yup
Closed by @steep magnet
Use .reopen if this was a mistake.
Send your question here to claim the channel.
Remember:
• Ask your math question in a clear, concise manner.
• Show your work, and if possible, explain where you are stuck.
• Do not immediately ping people or roles. After 15 minutes, feel free to ping <@&286206848099549185> once.
• Type the command .close to free the channel when you're done.
• Be polite and have a nice day!
Read #❓how-to-get-help for further information on how to ask a good question, and about conduct in the question channels.
hi
cud anyone help me with this problem? The chapter is abt artimetic and geometric sequences
What have you tried so far?
Since we're working with sequences, a good place to start is to simply identify what our sequence is
Would anything here look like it has potential to be our sequence?
@rustic chasm Has your question been resolved?
So like it starts with 2 and decreases
Right
I'd agree with that, yep
One sec my moms calling brb
Don't forgot to read ❌ to the bot's message here so the channel isn't closed!
Closed due to timeout
Use .reopen if this was a mistake.
Send your question here to claim the channel.
Remember:
• Ask your math question in a clear, concise manner.
• Show your work, and if possible, explain where you are stuck.
• Do not immediately ping people or roles. After 15 minutes, feel free to ping <@&286206848099549185> once.
• Type the command .close to free the channel when you're done.
• Be polite and have a nice day!
Read #❓how-to-get-help for further information on how to ask a good question, and about conduct in the question channels.
Calculating two weapon damages to decide which one is better at what point
Target info:
Health aka HP: 20
Info: one damage removes 1 hp
Armor points: 20
Armor toughness: 8
Info: armor reduces the damage you take, here are the formulas on how to calculate it https://minecraft.wiki/w/Armor#Damage_formulas
There is also a 64% damage reduction coming from the armors enchantment called protection, this is applied after the armor's damage reduction. more info: https://minecraft.wiki/w/Protection
Weapon info:
We have 2 weapons, both are a weapon called the mace, which increases your damage based on how many blocks you're falling:
A successful smash attack causes a mace to deal 4HP extra damage for each of the first 3 blocks fallen, 2HP extra damage for each of the next 5 blocks fallen, and 1HP extra damage for each block fallen after that.
More info: https://minecraft.wiki/w/Mace
The difference between these 2 is that they contain 2 different enchantments
The 1st mace has the enchantment Density 5, which does the following:
Density increases smash attack damage by 0.5HP per block fallen per level of enchantment.
More info: https://minecraft.wiki/w/Density
The 2nd mace has the enchantment Breach 4, which does the following:
Breach reduces the effectiveness of the target's armor points and armor toughness by 15% per level. Specifically, Breach deals damage as though the enemy's damage reduction from armor was 15 percentage points lower per level. For example, if the enemy's armor reduces damage by 50%, and they are hit with a mace with Breach I, their armor reduces the damage by 50% - 15% = 35%. However, this reduces the effectiveness of only the armor itself, which does not include damage reduction from enchantments such as Protection.
This is the formula used to calculate the damage for the breach enchantment:
damage taken=weapon damage×(1−max(0%,armor effectiveness−level×15%))
More info: https://minecraft.wiki/w/Breach
My goal:
My goal is to find the point where the density mace becomes superior to the breach mace in terms of damage and the block fallen, for your information: breach deals more damage at less blocks fallen and density at more blocks fallen, and i want to find the exact point where this change happens
I have made the python code below, that uses the formulas in those wiki pages i linked to calculate the exact damage, however, i dont know how to add the "protection" enchantment part, the 64% we talked about earlier in Target info: https://minecraft.wiki/w/Protection
def func(base_damage, armor_points, armor_toughness, fall_distance, density_level=0, breach_level=0):
# A successful smash attack causes a mace to deal 4HP extra damage for each of the first 3 blocks fallen,
# 2HP extra damage for each of the next 5 blocks fallen, and 1HP extra damage for each block fallen after that.
if 0 < fall_distance and fall_distance <= 3:
damage = 4 * fall_distance
elif 3 < fall_distance and fall_distance <= 8:
damage = 6 + (2 * fall_distance)
elif 8 < fall_distance:
damage = 14 + fall_distance
else:
damage = 0
# The Density enchantment can be used to increase smash attack damage by 0.5HP per level for each block fallen.
if density_level > 0:
density_damage = 0.5 * density_level
damage += density_damage * fall_distance
damage += base_damage # Add base weapon damage
damage = damage * 1.5 # Make the hit critial
# Calculate how much damage armor removes
armor_formula = min(20, max(armor_points / 5, armor_points - ((4 * damage) / min(armor_toughness, 20) + 8))) / 25
if breach_level > 0:
formula = (max(0, armor_formula - breach_level * 0.15))
else:
formula = armor_formula
return damage * (1 - formula)
I believe protection is factored at the very end, after all armor deduction occurs, and isn't affected by breach nor density. If you're just trying to compare which does more, you can ignore it. If you instead want to find out how much damage is actually being applied, you'll want to apply it at the very end (inline with the return)
From the wiki:
The protection enchantment is applied after the armor's damage reduction.
yes it is calculated at the end
i know it dosent affect the goal, but i still want to add it but i dont know how
i struggle with percentages
someone told me to devide by 0.36 anoither guys told me use % and im confused
Let's assume a maximum 64% reduction. Then we're dealing
100% of damage - 64% of damage
= (100% - 64%) of damage
= 36% of damage
= 0.36 * damage
oh its 0.36 * damage and not / damage
thats where i got stuck
lets say, we get the total protection level as an argument
for example 16 for max protection
we do 16 times 4
but
how do we get 0.36 out of 64 we got
idk how percentages work
"Percent" can be read as "per 100", so we have 64% is 64 per 100, or 64/100
i know its the remaining of it but how to turn 64 into 0.36 in code
That'll be something like
protection_multiplier = 1 - (4 * level / 100)
Or, if its clearer to read
protection_multiplier = (100 - (4 * level)) / 100
(4 * level / 100) gives us 0.64
but why do we minus it by 1?
that just makes it negative
1 - 0.64 gives us the desired 0.36
Lol no worries
okay thanks! ima go code it and i will ping you if i run into any problems
(Also, if we're being pedantic, protection is hard-capped at 20 levels, so we'll want a math.min in there)
something like..?
Yeah that'd work; I'd probably consider the max overkill since protection level is at least 0
yep thats an LLM error
Sorry, the level is capped at 20. The reduction would be capped at 80 (4*20)
This limit only matters when cheats are enabled as far as mace calculations are concerned
yea but it wont hurt to add it
def func(base_damage, armor_points, armor_toughness, armor_protection, fall_distance, density_level=0, breach_level=0, critial_hit=True):
# A successful smash attack causes a mace to deal 4HP extra damage for each of the first 3 blocks fallen,
# 2HP extra damage for each of the next 5 blocks fallen, and 1HP extra damage for each block fallen after that.
if 0 < fall_distance and fall_distance <= 3:
damage = 4 * fall_distance
elif 3 < fall_distance and fall_distance <= 8:
damage = 6 + (2 * fall_distance)
elif 8 < fall_distance:
damage = 14 + fall_distance
else:
damage = 0
# The Density enchantment can be used to increase smash attack damage by 0.5HP per level for each block fallen.
if density_level > 0:
density_damage = 0.5 * density_level
damage += density_damage * fall_distance
damage += base_damage # Add base weapon damage
if critial_hit:
damage = damage * 1.5 # Make the hit critial
# Calculate how much damage armor removes
armor_formula = min(20, max(armor_points / 5, armor_points - ((4 * damage) / min(armor_toughness, 20) + 8))) / 25
if breach_level > 0:
formula = (max(0, armor_formula - breach_level * 0.15))
else:
formula = armor_formula
damage = damage * (1 - formula)
# Calculate how much damage protection removes
protection_percent = 1 - ((min(20, armor_protection) * 4) / 100)
damage = damage * protection_percent
return damage
this should do the job
it seems to be outputting wrong tho
what did i mess up ? @fallow cairn
damage = damage * (1 - formula)
# Calculate how much damage protection removes
protection_percent = 1 - ((min(20, armor_protection) * 4) / 100)
damage = damage * protection_percent
return damage
only edited that part + adding the armor_prot arg
oh lol
What was the issue?
something is wrong here
it does not at all make any sense with my tests in game
only the part that armor comes into play
testing without armor is correct
I can skim through the code here shortly if you'd like
sure, im making a mod rq to show me my fall distance in game so i can test accuretly
let me show you where i get the formulas from
calculating the damage part works perfectly, no issue in that
the armor formula comes from this part of this page https://minecraft.wiki/w/Armor#Damage_formulas
since the devision was the same in both formulas, i simplified the code to only contain it once
and the next part is our protection formula that we just wrote
@fallow cairn heres the formulas
Alright, give me a moment to look this over
Hmm...
@lean otter Could you provide some examples where in-game differs from the formula? I'm not seeing any issues with the code right now
@lean otter Has your question been resolved?
sure
my power went out and don't have access to PC rn but I can pull some examples from the wiki
I tried simulating the same scenarios mentioned here
they work exactly like the article in game but the code produces different results
Okay damage calculation for maces is definitely correct
Ah, yep
armor_formula = min(20, max(armor_points / 5, armor_points - ((4 * damage) / min(armor_toughness, 20) + 8))) / 25
needs to be
armor_formula = min(20, max(armor_points / 5, armor_points - ((4 * damage) / (min(armor_toughness, 20) + 8)))) / 25
@lean otter See above
The issue was that the formula was being interpreted as
[ \text{armor points} - \frac{4\times\text{damage}}{\text{min}(\text{toughness},20)}+8]
instead of
[ \text{armor points} - \frac{4\times\text{damage}}{\text{min}(\text{toughness},20)+8}]
@fallow cairn
ohh I see
thank you so much, I will try it once power comes back in around an hour and let you know
@lean otter Has your question been resolved?
nop
hang it man
!done
If you are done with this channel, please mark your problem as solved by typing .close
i am not, i just came back and want to continuie it
alrigght lets test it out
same result no difference
e = func(
base_damage=6,
armor_points=20,
armor_toughness=8,
armor_protection=16,
fall_distance=10,
density_level=5,
breach_level=0,
critial_hit=True
)
print(e)
i replaced my formula with the bottom snippet
above 20 but not more than 21 or 22
either the armor formula is wrong or the protection one
It may be helpful to divide out the logic for computing the damage dealt from the damage received
Ah
there is one way to make sure it is working as expected
take this formula and calculate the damage by hand
basically, divide the logic into two functions, like so:
def calc_damage_dealt(base_damage, fall_distance, density_level=0, critial_hit=True):
# TODO
def calc_damage_received(damage_dealt, armor_points, armor_toughness, armor_protection, breach_level=0):
# TODO
would make it easier to reason about it
oh i get it
however
if we do that
nothing changes coz i have already done that
we know for sure that calc_damage_dealt function works
this part is the calc_damage_dealth function
the rest is calc_damage_received
we know for sure this part works, i have tested it without taking armor into account and it works perfectly
,w 82.5 * (1 - Min[20, Max[4, 20 - (330 / 16)]]/25)
,w 69.3 * .36
Your formula seems good
@lean otter What makes you so sure it should be <22?
First of all, the wiki says this:
The amount of fallen blocks needed to defeat a player wearing full Protection IV netherite armor from full health are the following:
Density V mace: A critical hit after falling 10 blocks.
It says this is the minimum for killing a player with max protection and armor, however, we can still defeat a max player with only 7.2 blocks, not 10
Second of all, in the game it works just like wiki says it does
Hm, I'm not sure what's up with that then
lets do something
lets check armor_formula charecter by charecter, both of us check it
and make sure all of it is exactly what the formula represets
then i will use that to exactly check minecraft source code
charecter by charecter i will check it, but we first need to make sure armor_formula is the correct formula the wiki says, like no extra paranthesis or anything
min(20, max(armor_points / 5, armor_points - ((4 * damage) / (min(armor_toughness, 20) + 8)))) / 25
thats the best i can do
If you confirm this, ima go compare it to the games source code @fallow cairn
that seems good to me
under if breach_level > 0:
the max(0 part, here:
formula = (max(0, armor_formula - breach_level * 0.15))
I dont see a world where 0 will get picked as maximum, is this another overkill check like this other one you mentioned? or it can actually happen
with cheats its possible, e.g., with breach level 7+
protection_percent = 1 - max(0, (min(20, armor_protection) * 4) / 100)
im a bit confused, u said the one i replied to works, but this above is what we were using
ignore the devision by 100, im talkinjg about armor protection times 4 logic
@fallow cairn are you okay with pings?
<@&286206848099549185>
What about it?
That one is also correct
There's like 4 ways to clamp that value
@lean otter Has your question been resolved?
After checking out the games source code this seems to be correct, however in action it still dosent make any sense lmao
Edit: turns out i inputted 4 less armor_toughness lol
@lean otter Has your question been resolved?
Closed by @gaunt tide
Use .reopen if this was a mistake.
Send your question here to claim the channel.
Remember:
• Ask your math question in a clear, concise manner.
• Show your work, and if possible, explain where you are stuck.
• Do not immediately ping people or roles. After 15 minutes, feel free to ping <@&286206848099549185> once.
• Type the command .close to free the channel when you're done.
• Be polite and have a nice day!
Read #❓how-to-get-help for further information on how to ask a good question, and about conduct in the question channels.
How would you calculate 1 rotated i°?
1 rotated 90° equalling i for example
Sorry I don't get your question
This is correct, yes
In polar coordinates 1 being rotated 90 degrees is i
What would it be if 1 is rotated i degrees
Oh god, let me think
it doesn't make sense to rotate by a non-real angle
Would it be a quaternion number
z = 1 being rotated anti-clockwisely 90° becomes i
Huh
I thought there might be some sense at a higher level, complex numbers are messed up man, i^i is a real number🙏
it's like how yes, there technically is a right triangle with sides 1, i, and 0
That's fair, I should have pointed that out
you can definitely multiply some vector by a quaternion to perform a rotation
So assuming i is a second second dimensional number, would rotating 1 by i give you a third dimensional number?
I don't think so. trying to apply rotation with a theta of i wouldn't give you a rotation at all iinm
you're forgetting that you always need to specify the axis of rotation
It makes negative sense
when we rotate the vector 1 + 0i by 90 degrees counter-clockwise
that's with respect to the z-axis
really, maths isn't that deep
IG it could be third dimension if you rotate it with respect to imaginary axis or x axis, but then you gotta have a z-axis term, and that would be too much i feel
1 i^1 makes sense in complex as a rotation
1 i^i doesnt
Its a number, but not one that makes sense as a rotation in the complex plane
Sorry but I'm confused, if it's a real number then why can't we rotate by it?
i is not a real number
i^i is though
with A being a real number
A* i^n
defined a rotations in a cycle of fourths
so, i^0 is 1, so no rotation
i^1 is i, so it moves 90deg
etc...
and you come back to 1 with i^4
So wouldn't i^i exist somewhere on the x-axis?
Second dimensional number? 🥀
writing a+bi as (a,b) then i(a,b)=(-b,a), dotting (a,b) with (-b,a) gives 0. Which is the general idea behind why i encodes a 90deg rotation
Yeah, on the point (e^-(π/2),0)
the fact that it works like that, is specifically because you have
$e^{i\frac\pi2 \cdot n}$
Alright I see, so we cannot rotate by it, but it does exist on the plane right?
which is just i defined with the eulers identity and multiplication of exponents
You can rotate by i^i, it's a real number like any other, it being of any use or interesting for something is another matter
yes i^i actually makes sense in re^(i theta) form
but the definition of an angle is always a real number
Yeah e^(i*pi) = -1, we can derive i^i from that
Alright I see
there are other ways to perform rotations, such as using complex numbers or quaternions as you said
now, what would this be if you define it like this:
$i^i = (e^{i\frac\pi2})^i$
but those are not angles
If you use multiplication of exponents, you get:
$e^{-\frac\pi2}$
which is just a real number
I see, so we can use it for rotation then yeah? But like Prim said it may or may not be of use
I have another question but let me find the message I'm following up
#help-7|zen1thxyz message if you do the same for i instead of π it approaches a different constant, what is this constant and how do you calculate it?
goddam my internet is bad today
using the exponential definition that does exist
cos(...cos(x)...)=x, holds only when x is the Dottie constant
as a complex number
You can have cos(x) + i*sin(x) though
I used deg instead of rad this time
there is a definition for complex trig functions
yeah like if the limit exists, then you must have cos(L) = L
It's the same constant 😭
That's the limit of a sequence defined by a_1=cos(i), a_n=cos(a_n-1),
Okay well thank y'all
Wait, e^(i*i)?
.close
Closed by @junior canopy
Use .reopen if this was a mistake.
$\cos x = \frac{e^{ix} + e^{-ix}}{2}$
south
seems to exist
cos(i)=cosh(1)? 
Okay so (1 + e²)/2e
Wasn't cos contractive if I remember correctly?
I have no idea if that generalises to the complex domain
Though Idk if that generalizes to C
but yeah for the real numbers it's a contractive map
Banach fixed point theorem tells you that it would exist
.Oh wait, wasn't there something similar for hyperbolic functions?
but I don't see a problem with the Lipschitz definition for C
you just replace the norm, so instead of the absolute value, it'd be the Euclidean distance in R^2
Yeah, should work with the norm metric
yeah so $\cosh x = \frac{e^x + e^{-x}}{2}$
south
So that should converge to something
the cos(cos(cos...(i)...)) also limits to dottie
sub in x -> ix into the definition for cos(x) and you get cos(ix) = cosh(x) lol
.Damn, didn't know the hyperbolic functions and imaginary numbers were so closely related (we aren't taught in that manner here)
tbh complex algebra is relatively easy once you get the hang of it
and complex analysis is well behaved compared to real analysis
there are a few quirky rules of complex algebra that is pretty easy to break on accident tho
.Any idea when we're taught that?