#help-33
1 messages · Page 181 of 1
Digamos que X= [5,2,2]
Puedes escribir X como una combinacion lineal de los vectores en la base B?
X=5(4,1,2)+2(0,1,0)+2(-3,-1,-1)
Okay, creo que ya veo donde esta la confucion
Estas confundiendo las coordenadas, con el vector.
Creo que lo mas sencillo
(5,2,2)=a(4,1,2)+b(0,1,0)+c(-3,-1,-1)
Va a ser mostrarte el ejemplo
(5,2,2)=1(4,1,2)+1(0,1,0)+0(-3,-1,-1)
Entonces, las coordenadas del vector X con respecto a la base B son 1,1,0
De ahora en adelante, para evitar confundir coordenadas con vectores, escribiremos las coordenadas sin parentesis ni corchetes.
En esta situacion teniamos el vector X, y la base B, y encontramos las coordenadas 1,1,0
Ahora, de vuelta a mi pregunta anterior
.
En esta situacion, tenemos las coordenadas a,b,c y la base B
X= ?
x=a(4,1,2)+b(0,1,0)+c(-3,-1,-1)
Exacto
Ahora, sabemos que con respecto a la base canonica, las coordenadas de x son 2a,2b,2c
Escribe X como una combinacion lineal con respecto a la base canonica.
x=2a(4,1,2)+2b(0,1,0)+2c(-3,-1,-1)
x=2a(1,0,0)+2b(0,1,0)+2c(0,0,1)
esta
y esta
,w 2a(4,1,2)+2b(0,1,0)+2c(-3,-1,-1)=2a(1,0,0)+2b(0,1,0)+2c(0,0,1)
Si exactamente
perfect
No uses wolfram para esto
Porque resolver esta ecuacion no es trivial
Y necesitas saber como encontrar a,b,c con esta ecuacion.
hay un error
del lado izquierdo de la ecuacion
,, \implies \begin{cases} 8a-6c=2a \ 2a+2b-2c=2b\ 4a-2c=2c \end{cases
938c2cc0dcc05f2b68c4287040cfcf71
Compile Error! Click the
reaction for more information.
(You may edit your message to recompile.)
wdym
mira aqui
y mira tu ecuacion.
,w a(4,1,2)+b(0,1,0)+c(-3,-1,-1)=2a(1,0,0)+2b(0,1,0)+2c(0,0,1)
,, \implies \begin{cases} 4a-3c=2a \ a+b-c=2b\ 2a-c=2c \end{cases}
938c2cc0dcc05f2b68c4287040cfcf71
,w rref {{4-2,0,-3,0},{1,1-2,-1,0},{2,0,-1-2,0}}
ayuda hermano
en que
Si

Escribe los posibles valores de a,b,c cuando c es dado por el parametro t, en otras palabras c=t
can we do c = 2t
no
hermano
ok, y sabemos que
x=2•3t•(1,0,0)+2•t•(0,1,0)+2•2t•(0,0,1)
worst exercise ever
the answer maybe needs to be in a basis form not as a linear combo
.closs
.close
Closed by @buoyant jetty
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.
• After 15 minutes, feel free to ping <@&286206848099549185>.
• 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.
.close
Closed by @thick lava
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.
• After 15 minutes, feel free to ping <@&286206848099549185>.
• 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.
Let (C) and (C'l be two circles with the respective diameters [TA] and [TB]. The circles are tangent interiorly at point T. Qe design by M and N two distinctuve points of (C) \ {T}.
(TM) and (TN) cut the circle (C') respectively at P and Q.
Prove (PQ) // (MN) by two different methods (no trig or shape similarity allowed)
one method is using thales reciprocal
while the other is supposedly geometric angles
where as the methods must both satisfy both cases shown (hence why there are two figures, its case disjunction)
my problem is i want to prove that for both cases, mesMNT = mesPQT
@hidden dawn Has your question been resolved?
<@&286206848099549185>
@hidden dawn Has your question been resolved?
<@&286206848099549185>
@hidden dawn Has your question been resolved?
<@&286206848099549185>
<@&286206848099549185>
@hidden dawn Has your question been resolved?
<@&286206848099549185>
Pair of corresponding angles are equal ?
thats what i want to prove
I don't know about Thales theorem. Sorry
@hidden dawn Has your question been resolved?
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.
• After 15 minutes, feel free to ping <@&286206848099549185>.
• 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.
Channel closed due to the original message being deleted.
If you did not intend to do this, please open a new help channel,
as this action is irreversible, and this channel may abruptly lock.
!msgdel
The original post of this help channel has been deleted, and it will abruptly close and possibly lock. (This is irreversible.) Please claim a new channel, and don't delete the first message of any future channel you claim.
@next raft
Srry for ping btw
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.
• After 15 minutes, feel free to ping <@&286206848099549185>.
• 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.
helo
need help w this
for an inverse to exist
a function has to be one to one
but wb onto?
it has to be onto also
if f is not onto then f^(-1) would not be a function B -> A
i see
so for this question, since it's injective, the inverse does not exist?
heloo
not always
i see so there are certain cases where inverse does exist
so in this case is the answer c?
because it may or may not have an inverse
i mean if its only injective then no
but what the question states, does it state it's only injective or...
so it's injective but may be bijective
still though it's c isnt it
since if it's injective only, it may or may not have an inverse
"does not necessarily" and "may or may not" mean the same thing
yeah so it's c right
@runic bone Has your question been resolved?
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.
• After 15 minutes, feel free to ping <@&286206848099549185>.
• 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.
Closed by @bitter terrace
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.
• After 15 minutes, feel free to ping <@&286206848099549185>.
• 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.
hello, ask your question

@ionic mortar Has your question been resolved?
What's the question bro??
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.
• After 15 minutes, feel free to ping <@&286206848099549185>.
• 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.
Need help with using autocad to find coordinates
for trapezoidal rule ?
Unsure because autocad is so hard and won't work for me but i asked my tutor and he said use autocad but im struggling so bad
@ornate gazelle Has your question been resolved?
@ornate gazelle Has your question been resolved?
Need help badly pls
@ornate gazelle Has your question been resolved?
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.
• After 15 minutes, feel free to ping <@&286206848099549185>.
• 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.
i need help with part ii) i dont understand the solution. why does their steps lead to finding BQ
i dont get how this helps us find BQ
which line in the work do you hae an issue with?
well its not so the algebra i have an issue with but the logic, like why do these steps find BQ i dont understand how this is really related to length BQ
their work works towards finding the coordinates of Q
BQ is the distance between B and Q
and with B and Q lying on the same horizontal line
the distance is reduced to the distance between the x coordinates of B and Q
and with x_B being 0,
the distance is simply the x coordinate of Q
Closed by @lethal bridge
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.
• After 15 minutes, feel free to ping <@&286206848099549185>.
• 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.
I wonder why the second function doesn't use the same method(aka definition) as the first function? They directly take the derivative
@small stream Has your question been resolved?
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.
• After 15 minutes, feel free to ping <@&286206848099549185>.
• 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.
Can someone help with 32
@swift bronze Has your question been resolved?
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.
• After 15 minutes, feel free to ping <@&286206848099549185>.
• 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.
.open
for this question, to find the LCM, i tried using the method where you put the common prime factors in the middle of the venn diagram then mutliply it by the rest of the terms in the venn diagram. However when i tried this method it was wrong ??
it would be easier to take the highest powers of X, Y, Z for each prime factor
so for example, the highest power of 2 in X, Y, Z is 2^8
the highest power of 5 is 5^3
and the highest power of 7 is 7
so LCM = 2^8 * 5^3 * 7
yeah so that's a demonstration that the Venn diagram method only works for the LCM of 2 numbers
for the HCF of any number of numbers it should be fine
@tranquil depot Has your question been resolved?
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.
• After 15 minutes, feel free to ping <@&286206848099549185>.
• 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.
Is this ven diagram colouring correct?
Please don't occupy multiple help channels.
No
For the A intersects (B U C) you need to color the part of A where it overlaps B or C
the cyan part
B or C
when you see B U C think like the B and C circle get united under 1 single circle
Closed by @silent lagoon
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.
• After 15 minutes, feel free to ping <@&286206848099549185>.
• 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.
I need help with c, d, and e, how do I evaluate this without a calculator?
<@&286206848099549185>
Idk how I got the answer to c
1/125 = (125)^-1
What's that?
for e)
How does that work?
!15m
Please only use the <@&286206848099549185> ping once if your question has not been answered for 15 minutes. Please do not ping or DM individual users about your question.
u can take -1 in front of the log and also the 25 as base can be 5^2 and u can take the 2 out as 1/2 in front so
-1/2 log_5 (125) = 3 = log_25 (1/125)
There's no -1
no
1/125 can be written as (125)^-1
Alr then what
simplify
How do I do that without a calculator
by hand
Ok
This makes no sense
well how u end up on log without knowing 1/a = a^-1 i suggest taking some time to learn that
Can someone actually help me?
not very known property though
well it follows from change of base
but yeah I wish 3b1b's Triangle of Power video was more commonly known
Is it -3/2?
yh
5^-3 = 1/125
5² = 25
yess
yes, his video should be seen by school classrooms
What about the other 2?
C and d
Anyone?
Please I have a quiz about this on Monday
Im fried
take the 1/3 in front then apply
log (ab) = log a + log b
for d
or just take convert 16 into 2^4
Oh so 2^1/3
no not in reciprocal
log_2 (16^1/3)
Isn't that what it was?
yeah i wanted to show u
now what will u do?
what u did in e?
@fair gate say smth
lmao
bro
Idk what to write down
u just did the e problem
anyways
use these ^
learn them
put it on ur phone wallpaper
look at that table and solve
log_2 (16^1/3)
What is p log
Ok so what's the answer for d?
man i gave u everything u need to solve lmao
my suggestion: get a book on algebra and grind the problems thats the only way
Ima go ask ai
@fair gate Has your question been resolved?
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.
• After 15 minutes, feel free to ping <@&286206848099549185>.
• 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.
yeah, that's right
you're tasked with two things really
which is
well, you wanna show that this is in fact tangent to the circle (it intersects the circle at one point and only one point) and find said intersection
Yeah I read the question
have you taken calculus yet?
@eternal fog
if not that's fine
we can solve it like this too
.close
Closed by @eternal fog
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.
• After 15 minutes, feel free to ping <@&286206848099549185>.
• 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.
Can someone please explain why youre allowed to do this ?
just making everything a power on e
is it only allowed for E , or is it allowed for any base
ln is log base e
It's allowed for any base, they chose e because it cancels out the natural logorithm
Closed by @fast geyser
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.
• After 15 minutes, feel free to ping <@&286206848099549185>.
• 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.
Before you is a board containing an m x n grid and a collection of outwardly blank tiles. There is one tile for every empty space on the grid, and whenever a tile is placed, the letter "C", "A", or "T" mysteriously reveals itself. Beside the grid, beams of light tally the numbers of each letter remaining. Below the grid, an inscription reads: "Tile the board without spelling 'CAT' and you shall be rewarded with a harem of catgirls. Beware, however, if at any point the word 'CAT' is spelled horizontally, vertically, or diagonally, the catgirls will maul you to death. Many adventurers have perished here before you; Continue at your own peril."
What are your chances of survival if you continue?
You ruminate on this question for several hours, until a voice of unknown origin jolts you to the surface. "Many adventures have come here before you. Some, blinded by their desire, continued impulsively, and were met with their fate. Some, wiser, rejected the offer without hesitation, and went on their way. Some, wiser still, carefully weighed the risks before deciding. You, the most foolish of all, have pondered aimlessly for 18 hours without a hint of progress; a degree of complacency which would put even an eternal being to shame. Therefore I will curse you for your inaction. I will place you into a deep sleep which will end only when the exact answer is calculated. You acted as if you had all the time in the world, and now all the time in the world has been given to you."
How can you awaken from this nightmare?
Ok so I had an idea that we could imagine the grid was already filled with one letter in the "background" and then we just have to figure out how the remaining two letters could be placed
Not really sure how to solve but it might help to create a small scale scenario to test strategies
Try maybe 4x3 or larger
Are the number of tiles equal to spaces in the grid?
yes
"There is one tile for every empty space on the grid"
I was thinking start with one C tile and one A tile then find a general solution for mxn
but that could work as well
If I had to solve this problem, which would be naively on my part, i would do an example of maybe 5x4 size and give a near equal allotment of tiles
My intuition tells me it will be harder to do this with the number of each tile being equal or close in value
yes, I agree
I would try to develop an m x n strategy around that
Unfortunately i don't know a real way to solve it
the number of combinations is higher the more equal they are
Yea and you will "run out" of certain tiles more quickly
You need one of each to spell the word
yes
@rotund blade Has your question been resolved?
@rotund blade Has your question been resolved?
@arctic hare
ok let's say there's 1 'C', 1 'A', and m*n - 2 'T's
there are m*n possible locations for the 'A', and m*n - 1 possible locations for the 'C'
so total permutations = mn(mn - 1) = mn permute 2
if the 'A' is in the corner, three locations for the 'C' will spell CAT, if the 'A' is on the edge but not the corner, five locations for the 'C' will spell 'CAT', for everywhere else, 8 locations for the 'C' will spell 'CAT'
there's 4 corners, 2m + 2n - 8 edges, and then mn - 4 - (2m + 2n -8) center spaces
ways to fail are
3(4) + 5(2m + 2n - 8) + 8(mn - 4 - (2m + 2n -8))
12 + 10m + 10n - 40 +8mn -32 -16m -16n + 64
=4 - 6m - 6n + 8mn
so chance of survival is
1 - (4 - 6m - 6n + 8mn)/(mn(mn - 1))
I think
i have a question
is the beam of light showing no of letters done first or last
like is P(1 C, 1 A , 31 T) = P(11 C, 11 A, 11 T)
having that amount of c, a, t
or is each tile just indiviuadlly one of the 3 letters at random
It's this one I think
it shows the number of letters remaining
ok
so at the beginning it will show x 'C's, y 'A's, z 'T's such that x + y + z = m*n
ok
i see
honestly i think you should just code it for small values of m, n and see if you find a pattern
not a bad idea
@rotund blade Has your question been resolved?


@rotund blade Has your question been resolved?


@rotund blade Has your question been resolved?
@rotund blade Has your question been resolved?

Any thoughts on how to write an efficient algorithm to do this? Obviously there are reflective symmetries we can take advantage of
I think we can use dynamic programming here but I don’t have much experience with it
i’m still not sure how to deal with the letters being in fixed amounts (as opposed to each one being equiprobable on every draw) in an efficient way
well hm that might just mean the idea i shared a while ago isn’t a good one
,w expand (\sum{i=1}^{30}x^i)^3
Result:
4.782969e+6
Result:
3.011499e+6
i was trying to think about something else but tbh maybe my old idea could be decent
,w expand (\sum{i=1}^{40}x^i) (\sum{i=1}^{40}x^i) (\sum{i=1}^{10}x^i)
I’m confused on the relevance of this sum
for each i, the coefficient of x^i is the number of integer triples (a,b,c) with a + b + c = i and 1 <= a, b, c <= 30. so like if if the problem was for a 9 x 10 board and you had 30 of each letter, one of those coefficients would be how many “cases” there are for how many of each letter you can use when you are using i letters in total (which is relevant to my dynamic programming idea)
I see
i was just trying to get a sense of the numbers is all
i'm gonna try to hack something together today
won't be revolutionary but it will go far past what brute force can if my vision is correct
so then this one is like a + b + c = i, a, b <= 40, c <= 10 ?
yea
ok cool I got it
I'm trying to figure out if there's some kind of recursive formula here and I haven't been able to come up with anything
oh actually the indices should start at 0 not 1 since you can use no letters of a certain type if you're not using all of them
,w expand (\sum{i=0}^{30}x^i)^3
not much worse
uhhh don't we want 1 <= a <= 30?
no, but gtg for a bit, will explain later
ok
Help
along the way we might solve the problem, with the original at most 30 of each letter constraint, for 2 x 9 boards, then 3 x 9 boards, and so on (and keep track of things about the solution for n x 9 to to use for the (n+1) x 9 solution) until we solve it for 10 x 9. but for say 2 x 9, there are lots of valid boards that omit a letter
bruh please use an empty help channel thanks
oops fell asleep at like 7 pm and that didn’t happen
@rotund blade Has your question been resolved?
I thought about doing inclusion-exclusion but even just “at least two cats” seems hard
Especially when they can overlap
i don't want to touch inclusion-exclusion with a 10 foot pole
in general or for this particular problem?
i meant this particular problem but also in general ig 
how the hell you do combinatorics without inclusion-exclusion 
if there are > 3 sets involved (and it's not simple) i will do something else if i can
i'm pretty bad with it tbh
I wasn't going to but I kind of want to do it now that you said this 

at the very least each iteration would produce an upper and lower bound
does anyone know anything about proving np-completeness or np-hard? I was wondering if we could just prove that this problem was np hard and call it a day
that wouldn't really affect my interest in the problem
what would the goal be? it would mean there's no efficient algorithm to solve the problem
it would mean the problem can't be solved with dynamic programming afaik
what is the goal now? there wasn't any algorithm complexity specification or target cases in the original post
for me the problem is just have fun and make the best algorithm you can
I see
Maybe we should just start with a brute force algorithm and see if we can improve it
yea we should be able to do that
Ok :)
it may or may not be hopeless to compute the # of ways for large grids but we can at least go far past what brute force can
The hard part is that is finding an efficient “cat” detection algorithm
Because right now the only one I have in mind is O(n^2)
hm
And we would have to essentially run that any possible grid
you could just go through each square and if you see a c, look at the neighbors. if there is an a, check if it extends to a t
yea if we know what it is
a, b, c are inputs right?
which we probably could depending on how we generate the grids
oh yea the amount of each letter is fixed
Yes
i was thinking we would have to go through and count them to find which is used the least if we don't already know it somehow and at that point it would probably be a waste of time but it will be the same for every grid lol
I see
here is a way to generate all the possible grids with just itertools. say we have c C's, a A's, and t T's. think of the set X as the set of indices (i,j) in the m x n grid. loop over combinations(X, c) (so those will be where the c's go). for each of those you'll have mn - c indices left. call that set Y. combinations(Y, a) and the a's will go there. then the t's go in the remaining indices
this way you actually know exactly where each letter is
so if you choose the least used one for the neighbor search you don't have to go through all of them to check where they are
I see
my idea was to fill one square at a time, starting from the center and spiraling outward
the idea is as soon as "cat" is spelled in the central squares, we don't have to check any more grids
because the outside combinations don't matter if we're already spelled cat in the center
we start in the center because that's where we're most likely to spell cat early
sounds backtrack-y
yeah it's recursive
here's an example of how I would explore the grid
it would probably be best to write an iterator for this path so that we don't have to calculate the index every time
actually I should probably just do this lol
hm i'm not sure how much the order matters
The base case for the recursion is either when we spell cat or when we fill the board, so the idea is the faster we spell cat the faster we hit a base case
Does that make sense?
the suspense is killing me
does the algorithm go like this? first generate all 1 square grids (treating that like the middle one), then 2 square grids, and so on (where an n square grid means using whatever squares are labelled 1 to n). and do this by taking all the size n grids and trying each of the 3 letters on the new square and checking it doesn’t make cat to get size n+1 grids?
so we go one square at a time
#successes where this square is "C" (if any C's remain)
- #successes where this square is "A" (if any A's remain)
+#successes where this square is "T" (if any T's remain)
then the base case is return 1 if we fill the grid without spelling cat
and return 0 when we spell cat
does that answer your question? sorry for the confusion
it's essentially brute force
but we can optimize it by starting in the center so that we hit a base case as early as possible
i don’t understand
loll dw i’m dumb
lol you're fine don't say that
so essentially we're counting the number of grids without "cat"
the total number of grids is easy to calculate
yep
so if we know the number of grids without "cat", we can just diivde to find the probabilty
ok cool
yep
so each square has only three possibilities
for each square
Starting at the first square, rather
we want the #grids that don't spell cat where this is C, then the #grids that dont' spell cat where this is A, and the #grids that dont' spell cat where this is T
to calculate this
we imagine three different girds
one with C in the center
one with A in the center
and so on
sure
yep
well if that’s not like what i said (also there should be a letter amount tracking thing but i didn’t mention it) then i’m not sure what you mean
what’s #successes?
of distinct grids with "CAT"
woops
lol
makes it format
"#"
number of distcint grids without cat
it might be like yours, I couldn't quite follo
follow
oh
if you did it like this, will you, at some point, have all the valid (no cat, follows letter amount constraints) size 48 grids enumerated?
how do you get the size 49 grids then?
just go through each size 48 grid and try c, a, and t on square 49 for each of them to see what makes a valid grid?
all good
so like it only produces the answer for one given input of c, a, t, m, n
it's brute force it's not dynamic programming
yea
ok does that clear things up? sorry for the confusion
i’m still not sure we’re on the same page haha
this isn’t very dynamic. i was just thinking backtracking
by not dynamic I mean the work for each input is largely independent
running the calculation for 100 different inputs takes 100x as long
oh then yea ok
ok cool :)
We might be able to combine both our methods, I'd have to think about it
i’m still not 100% on what your algorithm is but it’s ok. i still want to implement my dynamic programming idea
i will not
it's ok to have a life you know
I got my index gen to work at least
#start in center
start = [rows // 2, columns // 2]
yield start
#move east
current = [start[0], start[1] + 1]
if 0 <= current[0] < rows and 0 <= current[1] < columns:
yield current
for distance in range(1, rows // 2 + columns // 2 + 1):
#move northwest
for _ in range(distance):
current = [current[0] - 1, current[1] - 1]
if 0 <= current[0] < rows and 0 <= current[1] < columns:
yield current
#move southwest
for _ in range(distance):
current = [current[0] + 1, current[1] - 1]
if 0 <= current[0] < rows and 0 <= current[1] < columns:
yield current
#move southeast
for _ in range(distance):
current = [current[0] + 1, current[1] + 1]
if 0 <= current[0] < rows and 0 <= current[1] < columns:
yield current
#move northeast
for _ in range(distance - 1):
current = [current[0] - 1, current[1] + 1]
if 0 <= current[0] < rows and 0 <= current[1] < columns:
yield current
#move eastnortheast
current = [current[0] - 1, current[1] + 2]
if 0 <= current[0] < rows and 0 <= current[1] < columns:
yield current```
[1, 1]
[1, 2]
[0, 1]
[1, 0]
[2, 1]
[0, 2]
[0, 0]
[2, 0]
[2, 2]
traversing 3 x 4 grid
[1, 2]
[1, 3]
[0, 2]
[1, 1]
[2, 2]
[0, 3]
[0, 1]
[1, 0]
[2, 1]
[2, 3]
[0, 0]
[2, 0]
traversing 4 x 3 grid
[2, 1]
[2, 2]
[1, 1]
[2, 0]
[3, 1]
[1, 2]
[0, 1]
[1, 0]
[3, 0]
[3, 2]
[0, 2]
[0, 0]
traversing 2 x 5 grid
[1, 2]
[1, 3]
[0, 2]
[1, 1]
[1, 4]
[0, 3]
[0, 1]
[1, 0]
[0, 4]
[0, 0]```
it actually steps outside the boundaries of the grid then just checks whether it's inside the grid at every step. It was easier to code that way
so for a 3x3 it works like this
nice
this problem 🥵

AHAHAHAHA i'm so dumb
i accidentally just wrote wrong code that would correct if we were playing the game on a torus
list index out of range
I almost got a solution that works I want to clean up the code a bit though
ok
I'm stealing this
here is a function that will check an arbitrary board for an instance of cat
index_adjusts = list(it.product((0,1,-1),repeat=2))
index_adjusts.remove((0,0))
index_adjusts2 = [(2*x[0],2*x[1]) for x in index_adjusts]
def check_cat(A,rows,cols):
for r in range(rows):
for c in range(cols):
if A[r][c] == 1:
for k in range(8):
adjust = index_adjusts[k]
adjust2 = index_adjusts2[k]
ij_1 = (r+adjust[0],c+adjust[1])
ij_2 = (r+adjust2[0],c+adjust2[1])
skip = 0
for ij in [ij_1,ij_2]:
if ij[0] < 0 or ij[0] >= rows or ij[1] < 0 or ij[1] >= cols:
skip = 1
break
if not skip and A[ij_1[0]][ij_1[1]] == 2 and A[ij_2[0]][ij_2[1]] == 3:
return 1
return 0```
example:
holy fuck fuck fuck
that's a lot of nested loops/conditions
well it's gonna be plenty fast for my purposes
the loops are just to go over each square
so there aren't very many
it just checks for 1s and then for each 1 checks if there are any neighbors 2 -> 3
the part that looks bulky is just making sure you don't go off the board and get index errors while doing this
I always want to write code like this but my perfectionism gets in the way
I spend way too long just figuring out what to name everything
sometimes i think about variable names a lot
I get off work in an hour I'll try to finish up my code then
there's just one thing i need to thonk about a little bit
having this out of the way is good though
i will only ever need to use it on small boards and not very many of them so it's ok


maybe i won't even end up using this
i think i will just make a specialized one for one of my purposes
and then the other purpose it's kinda silly to use this checking function for but it's also fine
@crystal lintel are you using jupyter notebooks?
yes
i swear by sagemath so that is why
I can't speak to the problem itself, but I absolutely love the setup
Existentialistic/JPUAB always has very nice questions
I think I've only asked a few on here lol
I always feel like they're too high level
Maybe I'll ask more
I like your questions
it definitely doesn't fit super well into any of the math channels though
or use "c", "a", and "t"
no way
I think this is working?
results for 3x3 grid with 7 c's, 1 a's, 1 t's:
wins: 56, total: 72.0
winrate: 77.7778%
results for 4x4 grid with 5 c's, 6 a's, 5 t's:
wins: 255304, total: 2018016.0
winrate: 12.6512%
my code:
then this in another file:
from brute_force import calc_winrate
def main():
calc_winrate(4,4,5,6,5)
if __name__ == '__main__':
main()
@crystal lintel any luck?
my algorithm isn't done but one of those agrees with the original post #help-29 message
I got one of my cases wrong actually D:
now it's
results for 4x4 grid with 5 c's, 6 a's, 5 t's:
wins: 255304, total: 2018016
winrate: 12.6512%
oh wins stayed the same...
oh
it's because some of my checks are redundant
I'm surprised I didn't get any false positives though
Oh I know why it's literally impossible 
I'm always on the outside of the grid so I can never find "cat" spelled starting in the middle
for row_delta in [-1, 0, 1]:
for col_delta in [-1, 0, 1]:
if row_delta == col_delta == 0:
continue
index2 = [index[0] + row_delta, index[1] + col_delta]
index3 = [index[0] - row_delta, index[1] - col_delta]
if 0 <= index2[0] < len(grid) and 0 <= index2[1] < len(grid[0]):
if 0 <= index3[0] < len(grid) and 0 <= index3[1] < len(grid[0]):
if grid[index2[0]][index2[1]] == "c" and grid[index3[0]][index3[1]] == "t":
return True```
so this never returns true
@crystal lintel on a scale of Alcatraz to Guantanamo Bay how locked in are you?
guantanamo bay

ok let me know if you have any questions/need any help
what's the most your algorithm can handle?
uhh
I've been running calc_winrate(5,5, 8,9,8) for several minutes now
and it still isn't done
I need to get rid of the print statements though
that will speed things up
ever since I learned how to use generators I've been using them for everything XD
yea i'm gonna start using it more
i didn't even know how it worked at all but i had seen people mention you can make generators with it
so i just tried it and it worked how i expected
you can like pass things into generators too and it's fucking weird
what are you trying to do exactly?
Oh also I got this output
results for 4x5 grid with 6 c's, 7 a's, 7 t's:
wins: 8003768, total: 133024320
winrate: 6.0168%
took a few minutes though
dynamic programming but there's something i'm trying to do that i've never done before
alright well good luck
I LOVE HASH TABLES SO MUCH
🥵
sorry i'm eating salsa and it's hot
hm do even need a dictionary for the letter amounts of the endings
i think no
just the rows

we just begin the dp with this
then we'll never need them again
would you mind sharing your code?
i will when it is done
(this is all rambling to myself) we just want to start with a dictionary with keys as the endings and each of their values is another dictionary which has all the 3-compositions of 2*n, and their values are the amount of endings that have letter amounts corresponding to the compositions
then we have a dictionary that stores which rows each ending can have appended onto them to get another valid board
so we just loop over these and get the new boards based on what rows we can append
and count the letter amounts etc and add them to the next dictionary
and voila that should do it
ok i still have to code a lot though
it's coming along
༼ つ ◕◕ ༽つ @crystal lintel TAKE MY ENERGY ༼ つ ◕◕ ༽つ
You can't hash mutable types like lists
i know
i just felt .-.
and wanted to share
now i need to go change some things to tuples
and change np.add
https://note.nkmk.me/en/python-numpy-ndarray-immutable-read-only/ this might work I'm not sure
it still might not let you use them as keys
it's fine. i'm just gonna change them to tuples and use an ad hoc pointwise addition function
guh that's so much slower
it is what it is
i could maybe speed it up in the most annoying way imaginable 
but i'll just not do that right now
ok i'm on to the last stage

hm i need to go back and do something
rip
getting closer....
ok there's another thing i could speed up but i'll just skip it for now
or maybe i should do it now
i'm trying to memoize so many things and it's getting overwhelming to keep track of
and each memoized thing is like a dictionary with values that are dictionaries
i can do this
@crystal lintel please get some sleep
it's too late for that
If you don’t sleep I won’t either
i must work while i can before the bad thoughts come back
The bad thoughts are lying don’t listen to them

this is what my algorithm gives for this
the numbers on the right sum to 66 (that's the "answer" it outputs)
this means that e.g. there are 4 boards with bottom two rows
ccc
ccc```
which makes sense
you have 1 of each of the rest of the letters, so 6 ways to permute them, two of them spell cat
the bottom two rows don't affect that
but some of these must be wrong
(this is just debugging)
ok this is an issue because
001
002
only has one choice for a top row and it makes a 012
an aha my algorithm does believe 002 can be appended below
000
001
to make a valid board


Result:
0.019828254065971
yea you're cooked if you play 5x5
Sorry I fell asleep on you

i know haha
😅
i need to change (and probably just redo) my algorithm for speed because it's very hacked together rn
If you post the code I might be able to help or are you committed to soloing it
You know some people would take these odds though
Men, throughout history, have behaved far more recklessly for women.
some "people" would take those odds 
shots fired
i don't think it's going to be very comprehensible rn and i don't want to explain and some things are very poorly written so i don't really want to share it yet
didn't get a chance to work on it today and i'll probably try to not stay up to 11 am again
My disappointment is immeasurable, and my day is ruined
too bad
(in all seriousness, no worries, take your time, and please don't stay up to 11am again kthxbye)
This is the damn "don't find the fox" game

It could probably be done with DP in like O(3^min(m,n))
I couldn't figure out how to do better than exponential time 😭
how are are you that it's possible?
?????
how are are you that it's possible?
did you mean "how sure are you?"
I have no idea that's why I'm asking lol
oh O(3^min(m, n)) is exponential I'm blind
I misread it as O(min(n, m)^3)
yeah how sure are you lol
rip
I wouldn't expect there to be a better solution but who knows
well layla's code is a lot faster than mine and I'm not entirely sure how to make mine faster
She might only do a recursive search through all combos where she stops immediately when CAT is created
Still O(k^mn) for some k slightly less than 3
I'd be very impressed if she used the DP solution
my algorithm isn’t a recursive search
it is dp but i don’t think it’s O(3^min(m,n))
because either i am dealing with the fact that there are an exact amount of letters you need to use poorly, or you’ve overlooked the difficulty of that
Me mourning the loss of the many adventurers that have perished here before me as I consider if I should continue at my own peril
Something I wrote has become memified I feel like that’s an achievement
.unlist
you will never unlist this channel
Ah right the specific letter limit
That makes things a little more complicated
DP[cell that you're working on now] [values of the last n cells][remaining numbers of each letter]
3^n * (mn)^2?
i have not touched my code to speed it up but interestingly on a 10x3 board with 10, 10, 10 letters you have a better chance of winning
even though it's more letters
i'm trying a 20 x 3 board now
i think it'll finish
ok it finished
very hopeless to recursive search that
i'll report back with 50 x 3 when it finishes 
the letter amount constraints suck because in addition to just making way more states i can't compute the answer for f(3,3), f(4,3), f(5,3) etc (with evenly split letters) all at once
f(m,n,a,b,c) is the amount of cat-less m x n boards with a,b,c letter amounts let's say
because when computing f(m,n,a,b,c) the subproblems my algorithm solves are f(2,n,a,b,c), f(3,n,a,b,c), ..., f(m,n,a,b,c)
so in the subproblems we have more letters than squares which is not the problem we care about
,w expand (\sum{i=0}^{50}x^i)^3
,w expand (\sum{i=0}^{20}x^i)^3
This feels wrong
are you 100% sure that's accurate?
oh 10x3
nvm
that's reasonable
Could you please please please send me the code? I promise I won't make fun of it, post it without your permission, or ask questions about it. xoxo
More letters but less possible spots for words:
5x5: 15 vertical spots, 15 horizontal spots, 9 diagonal spots in each direction = 48
3x10: 10 vertical spots, 16 horizontal spots, 8 diagonal spots in each direction = 42
i like to make suspense
plus you're my archenemy so i shouldn't send it
speeding my code up in the ways i envision would not really change the runtime on computing f(m,3,a,b,c) btw
20 mins and 50 x 3 is still not done
i have hope though
how much worse could it be...
I'm pretty sure I could find a closed formula for n x 3
are the catgirls worth it though
idk ask someone else i like boys
rip f(3,2,a,b,c), f(3,3,a,b,c), f(3,4,a,b,c) (where a,b,c are evenly split) doesn't seem to have any relevant oeis pages
some values of f(3,n) if you are interested
f(10,4,13,13,14)
even distribution of letters for these right?
f(3, n) might be too hard actually, what about f(2, n)?
what letter distributions?
here are some values when n (well m in my notation) is a multiple of 3 just to allow even letter distributions
6/10 not enough timo
sorry
Just do better next time
do we have a 1 x n formula 😂
even that seems potentially difficult but i haven’t thought about it
Working on it currently
It’s related to the partition function though, which makes me think there’s no closed formula https://en.m.wikipedia.org/wiki/Partition_function_(number_theory)
whats the question
what’s the relation?
if we have an 1 x 3n grid, there are p(n) different families of grids containing n cats
For n = 4, p(4) = 5:
cat, cat, cat, cat
catac, cat, cat
catac, catac
catacat, cat
catacatac
And that doesn’t even count permutations
since tacat is different from catac
And
Catacat, cat, cat
Is different from
Cat, catac, cat
Is different from
Cat, cat, catac
that relation seems kinda loose to me
counting the number of grids which contain "cat" involves computing the partition function, unless I'm overlooking something
could be. i haven't tried it yet
and the partition function has no known closed formula
so unless we get some nice cancellation, I doubt 1 x n grids have them either
@crystal lintel Could you confirm/falsify this formula? #help-33 message
i'll see what my algorithm says for some random values
it seems to get better for larger values
maybe it's asymptotically correct 😂
yeah there's an edge case I'm not considering then
I'm working rn but I'll try to fix it after I get off
you always work at unholy hours
If the A is in the corner then zero locations for the C will spell CAT
you're forgetting about the part where there's also a T in CAT
same problem with edge, only 2 locations spell CAT
not 5
still no but closer
oh right
wait
I'd have to think about it
oh edge should be 2 lol
as @tight furnace said
the numerator should be 2*(m-2)*n + 2*m*(n-2) + 4*(m-2)*(n-2)
layla: 1, Existentialistic: 0
i just did it by considering the 8 directions you can spell cat
so like (m-2)*(n-2) for each diagonal way
(m-2)*n if you're going up or down
m*(n-2) if you're going left or right
that's what i started doing too and then i read what he was doing
and thought, this would be a better solution without the mistakes
this has also improved my confidence in (the correctness of) my algorithm
8mn-12m-12n+16 according to both of our formulas

another sus emote server I have to join
i don't think that one is sus
it's borderline sus


STOP



but i would never have found such gems as 
DADSCORD
i need a daddy what do you expect
Fair
I would think that was a dad joke server if it was literally anyone else sending that
My friend's steam username used to be "My other ride is your dad"

🛑
ok but what about the dabbing squidward one

🛑
now that's what I'm talking about
anyone who provides a satisfactory answer to this problem will immediately steal my heart
well as long as you are 20+, a guy, not a deadbeat, at least slightly attractive
So basically whoever solves this problem is rewarded with a much more complicated problem
ok i laughed
You know if the word was two letters this would be pretty easy
this problem is so hard 🥵
If someone finds a solution better than 3^n you'll need to fight me for them
you can't **** **** like i can
Show me your ||code||
no can do mr archenemy

i feel very mischievous having this code that can compute stuff you can't 
Why
omg you're here too
Yes
You know me
No only one was there i lost her

Sad
next on the docket for me is to clean up my code
well actually no
@vagrant gull 
lmaoo
@crystal lintel I think I found the formula for f(m, n, c, 1, t = mn - c - 1)
oh that's you
You changed your nickname lol
Can you get it to print CAT boards instead of no CAT boards?
i wanted to make it generating function slut but i figured i might get in trouble
ty

generating function ho?
😭
(sorry)




