zkfcfbzr

joined 11 months ago
[–] zkfcfbzr 16 points 2 hours ago (4 children)

Are you thinking of Snowden?

[–] zkfcfbzr 159 points 2 weeks ago (10 children)

That doesn't sound complicated at all

[–] zkfcfbzr 1 points 3 weeks ago* (last edited 3 weeks ago)

Not sure how much you'd care, but I came back to this and found (by hand) a function which closely approximates the solution - it's not exact but it's also not super far. Graph.

I think I could also solve the differential equation by hand at this point (getting the same solution as before) - I haven't, but I'm pretty sure I could if I wanted to for whatever reason. I'm doubtful it's possible to get an exact solution in terms of just x but if you ever manage I'd love to see how.

[–] zkfcfbzr 3 points 4 weeks ago

Making one additional note here, because of your parenthetical message, letting you know that my short backlog of problems I found interesting has actually run dry with the last one I posted - so my series is unfortunately on hiatus. I'll still post if I come across other interesting problems but that honestly doesn't happen too often - even the ones I have posted were collected (and saved by a friend) over several years.

[–] zkfcfbzr 160 points 4 weeks ago (19 children)

Mark Rober for me, seems like he wants to be Mr. Beast Lite or something lately.

[–] zkfcfbzr 45 points 4 weeks ago (2 children)

Not to mention released the next day, and reportedly in good health and high spirits since. Like, talk about best possible outcome.

[–] zkfcfbzr 2 points 4 weeks ago (1 children)
visible textspoilered invisible text

visible textspoilered invisible text

[–] zkfcfbzr 6 points 1 month ago

solutionI'm sure there's some short elegant solution here that uses beautiful vector math. Instead I went for the butt ugly coordinate geometry solution.

Let u = <a, b> and v = <c, d>

See diagram. WLOG, assume u has a smaller angle than v. We can find cos(θ) by constructing a right triangle as shown, and by finding a new vector w, in the same direction as u, which has the correct length to complete our right triangle. Once done, we will have cos(θ) = |w| / |v|.

Let's consider each vector to be anchored at the origin. So we can say u lies on the line y = (b/a)x, and v lies on the line y = (d/c)x. To find w, let us first find z - the third side of the triangle, which we know must be perpendicular to u, and pass through (c, d).

The line perpendicular to y = (b/a)x and passing through (c, d) is y = (-a/b)(x-c) + d. So this is the line containing the third side of our constructed triangle, z. To find w, then, let's find its point of intersection with y = (b/a)x, the line containing w.

(b/a)x = (-a/b)(x-c) + d → Setup

(b/a)x = (-a/b)x + (ca/b) + d → Distribute on right

x(b/a + a/b) = (ca/b) + d → Add (a/b)x to both sides, factor out x on left

x(a² + b²) = ca² + dab → Multiply both sides by ab

x = (ca² + dab) / (a² + b²) → Divide both sides by (a² + b²)

x = (ca² + dab) / |u|² → a² + b² is |u|²

y = (b/a)x = (b/a)(ca² + dab) / |u|² → Plug solution for x into (b/a)x, don't bother simplifying as this form is useful in a moment

So w = <(ca² + dab) / |u|², (b/a)(ca² + dab) / |u|²>. Now we need |w|.

|w| = sqrt((ca² + dab)² / |u|⁴ + (b²/a²)(ca² + dab)² / |u|⁴) → Plugging into normal |w| formula

|w| = sqrt(((ca² + dab)² / |u|⁴) * (1 + b² / a²)) → Factor out (ca² + dab)² / |u|⁴

|w| = (ca² + dab) / |u|² * sqrt(1 + b² / a²) → Pull (ca² + dab)² / |u|⁴ out of the root

|w| = (ca² + dab) / |u|² * sqrt((a² + b²) / a²) → Combine terms in root to one fraction

|w| = (ca² + dab) / |u|² * |u| / a → Evaluate sqrt

|w| = (ca + db) / |u| → Cancel out |u| and a from numerator and denominator

So this is the length of our adjacent side in the constructed right triangle. Finally, to find cos(θ), divide it by the length of the hypotenuse - which is |v|.

cos(θ) = |w| / |v| = (ac + bd) / (|u||v|)

And note that ac + bd is u•v. So we're done.

cos(θ) = u•v / (|u||v|), or |u||v|cos(θ) = u•v.

Note that since this formula is symmetric with respect to u and v, our assumption that u's angle was smaller than v's angle did not matter - so this should hold regardless of which is larger.

[–] zkfcfbzr 4 points 1 month ago* (last edited 1 month ago)

In probability, two events are said to be independent if one event happening has no effect on the probability of another event happening. So coin flips, as an example, are independent - because when you flip a coin and get Tails, that doesn't affect the probability of the next coin flip also coming up Tails.

So in this context, asking if A and B are independent is asking: Does knowing the game lasts at least four turns change the probability of winning? And similarly for A and C. Does knowing the game lasts at least 5 turns change the probability that the game will end in a victory?

Rest of responseTo be clear about your other answers, saying P(B) = 1/16 and P(C) = 1/32 are not correct - I was saying if you adjusted your formula, from 1/2^n to 1/2^(n-1), then your answers would be correct. So the probability of the game lasting at least four turns is 1/2^(4-1) = 1/2^3 = 1/8, and the probability of it lasting at least 5 turns is 1/2^(5-1) = 1/2^4 = 1/16.

But I think you were more asking about why this didn't affect your win rate - that's because there's a subtle difference between "making it to the nth round" and "having the game end on the nth round" - and that difference is that once you make it to a round, you then have a 1/2 probability to end the game - which makes the probability of ending on the nth round the 1/2^n you used.

[–] zkfcfbzr 3 points 1 month ago (1 children)

responseThis is the correct answer, although P(A|B) should actually be 2/3 rather than 7/12 - I think you meant 1/2 + 1/8 + 1/32 + ...?

The reasoning is good, either way. Since past flips won't affect future flips, if the player has made it to turn 5, an odd turn, then their future prospects are no different than they were on turn 1, another odd turn - so A and C are independent. Similarly, A and B are dependent because your chances of winning and losing effectively flip: If you've made it to an even turn, then you now win if it takes an odd number of flips from there to get Heads.

So it should be an almost paradoxical-seeming situation: You win 1/3 games overall, you win 2/3 games that make it to turn 2, you win 1/3 games that make it to turn 3, you win 2/3 games that make it to turn 4, 1/3 that make it to turn 5, etc.

[–] zkfcfbzr 5 points 1 month ago* (last edited 1 month ago) (1 children)

Games are always played to completion, though if you wanna make it (barely) more challenging you can add in a 5% chance for both players to get bored and give up on each round (before flipping), leading to a loss. Though it seems unlikely - after flipping a quarter 20 times and getting Tails every time, I'd be inclined to keep flipping if anything.

responseThese are correct. It is possible to reason out which of B and C is independent of A without going into the numbers.

[–] zkfcfbzr 3 points 1 month ago* (last edited 1 month ago) (2 children)

responseThis is close, but you've got an off-by-one error where you calculate the probability of making it to the nth round as 1/2^n. Consider that that would imply you have a probability of 1/2 for the game to make it to round 1, or 1/4 to make it to round 2, etc - it should be 1/2^(n-1). Correcting this would give you the correct answers for P(B) and P(C).

As for the dependence question, I'm not sure I followed your arguments there - but saying both are dependent is not correct.

16
Coin-flipping game (self.dailymaths)
submitted 1 month ago* (last edited 1 month ago) by zkfcfbzr to c/dailymaths
 

We're playing a game. I flip a coin. If it lands on Tails, I flip it again. If it lands on Heads, the game ends.

You win if the game ends on an even turn, and lose otherwise.

Define the following events:

A: You win the game

B: The game goes on for at least 4 turns

C: The game goes on for at least 5 turns

What are P(A), P(B), and P(C)? Are A and B independent? How about A and C?

15
Bounding a function (lemmy.world)
submitted 1 month ago* (last edited 1 month ago) by zkfcfbzr to c/dailymaths
 

Consider the function defined by y = x^(sin(x)^sin(x)). Observe its graph. Find an increasing function which passes through each of its local maximums, and another increasing function which passes through each of its local minimums.

Extra credit: You'll notice the graph isn't drawn for x-values which make sin(x) negative. This is because most of those values make the function undefined - though it is defined for infinitely many points in those intervals, it just also has infinitely many holes. Since it lacks continuity here, it has no true local maxes or local mins, and doesn't impact the original problem. We can nonetheless cheat and fill in the holes by expanding the function to these regions with y = x^|sin(x)|^sin(x) (Using x^-|sin(x)|^sin(x) should also be technically valid, but is being ignored because it's discontinuous with the rest of the graph and not as pretty, but will be mentioned in my solution). Doing so adds more local maxes and local mins. The new local mins should line up with your function that finds the local maxes for the original function - but, find a new function which hits all of the new local maxes.

18
Solve for x (lemmy.world)
submitted 1 month ago by zkfcfbzr to c/dailymaths
 

(x/5)^log_b(5) - (x/6)^log_b(6) = 0

10
submitted 1 month ago* (last edited 1 month ago) by zkfcfbzr to c/dailymaths
 
Index of my unnamed series of posted problems
Date Post
2024-05-07 Find a+b
2024-05-09 What is the area of the shaded region?
2024-05-15 Solve for x
2024-05-17 Bounding a function
2024-05-22 Coin-flipping game
48
submitted 1 month ago* (last edited 1 month ago) by zkfcfbzr to c/dailymaths
 

An 8x5 rectangle. If the bottom left corner is considered (0, 0), then two lines are drawn within the rectangle, from (0, 4) to (8, 1) and from (1, 5) to (7, 0). The smaller two regions of the four these lines cut the rectangle into are shaded. What is their combined area?

18
Find a+b (self.dailymaths)
submitted 1 month ago* (last edited 1 month ago) by zkfcfbzr to c/dailymaths
 

The image is of a large unit square with five smaller disjoint shaded squares contained entirely within it. The five smaller squares are congruent. Four of them are at each corner of the large square. The fifth is in the center, rotated diagonally, so the center of each of its sides is touched by the vertex from one of the other four squares. You are given that the common length for the five smaller congruent squares is (a-sqrt(2)) / b, where a and b are positive integers. What is the value of a + b?

 

I read this article and still walked away feeling like I didn't understand the situation that well.

Is it $56 billion that he's already been paid, and he needs to return it? $56 billion he's partially been paid, and he can keep what he has, but won't get the rest? Something more complicated?

0
U.S. Presidents (ankiweb.net)
submitted 8 months ago* (last edited 8 months ago) by zkfcfbzr to c/anki
 

Sharing an Anki deck I made for learning the US presidents. I've always been mediocre at best when it came to remembering them, but in about a week with this deck I can now list them all, in order, including their years in office.

Card fronts will display either their order, name, or their years in office. Card backs will display all of that, in addition to their official white house portrait, political party, vice president(s), and the president who preceded and succeeded them. Also includes a note for presidents who died in office, detailing how they died. When using the deck I study it by attempting to remember both of the missing pieces of information from the front of the card. I put a fair amount of effort into trying to get the cards to look nice as well, and in particular trying to get elements of the card to stay in place when swapping between front and back - I don't like when things jump around.

I might share other decks in the future. I have decks I made for US/Canadian/Australian state/province/territory locations and capitals, but for all three of those I used maps from decks other people made, so I'm not sure on the etiquette of sharing something like that. I did make a chemical element deck from scratch that I'm pretty proud of and will probably share at some point, though - I'm just not sure if I'm done tinkering with it yet.

I'm pretty new to Anki but have enjoyed learning how to create nice decks. If you download this and find any sort of issues or bugs, please let me know.

10
submitted 9 months ago* (last edited 9 months ago) by zkfcfbzr to c/[email protected]
 

Note that I'm using autohotkey v2, not v1.

I want to run two different autohotkey scripts. I want to trigger a hotstring in the first script, the output of which ends up being part of the hotstring trigger for the second script. Is this possible?

Here's a simplified version of my intended workflow.

Script 1:

#Hotstring EndChars \
#Hotstring o
#Hotstring ?
::iv::ǐ
::av::ǎ

Script 2:

#Hotstring EndChars \
#Hotstring o
#Hotstring ?
::nǐ::你
::hǎo::好

So the idea is that I can type niv\ and the first script will convert it to nǐ - then I can immediately type \ and the second script will convert it to 你. So I type niv\\ and my text goes from niv to nǐ to 你. I can then type hav\o\ and have my text go: h, ha, hav, hǎ, hǎo, 好. So I can do niv\ hav\o and get nǐ hǎo, or I can do niv\\ hav\o\ and get 你 好. Both writing systems in a reasonably simple format.

There are reasons I want to set it up like this. The first script has dozens of functions beyond writing in pinyin/chinese, and I share it with another person - so I don't want to add potentially hundreds of random Chinese hotstrings to it, just the special pinyin characters. That's why I'm using two scripts.

But I also realize I could just make "niv" and "havo" their own hotstrings which go directly to 你 and 好 without the intermediate nǐ and hǎo. I don't want to do this mostly because I think the system I have in mind is prettier - type it correctly in pinyin first, then have it correctly convert to Chinese.

All of that aside: I've gathered that this is probably possible using some combination of SendLevel and #InputLevel - but I've tried a bunch of different combinations and ideas with it, and haven't successfully had one script trigger another yet. Even in simplified toy scripts, which is a little discouraging. Ideally I'd be able to do this with as few changes to the main script I share with another person as possible - the script that handles the Chinese can be as complicated as it needs to be though. Anyone know how to make this work?

9
submitted 9 months ago* (last edited 9 months ago) by zkfcfbzr to c/[email protected]
 

Imgur album: https://imgur.com/a/ikTA97e

Those photos were taken under extreme magnification and bright light - the actual size is about the size of an uncooked grain of rice. Maybe smaller. This one was killed by freezing to preserve its form.

In the last few days I've started to see a lot of these - I can find one crawling across my desk every 5 or 10 minutes if I remember to look (Though I can't find where they're coming from at all). They don't move all that fast - they're frankly pretty easy to capture or squash.

In person I don't think they look very much like ants but in the closeup I think they kind of do. Also hoping they aren't termites.

Thanks for any help.

Edit: Here's a video of one scurrying across my desk too: https://imgur.com/a/ZC15gNZ

 

For example - if a popular TV show is about to have its season or series finale, or a sport league is about to have its championship game. Are there any websites that track these, without all the noise of less important shows or games, to keep track of?

ESPN.com does seem to track upcoming sporting events pretty well, but it's not that easy to tell which upcoming games are "big" for the league in question or not.

139
submitted 9 months ago* (last edited 9 months ago) by zkfcfbzr to c/nostupidquestions
 

It seems like every shower has its own unique way of controlling water temperature and pressure. Of all the showers I've ever used, no two of which have ever been alike, I like my controls the least. Plus the faucet has started dripping lately.

Is this likely to be something I can replace on my own, without a plumber? To me, that means: Can I likely do this without damaging the wall, without having to mess with pipes, and without needing to do anything involving words like "hacksaw", "weld", or "plumbing torch"?

Basically I believe in my ability to buy a faucet and control thingie from Home Depot; to use screwdrivers, allen wrenches, pliers, and regular wrenches; to use things like plumbing tape, lubricants, and caulk; and to remember to turn the water off to the house.

Would a project like this likely require anything more complex than that? I tend to prefer shower controls that have separate knobs for hot and cold, but I figure going from a one-knob setup to a two-knob setup is definitely going to require reconfiguring the plumbing. Should sticking with a one-knob solution be okay?

I don't know if it matters but I live in Florida in the US, and this place was built in the 1980s. I doubt this matters, but my current controls work by turning the larger knob left or right for temperature, and the smaller knob for pressure.

My place does have some annoyances - like the front door is an uncommon size that's difficult to find replacements for at places like Home Depot. Is there any chance of me running into issues like that when it comes to things like the size of the pipe openings?

Thanks for any insight.

Edit: Thanks for all the replies. It's pretty clear now that this is something that could very easily end up a lot more involved and time consuming and property damaging than I'm comfortable with.

view more: next ›