🌉 bridged from @zkfcfbzr@lemmy.world by Tidepool
zkfcfbzr
@zkfcfbzr.lemmy.world.ap.tdpl.io
Coin-flipping game
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?
Bounding a function
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.
Solve for x
(x/5)log_b(5) - (x/6)log_b(6) = 0
Index of my posted problems
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
What is the area of the shaded region?
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?
Find a+b
image 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?
U.S. Presidents
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.
ankiweb.net
In autohotkey, can you daisy chain together hotstrings from different scripts?
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?