-
21 votes
-
How to build an origami computer
7 votes -
Any good Youtube channels on learning Data Structures and Algorithms, especially the math part?
Hello Tildes, I am currently taking DSA in college and struggling a lot with the math and algorithms. Recently had to solve Karatsuba questions and I don't even know what I wrote down on the...
Hello Tildes,
I am currently taking DSA in college and struggling a lot with the math and algorithms. Recently had to solve Karatsuba questions and I don't even know what I wrote down on the paper. I have been trying to look for videos on this and only really came away with a vague understanding.
What I've noticed is that I struggle with solving the math part of the questions.
For example: "Describe a divide and conquer algorithm to compute the square
of an n-digit integer in O(n log3 5) time, by reducing to the squaring of five [n/3]-digit
integers"I have zero clue how I am supposed to understand the latter half of the question. It makes no sense to me beyond I am supposed to be multiplying squared numbers. How do I even begin to turn this into an algorithm? What is the solution even supposed to look like?
Needless to say, I've struggled with math my entire life and I've been trying for years to be decent with it, and I have nothing to show for it.
So, do you have any recommendations that could simplify the math needed for DSA? Videos are preferred but I will textbook recommendations as well.
Thank you, and have a good day!
18 votes -
Qalculate! - the ultimate desktop calculator
42 votes -
Can you set a clock using a light sensor to detect sunrise and sunset?
While pondering an off-grid microcontroller project, I got to wondering: A light sensor can obviously detect day vs night. So it could be used as a very cheap way to set a device's clock - but how...
While pondering an off-grid microcontroller project, I got to wondering: A light sensor can obviously detect day vs night. So it could be used as a very cheap way to set a device's clock - but how accurately? To within an hour? A few minutes? How would you do it?
Questions that arose from this include:
- Should it detect dawn/dusk (light <-> dark transition), or noon/midnight (brighest/darkest time) ?
- How do dawn/dusk times relate to clock time? Does it depend on lat/long?
- If using dawn/dusk, what light level threshold to use?
- The same threshold for dawn & dusk, or different ones?
- Better to detect a darker threshold (start of dawn, end of dusk) or a lighter one?
- Some days will be lighter/darker than others, so how to manage averaging of times?
- How accurate could it be made?
My naïve first stab at this would be: Pick a light threshold. Record the dawn/dusk times according to that threshold. Average them, call that "noon", and gradually tweak the clock time over several days to bring it into line with the sensed/calculated "noon" - but a searching for graphs of sunrise/sunset times quickly showed that the midpoint of sunrise & sunset is not noon.
Googling threw up lots of results for sensor lights combining a clock and a photocell, but I couldn't find anything about using the photocell to set the clock. So does anyone know if this has been tried before? Is it a non-starter for some reason?
Edit:
Perhaps it's worth sharing the project I had in mind, which is a rain alarm so I can rush out and get the washing in from the line when it starts to rain. I was thinking how annoying it would be if I left it switched on and it rained in the middle of the night and the alarm woke me up. So I decided should automatically avoid triggering during the sleeping hours of night (say 10pm to 8am). My first thought was a photocell so it wouldn't trigger when it's dark. Then I remembered that it gets light at 3am at the moment, which wouldn't work. So it needs a clock. How to set the clock:
- Manually - Needs a user interface with buttons and a display. Seems overkill just for a clock.
- Serial port - Clunky to plug a laptop in just to set the clock.
- WiFi - Needs a username and password or WPS, and an ESP32 or similar - again seems overkill just to get the time.
- GPS - also overkill and expensive.
19 votes -
Numerically Stable RWKV Language Model
11 votes -
GradIEEEnt half decent: The hidden power of imprecise lines
9 votes -
KeenType 1.0.0
6 votes -
KeenWrite 2.10.0: R meets TeX
4 votes -
JMathTeX
4 votes -
TeXMe Demo: Self-rendering Markdown + MathJax documents
6 votes -
KeenWrite: A text editor
12 votes -
Another Look at Provable Security
6 votes -
Dissecting a Dweet: Strange Attractor (a tiny 3D Lorenz system in javascript)
9 votes -
the sierpinski triangle page to end most sierpinski triangle pages ™
9 votes -
How I'm able to take notes in mathematics lectures using LaTeX and Vim
20 votes -
More musings on Pollard Rho
3 votes -
Idle musings about the Pollard Rho method of factoring integers
5 votes -
Why do we still use COBOL?
14 votes