Generating Function Graphs as Binary Trees

2025-02-01

This post describes an algorithm using Python and the NetworkX library to generate a binary tree. The algorithm is based on a function f(x) = [(x << 1) + 2, (x << 1) + 3], building a graph by iterating over a numerical domain and using the function's output to define connections between nodes. The post includes detailed code implementation and mathematical explanations, demonstrating how a mathematical function can be transformed into a graphical representation.

Read more
Development

Geometric Series Solution for Capacitor Charge Under Square Wave Excitation

2025-01-24

This article analyzes the charge and discharge process of a capacitor under the influence of a symmetric square wave voltage. By establishing recursive equations for charging and discharging, the geometric series solution for the process is obtained. Special cases are discussed where the time constant is much smaller or larger than the period of the square wave. For example, when the time constant is much smaller than the period, the capacitor fully charges and discharges; when the period is much smaller than the time constant, the circuit acts as a low-pass filter.

Read more